From 3291c07b37c9f9031837a2a32953e8f8854ec298 Mon Sep 17 00:00:00 2001 From: Rohit Kulshreshtha Date: Sat, 21 Dec 2024 15:42:41 -0800 Subject: [PATCH] chore: Rename Hydroflow -> DFIR (#1620) Work In Progress: - [x] hydroflow_macro - [x] hydroflow_datalog_core - [x] hydroflow_datalog - [x] hydroflow_lang - [x] hydroflow --- .github/workflows/ci.yml | 6 +- .github/workflows/release.yml | 4 +- .github/workflows/template.yml | 2 +- CONTRIBUTING.md | 6 +- Cargo.lock | 238 +- Cargo.toml | 10 +- Dockerfile | 2 +- RELEASING.md | 28 +- benches/Cargo.toml | 2 +- benches/README.md | 2 +- benches/benches/arithmetic.rs | 14 +- benches/benches/fan_in.rs | 12 +- benches/benches/fan_out.rs | 14 +- benches/benches/fork_join.rs | 16 +- benches/benches/identity.rs | 20 +- benches/benches/micro_ops.rs | 32 +- benches/benches/reachability.rs | 36 +- benches/benches/symmetric_hash_join.rs | 2 +- benches/benches/words_diamond.rs | 6 +- benches/build.rs | 2 +- datastores/gossip_kv/Cargo.toml | 2 +- datastores/gossip_kv/cli/main.rs | 8 +- datastores/gossip_kv/kv/lattices/mod.rs | 4 +- datastores/gossip_kv/kv/model.rs | 8 +- datastores/gossip_kv/kv/server.rs | 71 +- datastores/gossip_kv/kv/util.rs | 2 +- .../gossip_kv/load_test_server/server.rs | 10 +- datastores/gossip_kv/server/config/mod.rs | 6 +- datastores/gossip_kv/server/main.rs | 18 +- .../CHANGELOG.md | 0 .../Cargo.toml | 6 +- .../src/lib.rs | 10 +- .../CHANGELOG.md | 0 .../Cargo.toml | 8 +- .../build.rs | 0 .../src/grammar.rs | 0 .../src/join_plan.rs | 8 +- .../src/lib.rs | 26 +- ...egations_and_comments@datalog_program.snap | 1136 +++++++ ...gregations_and_comments@surface_graph.snap | 41 + ...tions_fold_keyed_expr@datalog_program.snap | 429 +++ ...gations_fold_keyed_expr@surface_graph.snap | 18 + ...ore__tests__anti_join@datalog_program.snap | 1049 ++++++ ..._core__tests__anti_join@surface_graph.snap | 40 + ...e__tests__collect_vec@datalog_program.snap | 766 +++++ ...ore__tests__collect_vec@surface_graph.snap | 30 + ..._core__tests__detuple@datalog_program.snap | 353 ++ ...og_core__tests__detuple@surface_graph.snap | 18 + ...ts__detuple_then_flat@datalog_program.snap | 437 +++ ...ests__detuple_then_flat@surface_graph.snap | 22 + ...core__tests__expr_lhs@datalog_program.snap | 896 +++++ ...g_core__tests__expr_lhs@surface_graph.snap | 45 + ...tests__expr_predicate@datalog_program.snap | 835 +++++ ...__tests__expr_predicate@surface_graph.snap | 43 + ...ts__flat_then_detuple@datalog_program.snap | 392 +++ ...ests__flat_then_detuple@surface_graph.snap | 20 + ..._core__tests__flatten@datalog_program.snap | 357 ++ ...og_core__tests__flatten@surface_graph.snap | 18 + ...og_core__tests__index@datalog_program.snap | 2250 +++++++++++++ ...alog_core__tests__index@surface_graph.snap | 88 + ...ests__join_with_other@datalog_program.snap | 638 ++++ ..._tests__join_with_other@surface_graph.snap | 28 + ...tests__join_with_self@datalog_program.snap | 600 ++++ ...__tests__join_with_self@surface_graph.snap | 27 + ...__local_constraints@datalog_program-2.snap | 354 ++ ...ts__local_constraints@datalog_program.snap | 348 ++ ...ts__local_constraints@surface_graph-2.snap | 18 + ...ests__local_constraints@surface_graph.snap | 18 + ...alog_core__tests__max@datalog_program.snap | 429 +++ ...atalog_core__tests__max@surface_graph.snap | 18 + ..._core__tests__max_all@datalog_program.snap | 438 +++ ...og_core__tests__max_all@surface_graph.snap | 18 + ...ests__minimal_program@datalog_program.snap | 315 ++ ..._tests__minimal_program@surface_graph.snap | 16 + ..._tests__multi_detuple@datalog_program.snap | 402 +++ ...e__tests__multi_detuple@surface_graph.snap | 20 + ...multiple_contributors@datalog_program.snap | 547 +++ ...__multiple_contributors@surface_graph.snap | 26 + ...s__non_copy_but_clone@datalog_program.snap | 315 ++ ...sts__non_copy_but_clone@surface_graph.snap | 16 + ..._core__tests__persist@datalog_program.snap | 2996 +++++++++++++++++ ...og_core__tests__persist@surface_graph.snap | 114 + ...s__persist_uniqueness@datalog_program.snap | 824 +++++ ...sts__persist_uniqueness@surface_graph.snap | 31 + ...__tests__send_to_node@datalog_program.snap | 517 +++ ...re__tests__send_to_node@surface_graph.snap | 23 + ..._tests__simple_filter@datalog_program.snap | 349 ++ ...e__tests__simple_filter@surface_graph.snap | 18 + ...single_column_program@datalog_program.snap | 638 ++++ ...__single_column_program@surface_graph.snap | 28 + ...s__transitive_closure@datalog_program.snap | 803 +++++ ...sts__transitive_closure@surface_graph.snap | 37 + ..._triple_relation_join@datalog_program.snap | 970 ++++++ ...s__triple_relation_join@surface_graph.snap | 40 + ...ests__wildcard_fields@datalog_program.snap | 601 ++++ ..._tests__wildcard_fields@surface_graph.snap | 27 + ...__wildcard_join_count@datalog_program.snap | 1434 ++++++++ ...ts__wildcard_join_count@surface_graph.snap | 53 + ...egations_and_comments@datalog_program.snap | 158 +- ...gregations_and_comments@surface_graph.snap | 2 +- ...tions_fold_keyed_expr@datalog_program.snap | 46 +- ...gations_fold_keyed_expr@surface_graph.snap | 2 +- ...ore__tests__anti_join@datalog_program.snap | 108 +- ..._core__tests__anti_join@surface_graph.snap | 2 +- ...e__tests__collect_vec@datalog_program.snap | 74 +- ...ore__tests__collect_vec@surface_graph.snap | 2 +- ..._core__tests__detuple@datalog_program.snap | 36 +- ...og_core__tests__detuple@surface_graph.snap | 2 +- ...ts__detuple_then_flat@datalog_program.snap | 36 +- ...ests__detuple_then_flat@surface_graph.snap | 2 +- ...core__tests__expr_lhs@datalog_program.snap | 84 +- ...g_core__tests__expr_lhs@surface_graph.snap | 2 +- ...tests__expr_predicate@datalog_program.snap | 120 +- ...__tests__expr_predicate@surface_graph.snap | 2 +- ...ts__flat_then_detuple@datalog_program.snap | 36 +- ...ests__flat_then_detuple@surface_graph.snap | 2 +- ..._core__tests__flatten@datalog_program.snap | 36 +- ...og_core__tests__flatten@surface_graph.snap | 2 +- ...og_core__tests__index@datalog_program.snap | 422 +-- ...alog_core__tests__index@surface_graph.snap | 2 +- ...ests__join_with_other@datalog_program.snap | 60 +- ..._tests__join_with_other@surface_graph.snap | 2 +- ...tests__join_with_self@datalog_program.snap | 74 +- ...__tests__join_with_self@surface_graph.snap | 2 +- ...__local_constraints@datalog_program-2.snap | 36 +- ...ts__local_constraints@datalog_program.snap | 36 +- ...ts__local_constraints@surface_graph-2.snap | 2 +- ...ests__local_constraints@surface_graph.snap | 2 +- ...alog_core__tests__max@datalog_program.snap | 46 +- ...atalog_core__tests__max@surface_graph.snap | 2 +- ..._core__tests__max_all@datalog_program.snap | 46 +- ...og_core__tests__max_all@surface_graph.snap | 2 +- ...ests__minimal_program@datalog_program.snap | 36 +- ..._tests__minimal_program@surface_graph.snap | 2 +- ..._tests__multi_detuple@datalog_program.snap | 36 +- ...e__tests__multi_detuple@surface_graph.snap | 2 +- ...multiple_contributors@datalog_program.snap | 46 +- ...__multiple_contributors@surface_graph.snap | 2 +- ...s__non_copy_but_clone@datalog_program.snap | 36 +- ...sts__non_copy_but_clone@surface_graph.snap | 2 +- ..._core__tests__persist@datalog_program.snap | 510 +-- ...og_core__tests__persist@surface_graph.snap | 2 +- ...s__persist_uniqueness@datalog_program.snap | 112 +- ...sts__persist_uniqueness@surface_graph.snap | 2 +- ...__tests__send_to_node@datalog_program.snap | 62 +- ...re__tests__send_to_node@surface_graph.snap | 2 +- ..._tests__simple_filter@datalog_program.snap | 36 +- ...e__tests__simple_filter@surface_graph.snap | 2 +- ...single_column_program@datalog_program.snap | 60 +- ...__single_column_program@surface_graph.snap | 2 +- ...s__transitive_closure@datalog_program.snap | 76 +- ...sts__transitive_closure@surface_graph.snap | 2 +- ..._triple_relation_join@datalog_program.snap | 84 +- ...s__triple_relation_join@surface_graph.snap | 2 +- ...ests__wildcard_fields@datalog_program.snap | 74 +- ..._tests__wildcard_fields@surface_graph.snap | 2 +- ...__wildcard_join_count@datalog_program.snap | 168 +- ...ts__wildcard_join_count@surface_graph.snap | 2 +- .../src/util.rs | 0 {hydroflow_lang => dfir_lang}/CHANGELOG.md | 0 {hydroflow_lang => dfir_lang}/Cargo.toml | 6 +- {hydroflow_lang => dfir_lang}/build.rs | 12 +- .../src/diagnostic.rs | 0 .../src/graph/di_mul_graph.rs | 0 .../src/graph/eliminate_extra_unions_tees.rs | 6 +- .../src/graph/flat_graph_builder.rs | 12 +- .../src/graph/flat_to_partitioned.rs | 20 +- .../src/graph/graph_algorithms.rs | 0 .../src/graph/graph_write.rs | 0 .../src/graph/hydroflow_graph.rs | 22 +- .../src/graph/hydroflow_graph_debugging.rs | 4 +- .../src/graph/mod.rs | 12 +- .../src/graph/ops/_lattice_fold_batch.rs | 2 +- .../src/graph/ops/_lattice_join_fused_join.rs | 16 +- .../src/graph/ops/all_once.rs | 0 .../src/graph/ops/anti_join.rs | 2 +- .../src/graph/ops/anti_join_multiset.rs | 2 +- .../src/graph/ops/assert.rs | 2 +- .../src/graph/ops/assert_eq.rs | 4 +- .../src/graph/ops/batch.rs | 0 .../src/graph/ops/chain.rs | 2 +- .../src/graph/ops/cross_join.rs | 6 +- .../src/graph/ops/cross_join_multiset.rs | 2 +- .../src/graph/ops/cross_singleton.rs | 2 +- .../src/graph/ops/defer_signal.rs | 2 +- .../src/graph/ops/defer_tick.rs | 6 +- .../src/graph/ops/defer_tick_lazy.rs | 0 .../src/graph/ops/demux.rs | 2 +- .../src/graph/ops/demux_enum.rs | 2 +- .../src/graph/ops/dest_file.rs | 2 +- .../src/graph/ops/dest_sink.rs | 12 +- .../src/graph/ops/dest_sink_serde.rs | 8 +- .../src/graph/ops/difference.rs | 2 +- .../src/graph/ops/difference_multiset.rs | 2 +- .../src/graph/ops/enumerate.rs | 2 +- .../src/graph/ops/filter.rs | 2 +- .../src/graph/ops/filter_map.rs | 2 +- .../src/graph/ops/flat_map.rs | 2 +- .../src/graph/ops/flatten.rs | 2 +- .../src/graph/ops/fold.rs | 2 +- .../src/graph/ops/fold_keyed.rs | 8 +- .../src/graph/ops/for_each.rs | 2 +- .../src/graph/ops/identity.rs | 4 +- .../src/graph/ops/initialize.rs | 2 +- .../src/graph/ops/inspect.rs | 2 +- .../src/graph/ops/join.rs | 12 +- .../src/graph/ops/join_fused.rs | 16 +- .../src/graph/ops/join_fused_lhs.rs | 2 +- .../src/graph/ops/join_fused_rhs.rs | 0 .../src/graph/ops/join_multiset.rs | 2 +- .../src/graph/ops/lattice_bimorphism.rs | 2 +- .../src/graph/ops/lattice_fold.rs | 8 +- .../src/graph/ops/lattice_reduce.rs | 6 +- .../src/graph/ops/map.rs | 4 +- .../src/graph/ops/mod.rs | 10 +- .../src/graph/ops/multiset_delta.rs | 4 +- .../src/graph/ops/next_stratum.rs | 0 .../src/graph/ops/null.rs | 2 +- .../src/graph/ops/partition.rs | 4 +- .../src/graph/ops/persist.rs | 8 +- .../src/graph/ops/persist_mut.rs | 4 +- .../src/graph/ops/persist_mut_keyed.rs | 4 +- .../src/graph/ops/py_udf.rs | 4 +- .../src/graph/ops/reduce.rs | 2 +- .../src/graph/ops/reduce_keyed.rs | 6 +- .../src/graph/ops/sort.rs | 2 +- .../src/graph/ops/sort_by_key.rs | 2 +- .../src/graph/ops/source_file.rs | 2 +- .../src/graph/ops/source_interval.rs | 10 +- .../src/graph/ops/source_iter.rs | 2 +- .../src/graph/ops/source_json.rs | 4 +- .../src/graph/ops/source_stdin.rs | 2 +- .../src/graph/ops/source_stream.rs | 4 +- .../src/graph/ops/source_stream_serde.rs | 6 +- .../src/graph/ops/spin.rs | 2 +- .../src/graph/ops/state.rs | 2 +- .../src/graph/ops/state_by.rs | 2 +- .../src/graph/ops/tee.rs | 2 +- .../src/graph/ops/union.rs | 2 +- .../src/graph/ops/unique.rs | 6 +- .../src/graph/ops/unzip.rs | 2 +- .../src/graph/ops/zip.rs | 2 +- .../src/graph/ops/zip_longest.rs | 2 +- {hydroflow_lang => dfir_lang}/src/lib.rs | 0 {hydroflow_lang => dfir_lang}/src/parse.rs | 0 .../src/pretty_span.rs | 2 +- .../src/process_singletons.rs | 0 .../src/union_find.rs | 0 {hydroflow_macro => dfir_macro}/CHANGELOG.md | 0 {hydroflow_macro => dfir_macro}/Cargo.toml | 10 +- {hydroflow_macro => dfir_macro}/build.rs | 8 +- {hydroflow_macro => dfir_macro}/src/lib.rs | 40 +- {hydroflow => dfir_rs}/.gitignore | 0 {hydroflow => dfir_rs}/CHANGELOG.md | 0 {hydroflow => dfir_rs}/Cargo.toml | 23 +- {hydroflow => dfir_rs}/README.md | 0 .../covid_tracing/README.md | 0 .../deprecated_examples/covid_tracing/main.rs | 16 +- .../covid_tracing/people.rs | 0 .../covid_tracing_dist/database.rs | 18 +- .../covid_tracing_dist/main.rs | 4 +- .../covid_tracing_dist/people.rs | 0 .../covid_tracing_dist/tracker.rs | 14 +- {hydroflow => dfir_rs}/example.json | 0 .../example_utils/chat_driver.py | 0 {hydroflow => dfir_rs}/example_utils/web2a | 0 .../examples/chat/README.md | 28 +- .../examples/chat/client.rs | 6 +- {hydroflow => dfir_rs}/examples/chat/main.rs | 10 +- .../examples/chat/protocol.rs | 2 +- .../chat/randomized_gossiping_server.rs | 8 +- .../examples/chat/server.rs | 8 +- .../examples/deadlock_detector/README.md | 0 .../examples/deadlock_detector/helpers.rs | 0 .../examples/deadlock_detector/main.rs | 6 +- .../examples/deadlock_detector/peer.rs | 8 +- .../examples/deadlock_detector/peers.json | 0 .../examples/deadlock_detector/protocol.rs | 0 .../examples/echo_serde_json/README.md | 0 .../examples/echo_serde_json/client.rs | 6 +- .../examples/echo_serde_json/helpers.rs | 0 .../examples/echo_serde_json/main.rs | 6 +- .../examples/echo_serde_json/protocol.rs | 0 .../examples/echo_serde_json/server.rs | 8 +- .../examples/echoserver/README.md | 0 .../examples/echoserver/client.rs | 6 +- .../examples/echoserver/main.rs | 6 +- .../examples/echoserver/protocol.rs | 0 .../examples/echoserver/server.rs | 8 +- .../examples/example_1_simplest.rs | 4 +- .../examples/example_2_simple_1.rs | 4 +- .../examples/example_2_simple_2.rs | 4 +- .../examples/example_3_stream.rs | 6 +- .../examples/example_4_neighbors.rs | 6 +- .../examples/example_5_reachability.rs | 6 +- .../examples/example_6_unreachability.rs | 6 +- .../examples/example_naturals.rs | 4 +- .../examples/example_surface_flows_1_basic.rs | 4 +- .../example_surface_flows_2_varname.rs | 4 +- .../examples/example_surface_flows_3_ports.rs | 4 +- .../example_surface_flows_4_context.rs | 4 +- .../examples/example_syntax_empty.rs | 4 +- .../examples/example_syntax_hello_world.rs | 4 +- .../examples/example_syntax_input.rs | 6 +- dfir_rs/examples/example_syntax_output.rs | 13 + .../examples/hello_world/README.md | 0 .../examples/hello_world/main.rs | 4 +- {hydroflow => dfir_rs}/examples/kvs/README.md | 0 {hydroflow => dfir_rs}/examples/kvs/client.rs | 6 +- .../examples/kvs/helpers.rs | 0 {hydroflow => dfir_rs}/examples/kvs/main.rs | 8 +- .../examples/kvs/protocol.rs | 2 +- {hydroflow => dfir_rs}/examples/kvs/server.rs | 8 +- .../examples/kvs_bench/README.md | 0 .../examples/kvs_bench/buffer_pool/mod.rs | 0 .../kvs_bench/buffer_pool/serialization.rs | 0 .../examples/kvs_bench/main.rs | 6 +- .../examples/kvs_bench/protocol/mod.rs | 0 .../kvs_request_delete_visitor.rs | 0 .../serialization/kvs_request_get_visitor.rs | 0 .../kvs_request_gossip_visitor.rs | 0 .../serialization/kvs_request_put_visitor.rs | 0 .../serialization/lattices/map_union.rs | 0 .../protocol/serialization/lattices/mod.rs | 0 .../lattices/my_last_write_wins.rs | 0 .../protocol/serialization/lattices/point.rs | 0 .../serialization/lattices/with_bot.rs | 0 .../kvs_bench/protocol/serialization/mod.rs | 0 .../kvs_bench/protocol/test/magic_buffer.rs | 0 .../examples/kvs_bench/protocol/test/mod.rs | 0 .../examples/kvs_bench/protocol/test/util.rs | 0 .../examples/kvs_bench/server.rs | 18 +- .../examples/kvs_mut/README.md | 0 .../examples/kvs_mut/client.rs | 6 +- .../examples/kvs_mut/helpers.rs | 0 .../examples/kvs_mut/main.rs | 8 +- .../examples/kvs_mut/protocol.rs | 2 +- .../examples/kvs_mut/server.rs | 8 +- .../examples/kvs_replicated/README.md | 0 .../examples/kvs_replicated/client.rs | 6 +- .../examples/kvs_replicated/helpers.rs | 0 .../examples/kvs_replicated/main.rs | 8 +- .../examples/kvs_replicated/protocol.rs | 2 +- .../examples/kvs_replicated/server.rs | 8 +- .../examples/lamport_clock/README.md | 0 .../examples/lamport_clock/client.rs | 8 +- .../examples/lamport_clock/main.rs | 8 +- .../examples/lamport_clock/protocol.rs | 2 +- .../examples/lamport_clock/server.rs | 10 +- .../examples/python_udf/main.rs | 6 +- {hydroflow => dfir_rs}/examples/rga/README.md | 0 .../examples/rga/adjacency.rs | 8 +- .../examples/rga/datalog.rs | 8 +- .../examples/rga/datalog_agg.rs | 8 +- {hydroflow => dfir_rs}/examples/rga/main.rs | 14 +- .../examples/rga/minimal.rs | 8 +- .../examples/rga/protocol.rs | 0 .../examples/shopping/README.md | 0 .../examples/shopping/driver.rs | 16 +- .../examples/shopping/flows/bp_flow.rs | 10 +- .../shopping/flows/client_state_flow.rs | 12 +- .../examples/shopping/flows/listener_flow.rs | 10 +- .../examples/shopping/flows/mod.rs | 0 .../examples/shopping/flows/orig_flow.rs | 8 +- .../shopping/flows/push_group_flow.rs | 10 +- .../shopping/flows/rep_server_flow.rs | 14 +- .../shopping/flows/server_state_flow.rs | 12 +- .../examples/shopping/flows/ssiv_flow.rs | 10 +- .../examples/shopping/lattices.rs | 2 +- .../examples/shopping/main.rs | 6 +- .../examples/shopping/misc/replicated2.dot | 0 .../examples/shopping/misc/replicated2.pdf | Bin .../examples/shopping/structs.rs | 0 .../examples/shopping/test_data.rs | 0 .../examples/shopping/wrappers.rs | 0 .../examples/three_clique/README.md | 0 .../examples/three_clique/main.rs | 10 +- .../examples/two_pc_hf/README.md | 0 .../examples/two_pc_hf/coordinator.rs | 18 +- .../examples/two_pc_hf/helpers.rs | 0 .../examples/two_pc_hf/main.rs | 8 +- .../examples/two_pc_hf/members.json | 0 .../examples/two_pc_hf/protocol.rs | 0 .../examples/two_pc_hf/subordinate.rs | 8 +- .../examples/vector_clock/README.md | 0 .../examples/vector_clock/client.rs | 6 +- .../examples/vector_clock/main.rs | 6 +- .../examples/vector_clock/protocol.rs | 0 .../examples/vector_clock/server.rs | 8 +- {hydroflow => dfir_rs}/src/compiled/mod.rs | 0 .../src/compiled/pull/anti_join.rs | 0 .../src/compiled/pull/cross_join.rs | 0 .../src/compiled/pull/half_join_state/fold.rs | 0 .../pull/half_join_state/fold_from.rs | 0 .../src/compiled/pull/half_join_state/mod.rs | 0 .../compiled/pull/half_join_state/multiset.rs | 0 .../compiled/pull/half_join_state/reduce.rs | 0 .../src/compiled/pull/half_join_state/set.rs | 0 .../src/compiled/pull/mod.rs | 0 .../src/compiled/pull/symmetric_hash_join.rs | 0 .../src/declarative_macro.rs | 6 +- {hydroflow => dfir_rs}/src/lib.rs | 22 +- .../src/scheduled/context.rs | 0 {hydroflow => dfir_rs}/src/scheduled/graph.rs | 34 +- .../src/scheduled/graph_ext.rs | 6 +- .../src/scheduled/handoff/handoff_list.rs | 0 .../src/scheduled/handoff/mod.rs | 0 .../src/scheduled/handoff/tee.rs | 0 .../src/scheduled/handoff/vector.rs | 0 {hydroflow => dfir_rs}/src/scheduled/input.rs | 0 {hydroflow => dfir_rs}/src/scheduled/mod.rs | 8 +- .../src/scheduled/net/mod.rs | 4 +- .../src/scheduled/net/network_vertex.rs | 4 +- {hydroflow => dfir_rs}/src/scheduled/port.rs | 12 +- {hydroflow => dfir_rs}/src/scheduled/query.rs | 6 +- .../src/scheduled/reactor.rs | 2 +- {hydroflow => dfir_rs}/src/scheduled/state.rs | 4 +- .../src/scheduled/subgraph.rs | 0 {hydroflow => dfir_rs}/src/scheduled/ticks.rs | 12 +- {hydroflow => dfir_rs}/src/util/clear.rs | 0 {hydroflow => dfir_rs}/src/util/demux_enum.rs | 4 +- {hydroflow => dfir_rs}/src/util/deploy.rs | 4 +- {hydroflow => dfir_rs}/src/util/mod.rs | 6 +- {hydroflow => dfir_rs}/src/util/monotonic.rs | 0 .../src/util/monotonic_map.rs | 0 {hydroflow => dfir_rs}/src/util/multiset.rs | 0 {hydroflow => dfir_rs}/src/util/simulation.rs | 22 +- {hydroflow => dfir_rs}/src/util/socket.rs | 0 {hydroflow => dfir_rs}/src/util/sparse_vec.rs | 0 {hydroflow => dfir_rs}/src/util/tcp.rs | 0 {hydroflow => dfir_rs}/src/util/udp.rs | 0 {hydroflow => dfir_rs}/src/util/unsync/mod.rs | 0 .../src/util/unsync/mpsc.rs | 0 .../tests/compile-fail/datalog_badparse.rs | 2 +- .../compile-fail/datalog_badparse.stderr | 0 .../compile-fail/datalog_filter_badtypes.rs | 2 +- .../datalog_filter_badtypes.stderr | 0 .../compile-fail/datalog_join_badtypes.rs | 2 +- .../compile-fail/datalog_join_badtypes.stderr | 0 .../surface_anti_join_badtypes.rs | 4 +- .../surface_anti_join_badtypes.stderr | 0 .../compile-fail/surface_badgeneric_both.rs | 4 +- .../surface_badgeneric_both.stderr | 0 .../compile-fail/surface_badgeneric_extra.rs | 4 +- .../surface_badgeneric_extra.stderr | 0 .../surface_badgeneric_lifetime.rs | 4 +- .../surface_badgeneric_lifetime.stderr | 0 .../surface_badgeneric_nocolon.rs | 4 +- .../surface_badgeneric_nocolon.stderr | 0 .../compile-fail/surface_badgeneric_type.rs | 4 +- .../surface_badgeneric_type.stderr | 0 .../compile-fail/surface_conflicting_name.rs | 4 +- .../surface_conflicting_name.stderr | 0 .../compile-fail/surface_degenerate_merge.rs | 8 + .../surface_degenerate_merge.stderr | 0 .../compile-fail/surface_degenerate_null.rs | 4 +- .../surface_degenerate_null.stderr | 0 .../compile-fail/surface_degenerate_tee.rs | 8 + .../surface_degenerate_tee.stderr | 0 .../compile-fail/surface_demux_badarg.rs | 4 +- .../compile-fail/surface_demux_badarg.stderr | 0 .../compile-fail/surface_demux_badclosure.rs | 4 +- .../surface_demux_badclosure.stderr | 6 +- .../surface_demux_port_duplicate.rs | 4 +- .../surface_demux_port_duplicate.stderr | 6 +- .../compile-fail/surface_demux_port_elided.rs | 4 +- .../surface_demux_port_elided.stderr | 6 +- .../compile-fail/surface_demux_port_extra.rs | 4 +- .../surface_demux_port_extra.stderr | 6 +- .../surface_demux_port_extramissing.rs | 4 +- .../surface_demux_port_extramissing.stderr | 6 +- .../surface_demux_port_missing.rs | 4 +- .../surface_demux_port_missing.stderr | 6 +- .../surface_demuxenum_missingtypeparam.rs | 6 +- .../surface_demuxenum_missingtypeparam.stderr | 0 .../compile-fail/surface_demuxenum_notenum.rs | 4 +- .../surface_demuxenum_notenum.stderr | 2 +- .../surface_demuxenum_port_duplicate.rs | 6 +- .../surface_demuxenum_port_duplicate.stderr | 0 .../surface_demuxenum_port_duplicate_one.rs | 6 +- ...urface_demuxenum_port_duplicate_one.stderr | 0 .../surface_demuxenum_port_elided.rs | 6 +- .../surface_demuxenum_port_elided.stderr | 0 .../surface_demuxenum_port_extra.rs | 6 +- .../surface_demuxenum_port_extra.stderr | 0 .../surface_demuxenum_port_extra_zero.rs | 6 +- .../surface_demuxenum_port_extra_zero.stderr | 0 .../surface_demuxenum_port_extramissing.rs | 6 +- ...surface_demuxenum_port_extramissing.stderr | 0 .../surface_demuxenum_port_missing.rs | 6 +- .../surface_demuxenum_port_missing.stderr | 0 .../surface_demuxenum_port_missing_one.rs | 6 +- .../surface_demuxenum_port_missing_one.stderr | 0 .../surface_demuxenum_port_wrong_one.rs | 6 +- .../surface_demuxenum_port_wrong_one.stderr | 0 .../surface_demuxenum_wrongenum.rs | 6 +- .../surface_demuxenum_wrongenum.stderr | 2 +- .../surface_demuxenum_wrongfields_1.rs | 6 +- .../surface_demuxenum_wrongfields_1.stderr | 0 .../surface_demuxenum_wrongfields_2.rs | 6 +- .../surface_demuxenum_wrongfields_2.stderr | 0 .../surface_demuxenum_wrongtype.rs | 6 +- .../surface_demuxenum_wrongtype.stderr | 0 .../surface_dest_sink_baditem.ci.stderr | 0 .../surface_dest_sink_baditem.rs.ignore | 8 +- .../surface_dest_sink_baditem.stderr | 0 .../surface_dest_sink_badsink.rs.ignore | 4 +- .../surface_dest_sink_badsink.stderr | 28 + .../surface_fold_keyed_badtype_int.rs | 2 +- .../surface_fold_keyed_badtype_int.stderr | 0 .../surface_fold_keyed_badtype_option.rs | 2 +- .../surface_fold_keyed_badtype_option.stderr | 0 .../surface_fold_keyed_generics_bad.ci.stderr | 4 +- .../surface_fold_keyed_generics_bad.rs.ignore | 2 +- .../surface_fold_keyed_generics_bad.stderr | 4 +- .../surface_fold_keyed_generics_extra.rs | 4 +- .../surface_fold_keyed_generics_extra.stderr | 6 +- .../surface_forwardref_chain_double.rs | 4 +- .../surface_forwardref_chain_double.stderr | 0 .../surface_forwardref_chain_single.rs | 4 +- .../surface_forwardref_chain_single.stderr | 0 .../compile-fail/surface_forwardref_self1.rs | 8 + .../surface_forwardref_self1.stderr | 0 .../compile-fail/surface_forwardref_self2.rs | 4 +- .../surface_forwardref_self2.stderr | 0 .../surface_forwardref_self2_indirect.rs | 4 +- .../surface_forwardref_self2_indirect.stderr | 0 .../compile-fail/surface_forwardref_self3.rs | 4 +- .../surface_forwardref_self3.stderr | 0 .../surface_identity_wronggeneric.rs | 4 +- .../surface_identity_wronggeneric.stderr | 0 .../compile-fail/surface_join_badtypes.rs | 4 +- .../compile-fail/surface_join_badtypes.stderr | 0 .../surface_join_generics_extra.rs | 4 +- .../surface_join_generics_extra.stderr | 0 .../surface_join_persistence_bad.rs | 4 +- .../surface_join_persistence_bad.stderr | 0 .../surface_join_persistence_extra.rs | 4 +- .../surface_join_persistence_extra.stderr | 0 .../surface_lattice_fold_badgeneric.rs.ignore | 4 +- .../surface_lattice_fold_badgeneric.stderr | 8 +- .../surface_lattice_fold_noarg.rs | 10 + .../surface_lattice_fold_noarg.stderr | 8 +- .../surface_lattice_fold_wronggeneric.rs | 10 + .../surface_lattice_fold_wronggeneric.stderr | 4 +- ...urface_lattice_reduce_badgeneric.rs.ignore | 4 +- .../surface_lattice_reduce_badgeneric.stderr | 8 +- .../surface_lattice_reduce_wronggeneric.rs | 10 + ...surface_lattice_reduce_wronggeneric.stderr | 4 +- .../surface_latticereduce_wronggeneric.stderr | 4 +- .../tests/compile-fail/surface_loop_cycle.rs | 2 +- .../compile-fail/surface_loop_cycle.stderr | 0 .../surface_loop_missing_unwindowing.rs | 2 +- .../surface_loop_missing_unwindowing.stderr | 0 .../surface_loop_missing_windowing.rs | 2 +- .../surface_loop_missing_windowing.stderr | 0 .../surface_loop_multiple_window.rs | 2 +- .../surface_loop_multiple_window.stderr | 0 .../tests/compile-fail/surface_loop_source.rs | 2 +- .../compile-fail/surface_loop_source.stderr | 0 .../compile-fail/surface_map_badtypes.rs | 4 +- .../compile-fail/surface_map_badtypes.stderr | 0 .../compile-fail/surface_merge_badtypes.rs | 4 +- .../surface_merge_badtypes.stderr | 0 .../compile-fail/surface_missing_args.rs | 4 +- .../compile-fail/surface_missing_args.stderr | 0 .../compile-fail/surface_negative_loop.rs | 4 +- .../compile-fail/surface_negative_loop.stderr | 0 dfir_rs/tests/compile-fail/surface_null.rs | 8 + .../tests/compile-fail/surface_null.stderr | 0 .../compile-fail/surface_partition_badarg.rs | 4 +- .../surface_partition_badarg.stderr | 0 .../surface_partition_badclosure.rs | 4 +- .../surface_partition_badclosure.stderr | 0 .../surface_partition_port_duplicate.rs | 4 +- .../surface_partition_port_duplicate.stderr | 0 .../surface_partition_port_elided.rs | 4 +- .../surface_partition_port_elided.stderr | 0 .../surface_partition_port_extra.rs | 4 +- .../surface_partition_port_extra.stderr | 0 .../surface_partition_port_extramissing.rs | 4 +- ...surface_partition_port_extramissing.stderr | 0 .../surface_partition_port_inconsistent.rs | 4 +- ...surface_partition_port_inconsistent.stderr | 0 .../surface_partition_port_indexgap.rs | 4 +- .../surface_partition_port_indexgap.stderr | 0 .../surface_partition_port_missing.rs | 4 +- .../surface_partition_port_missing.stderr | 0 .../compile-fail/surface_port_conflict.rs | 4 +- .../compile-fail/surface_port_conflict.stderr | 0 .../tests/compile-fail/surface_port_join.rs | 4 +- .../compile-fail/surface_port_join.stderr | 0 .../surface_port_join_forwardref.rs | 4 +- .../surface_port_join_forwardref.stderr | 0 .../surface_port_naked_overwrite_knot_a.rs | 4 +- ...surface_port_naked_overwrite_knot_a.stderr | 0 ..._port_naked_overwrite_knot_a_forwardref.rs | 4 +- ...t_naked_overwrite_knot_a_forwardref.stderr | 0 ...surface_port_naked_overwrite_knot_b_inn.rs | 4 +- ...ace_port_naked_overwrite_knot_b_inn.stderr | 0 ...surface_port_naked_overwrite_knot_b_out.rs | 4 +- ...ace_port_naked_overwrite_knot_b_out.stderr | 0 .../surface_port_naked_overwrite_simple.rs | 4 +- ...surface_port_naked_overwrite_simple.stderr | 0 .../compile-fail/surface_port_unused_both.rs | 4 +- .../surface_port_unused_both.stderr | 0 .../surface_port_unused_both_indirect.rs | 4 +- .../surface_port_unused_both_indirect.stderr | 0 .../surface_port_unused_both_parens.rs | 4 +- .../surface_port_unused_both_parens.stderr | 0 .../compile-fail/surface_port_unused_in.rs | 4 +- .../surface_port_unused_in.stderr | 0 .../compile-fail/surface_port_unused_out.rs | 4 +- .../surface_port_unused_out.stderr | 0 .../surface_reduce_keyed_badtype_int.rs | 2 +- .../surface_reduce_keyed_badtype_int.stderr | 0 .../surface_reduce_keyed_badtype_option.rs | 2 +- ...surface_reduce_keyed_badtype_option.stderr | 0 .../compile-fail/surface_singleton_badexpr.rs | 2 +- .../surface_singleton_badexpr.stderr | 0 .../compile-fail/surface_singleton_nostate.rs | 2 +- .../surface_singleton_nostate.stderr | 0 .../surface_singleton_nostate_undefined.rs | 2 +- ...surface_singleton_nostate_undefined.stderr | 0 .../surface_singleton_undefined.rs | 2 +- .../surface_singleton_undefined.stderr | 0 .../surface_singleton_undefined_nostate.rs | 2 +- ...surface_singleton_undefined_nostate.stderr | 0 .../surface_source_interval_badarg.rs | 6 +- .../surface_source_interval_badarg.stderr | 0 .../surface_source_iter_badtype.rs.ignore | 4 +- .../surface_source_iter_badtype.stderr | 0 .../compile-fail/surface_syntax_eol_arrow.rs | 4 +- .../surface_syntax_eol_arrow.stderr | 4 +- .../surface_syntax_eol_indexing.rs | 4 +- .../surface_syntax_eol_indexing.stderr | 4 +- .../surface_syntax_eol_missingop.rs | 4 +- .../surface_syntax_eol_missingop.stderr | 0 .../compile-fail/surface_syntax_eol_op.rs | 4 +- .../compile-fail/surface_syntax_eol_op.stderr | 4 +- .../surface_syntax_indexing_empty.rs | 4 +- .../surface_syntax_indexing_empty.stderr | 0 .../surface_syntax_noarrow_indexing.rs | 4 +- .../surface_syntax_noarrow_indexing.stderr | 0 .../compile-fail/surface_syntax_noarrow_op.rs | 4 +- .../surface_syntax_noarrow_op.stderr | 0 .../surface_syntax_noarrow_paren.rs | 4 +- .../surface_syntax_noarrow_paren.stderr | 0 .../compile-fail/surface_syntax_paren.rs | 4 +- .../compile-fail/surface_syntax_paren.stderr | 0 .../surface_syntax_paren_arrow.rs | 4 +- .../surface_syntax_paren_arrow.stderr | 0 .../surface_syntax_paren_indexing.rs | 4 +- .../surface_syntax_paren_indexing.stderr | 0 .../surface_syntax_paren_missingop.rs | 4 +- .../surface_syntax_paren_missingop.stderr | 0 .../surface_syntax_paren_noarrow_op.rs | 4 +- .../surface_syntax_paren_noarrow_op.stderr | 0 .../surface_syntax_paren_noarrow_paren.rs | 4 +- .../surface_syntax_paren_noarrow_paren.stderr | 0 .../surface_syntax_paren_semicolon.rs | 4 +- .../surface_syntax_paren_semicolon.stderr | 0 .../compile-fail/surface_unknown_operators.rs | 4 +- .../surface_unknown_operators.stderr | 0 .../tests/compile-fail/surface_use_bad1.rs | 4 +- .../compile-fail/surface_use_bad1.stderr | 0 .../tests/compile-fail/surface_use_bad2.rs | 4 +- .../compile-fail/surface_use_bad2.stderr | 0 .../tests/compile-fail/surface_use_bad3.rs | 4 +- .../compile-fail/surface_use_bad3.stderr | 0 .../tests/compile-fail/surface_use_unknown.rs | 4 +- .../compile-fail/surface_use_unknown.stderr | 0 .../compile-fail/surface_varname_undefined.rs | 4 +- .../surface_varname_undefined.stderr | 0 .../tests/datalog_compile_fail.rs | 0 .../tests/datalog_frontend.rs | 242 +- .../tests/datalog_minimal.rs | 8 +- {hydroflow => dfir_rs}/tests/groupby.rs | 12 +- .../tests/scheduled_teeing_handoff.rs | 14 +- .../tests/scheduled_test.rs | 38 +- .../surface_async__echo@graphvis_dot.snap | 0 .../surface_async__echo@graphvis_mermaid.snap | 0 .../surface_batch__basic_2@graphvis_dot.snap | 0 ...rface_batch__basic_2@graphvis_mermaid.snap | 0 ...ce_book__surface_flows_1@graphvis_dot.snap | 0 ...ook__surface_flows_1@graphvis_mermaid.snap | 0 ...surface_codegen__basic_2@graphvis_dot.snap | 0 ...ace_codegen__basic_2@graphvis_mermaid.snap | 0 ...surface_codegen__basic_3@graphvis_dot.snap | 0 ...ace_codegen__basic_3@graphvis_mermaid.snap | 0 ...ace_codegen__basic_union@graphvis_dot.snap | 0 ...codegen__basic_union@graphvis_mermaid.snap | 0 ...e_codegen__covid_tracing@graphvis_dot.snap | 0 ...degen__covid_tracing@graphvis_mermaid.snap | 0 ...rface_codegen__recv_expr@graphvis_dot.snap | 0 ...e_codegen__recv_expr@graphvis_mermaid.snap | 0 .../surface_codegen__sort@graphvis_dot.snap | 0 ...urface_codegen__sort@graphvis_mermaid.snap | 0 ...ace_codegen__sort_by_key@graphvis_dot.snap | 0 ...codegen__sort_by_key@graphvis_mermaid.snap | 0 ...x_reachability_generated@graphvis_dot.snap | 0 ...achability_generated@graphvis_mermaid.snap | 0 ...egen__transitive_closure@graphvis_dot.snap | 0 ...__transitive_closure@graphvis_mermaid.snap | 0 ...ntext_current_tick_start@graphvis_dot.snap | 4 +- ...t_current_tick_start@graphvis_mermaid.snap | 4 +- ...time_between_ticks_async@graphvis_dot.snap | 0 ..._between_ticks_async@graphvis_mermaid.snap | 0 ...ace_context__context_mut@graphvis_dot.snap | 0 ...context__context_mut@graphvis_mermaid.snap | 0 ...ace_context__context_ref@graphvis_dot.snap | 0 ...context__context_ref@graphvis_mermaid.snap | 0 ...e_cross_singleton__basic@graphvis_dot.snap | 0 ...oss_singleton__basic@graphvis_mermaid.snap | 0 ...gleton__union_defer_tick@graphvis_dot.snap | 0 ...on__union_defer_tick@graphvis_mermaid.snap | 0 ...ce__diff_multiset_static@graphvis_dot.snap | 0 ...diff_multiset_static@graphvis_mermaid.snap | 0 ...iff_multiset_static_tick@graphvis_dot.snap | 0 ...multiset_static_tick@graphvis_mermaid.snap | 0 ...iff_multiset_tick_static@graphvis_dot.snap | 0 ...multiset_tick_static@graphvis_mermaid.snap | 0 ...ce__diff_multiset_timing@graphvis_dot.snap | 0 ...diff_multiset_timing@graphvis_mermaid.snap | 0 ..._difference__diff_static@graphvis_dot.snap | 0 ...ference__diff_static@graphvis_mermaid.snap | 0 ..._difference__diff_timing@graphvis_dot.snap | 0 ...ference__diff_timing@graphvis_mermaid.snap | 0 .../surface_examples__example_1_simplest.snap | 0 .../surface_examples__example_2_simple_1.snap | 0 .../surface_examples__example_2_simple_2.snap | 0 .../surface_examples__example_3_stream.snap | 0 ...surface_examples__example_4_neighbors.snap | 0 ...face_examples__example_5_reachability.snap | 0 ...ce_examples__example_6_unreachability.snap | 0 .../surface_examples__example_naturals.snap | 0 ...amples__example_surface_flows_1_basic.snap | 0 ...ples__example_surface_flows_2_varname.snap | 0 ...amples__example_surface_flows_3_ports.snap | 0 ...ples__example_surface_flows_4_context.snap | 0 ...urface_examples__example_syntax_empty.snap | 0 ..._examples__example_syntax_hello_world.snap | 0 ...urface_examples__example_syntax_input.snap | 0 ...rface_examples__example_syntax_output.snap | 0 ...urface_flow_props__basic@graphvis_dot.snap | 0 ...ce_flow_props__basic@graphvis_mermaid.snap | 0 ...low_props__union_warning@graphvis_dot.snap | 0 ...props__union_warning@graphvis_mermaid.snap | 0 .../surface_fold__fold_sort@graphvis_dot.snap | 0 ...face_fold__fold_sort@graphvis_mermaid.snap | 0 ...urface_fold__fold_static@graphvis_dot.snap | 0 ...ce_fold__fold_static@graphvis_mermaid.snap | 0 ...e_fold__fold_static_join@graphvis_dot.snap | 0 ...ld__fold_static_join@graphvis_mermaid.snap | 0 .../surface_fold__fold_tick@graphvis_dot.snap | 0 ...face_fold__fold_tick@graphvis_mermaid.snap | 0 ...__fold_keyed_infer_basic@graphvis_dot.snap | 0 ...ld_keyed_infer_basic@graphvis_mermaid.snap | 0 ...keyed__fold_keyed_static@graphvis_dot.snap | 0 ...d__fold_keyed_static@graphvis_mermaid.snap | 0 ...d_keyed__fold_keyed_tick@graphvis_dot.snap | 0 ...yed__fold_keyed_tick@graphvis_mermaid.snap | 0 ...orwardref_basic_backward@graphvis_dot.snap | 0 ...rdref_basic_backward@graphvis_mermaid.snap | 0 ...forwardref_basic_forward@graphvis_dot.snap | 0 ...ardref_basic_forward@graphvis_mermaid.snap | 0 ..._forwardref_basic_middle@graphvis_dot.snap | 0 ...wardref_basic_middle@graphvis_mermaid.snap | 0 ...face_join__static_static@graphvis_dot.snap | 0 ..._join__static_static@graphvis_mermaid.snap | 0 ...urface_join__static_tick@graphvis_dot.snap | 0 ...ce_join__static_tick@graphvis_mermaid.snap | 0 ...urface_join__tick_static@graphvis_dot.snap | 0 ...ce_join__tick_static@graphvis_mermaid.snap | 0 .../surface_join__tick_tick@graphvis_dot.snap | 0 ...face_join__tick_tick@graphvis_mermaid.snap | 0 ...s_blocking_rhs_streaming@graphvis_dot.snap | 0 ...ocking_rhs_streaming@graphvis_mermaid.snap | 0 ...s_streaming_rhs_blocking@graphvis_dot.snap | 0 ...reaming_rhs_blocking@graphvis_mermaid.snap | 0 ...s_blocking_rhs_streaming@graphvis_dot.snap | 0 ...ocking_rhs_streaming@graphvis_mermaid.snap | 0 ...s_streaming_rhs_blocking@graphvis_dot.snap | 0 ...reaming_rhs_blocking@graphvis_mermaid.snap | 0 ...s_blocking_rhs_streaming@graphvis_dot.snap | 0 ...ocking_rhs_streaming@graphvis_mermaid.snap | 0 ...tick_lhs_fold_rhs_reduce@graphvis_dot.snap | 0 ..._lhs_fold_rhs_reduce@graphvis_mermaid.snap | 0 ...s_streaming_rhs_blocking@graphvis_dot.snap | 0 ...reaming_rhs_blocking@graphvis_mermaid.snap | 0 ...phism__cartesian_product@graphvis_dot.snap | 0 ...m__cartesian_product@graphvis_mermaid.snap | 0 ...__cartesian_product_1401@graphvis_dot.snap | 0 ...rtesian_product_1401@graphvis_mermaid.snap | 0 ...esian_product_tick_state@graphvis_dot.snap | 0 ...n_product_tick_state@graphvis_mermaid.snap | 0 ...lattice_bimorphism__join@graphvis_dot.snap | 0 ...ice_bimorphism__join@graphvis_mermaid.snap | 0 ...esian_product_multi_tick@graphvis_dot.snap | 0 ...n_product_multi_tick@graphvis_mermaid.snap | 0 ...duct_multi_tick_identity@graphvis_dot.snap | 0 ..._multi_tick_identity@graphvis_mermaid.snap | 0 ...n_product_multi_tick_tee@graphvis_dot.snap | 0 ...oduct_multi_tick_tee@graphvis_mermaid.snap | 0 ...surface_loop__flo_nested@graphvis_dot.snap | 0 ...ace_loop__flo_nested@graphvis_mermaid.snap | 0 ...surface_loop__flo_syntax@graphvis_dot.snap | 0 ...ace_loop__flo_syntax@graphvis_mermaid.snap | 0 ...et_delta__multiset_delta@graphvis_dot.snap | 0 ...elta__multiset_delta@graphvis_mermaid.snap | 0 ...surface_persist__persist@graphvis_dot.snap | 0 ...ace_persist__persist@graphvis_mermaid.snap | 0 ...e_persist__persist_basic@graphvis_dot.snap | 0 ...rsist__persist_basic@graphvis_mermaid.snap | 0 ...ace_persist__persist_mut@graphvis_dot.snap | 0 ...persist__persist_mut@graphvis_mermaid.snap | 0 ...rsist__persist_mut_keyed@graphvis_dot.snap | 0 ...t__persist_mut_keyed@graphvis_mermaid.snap | 0 ...ce_persist__persist_pull@graphvis_dot.snap | 0 ...ersist__persist_pull@graphvis_mermaid.snap | 0 ...ce_persist__persist_push@graphvis_dot.snap | 0 ...ersist__persist_push@graphvis_mermaid.snap | 0 ...ist__persist_replay_join@graphvis_dot.snap | 0 ..._persist_replay_join@graphvis_mermaid.snap | 0 ...ace_python__python_basic@graphvis_dot.snap | 0 ...python__python_basic@graphvis_mermaid.snap | 0 ...on__python_too_many_args@graphvis_dot.snap | 0 ...python_too_many_args@graphvis_mermaid.snap | 0 ..._python__python_two_args@graphvis_dot.snap | 0 ...hon__python_two_args@graphvis_mermaid.snap | 0 .../surface_reduce__reduce@graphvis_dot.snap | 0 ...rface_reduce__reduce@graphvis_mermaid.snap | 0 ...ce_reduce__reduce_static@graphvis_dot.snap | 0 ...educe__reduce_static@graphvis_mermaid.snap | 0 ...rface_reduce__reduce_sum@graphvis_dot.snap | 0 ...e_reduce__reduce_sum@graphvis_mermaid.snap | 0 ...face_reduce__reduce_tick@graphvis_dot.snap | 0 ..._reduce__reduce_tick@graphvis_mermaid.snap | 0 ...ssue_800_1050_fold_keyed@graphvis_dot.snap | 0 ..._800_1050_fold_keyed@graphvis_mermaid.snap | 0 ...__issue_800_1050_persist@graphvis_dot.snap | 0 ...sue_800_1050_persist@graphvis_mermaid.snap | 0 ...ue_800_1050_reduce_keyed@graphvis_dot.snap | 0 ...00_1050_reduce_keyed@graphvis_mermaid.snap | 0 ...duling__nospin_issue_961@graphvis_dot.snap | 0 ...ng__nospin_issue_961@graphvis_mermaid.snap | 0 ...in_issue_961_complicated@graphvis_dot.snap | 0 ...ssue_961_complicated@graphvis_mermaid.snap | 0 ...ersist_stratum_run_async@graphvis_dot.snap | 0 ...st_stratum_run_async@graphvis_mermaid.snap | 0 ...st_stratum_run_available@graphvis_dot.snap | 0 ...tratum_run_available@graphvis_mermaid.snap | 0 ...scheduling__stratum_loop@graphvis_dot.snap | 0 ...duling__stratum_loop@graphvis_mermaid.snap | 0 ...ce_scheduling__tick_loop@graphvis_dot.snap | 0 ...cheduling__tick_loop@graphvis_mermaid.snap | 0 ...ce_singleton__fold_cross@graphvis_dot.snap | 0 ...ingleton__fold_cross@graphvis_mermaid.snap | 0 ...ingleton__fold_singleton@graphvis_dot.snap | 0 ...eton__fold_singleton@graphvis_mermaid.snap | 0 ...ton__fold_singleton_push@graphvis_dot.snap | 0 ..._fold_singleton_push@graphvis_mermaid.snap | 0 ...ce_singleton__multi_tick@graphvis_dot.snap | 0 ...ingleton__multi_tick@graphvis_mermaid.snap | 0 ...gleton__reduce_singleton@graphvis_dot.snap | 0 ...on__reduce_singleton@graphvis_mermaid.snap | 0 ...n__reduce_singleton_push@graphvis_dot.snap | 0 ...educe_singleton_push@graphvis_mermaid.snap | 0 ...surface_singleton__state@graphvis_dot.snap | 0 ...ace_singleton__state@graphvis_mermaid.snap | 0 ..._singleton__state_unused@graphvis_dot.snap | 0 ...gleton__state_unused@graphvis_mermaid.snap | 0 ...face_stratum__defer_lazy@graphvis_dot.snap | 0 ..._stratum__defer_lazy@graphvis_mermaid.snap | 0 ...ce_stratum__difference_a@graphvis_dot.snap | 0 ...tratum__difference_a@graphvis_mermaid.snap | 0 ...ce_stratum__difference_b@graphvis_dot.snap | 0 ...tratum__difference_b@graphvis_mermaid.snap | 0 ...ph_stratum_consolidation@graphvis_dot.snap | 0 ...tratum_consolidation@graphvis_mermaid.snap | 0 ...tax_graph_unreachability@graphvis_dot.snap | 0 ...graph_unreachability@graphvis_mermaid.snap | 0 ...ace_stratum__tick_loop_1@graphvis_dot.snap | 0 ...stratum__tick_loop_1@graphvis_mermaid.snap | 0 ...ace_stratum__tick_loop_2@graphvis_dot.snap | 0 ...stratum__tick_loop_2@graphvis_mermaid.snap | 0 ...ace_stratum__tick_loop_3@graphvis_dot.snap | 0 ...stratum__tick_loop_3@graphvis_mermaid.snap | 0 .../surface_unique__unique@graphvis_dot.snap | 0 ...rface_unique__unique@graphvis_mermaid.snap | 0 ...ique__unique_static_pull@graphvis_dot.snap | 0 ...__unique_static_pull@graphvis_mermaid.snap | 0 ...ique__unique_static_push@graphvis_dot.snap | 0 ...__unique_static_push@graphvis_mermaid.snap | 0 ...unique__unique_tick_pull@graphvis_dot.snap | 0 ...ue__unique_tick_pull@graphvis_mermaid.snap | 0 ...unique__unique_tick_push@graphvis_dot.snap | 0 ...ue__unique_tick_push@graphvis_mermaid.snap | 0 {hydroflow => dfir_rs}/tests/surface_async.rs | 122 +- {hydroflow => dfir_rs}/tests/surface_batch.rs | 10 +- {hydroflow => dfir_rs}/tests/surface_book.rs | 10 +- .../tests/surface_codegen.rs | 162 +- .../tests/surface_compile_fail.rs | 0 .../tests/surface_context.rs | 16 +- .../tests/surface_cross_singleton.rs | 16 +- .../tests/surface_demux_enum.rs | 14 +- .../tests/surface_demux_partition.rs | 16 +- .../tests/surface_difference.rs | 48 +- .../tests/surface_examples.rs | 4 +- {hydroflow => dfir_rs}/tests/surface_fold.rs | 40 +- .../tests/surface_fold_keyed.rs | 31 +- .../tests/surface_forwardref.rs | 16 +- {hydroflow => dfir_rs}/tests/surface_join.rs | 14 +- .../tests/surface_join_fused.rs | 20 +- .../tests/surface_lattice_batch.rs | 4 +- .../tests/surface_lattice_bimorphism.rs | 26 +- ...ce_lattice_bimorphism_persist_insertion.rs | 32 +- .../tests/surface_lattice_fold.rs | 16 +- .../surface_lattice_generalized_hash_trie.rs | 18 +- .../tests/surface_lattice_join.rs | 30 +- .../tests/surface_lattice_reduce.rs | 6 +- {hydroflow => dfir_rs}/tests/surface_loop.rs | 8 +- .../tests/surface_multiset_delta.rs | 36 +- .../tests/surface_parser.rs | 48 +- .../tests/surface_persist.rs | 78 +- .../tests/surface_python.rs | 8 +- .../tests/surface_reduce.rs | 32 +- .../tests/surface_scheduling.rs | 46 +- .../tests/surface_singleton.rs | 65 +- .../tests/surface_state_scheduling.rs | 40 +- .../tests/surface_stratum.rs | 28 +- .../tests/surface_unique.rs | 24 +- .../tests/surface_warnings.rs | 12 +- .../tests/surface_zip_unzip.rs | 24 +- {hydroflow => dfir_rs}/wasm.md | 0 docs/README.md | 2 +- docs/docs/deploy/your-first-deploy.md | 12 +- .../architecture/_category_.json | 2 +- .../architecture/handoffs.md | 0 .../architecture/in-out_trees.md | 8 +- .../architecture/index.mdx | 18 +- .../architecture/networking.md | 0 .../architecture/scheduling.md | 0 .../concepts/_category_.json | 2 +- .../concepts/cyclic_flows.md | 16 +- .../{hydroflow => dfir}/concepts/debugging.md | 0 .../concepts/distributed_time.md | 20 +- .../concepts/error_handling.md | 0 .../{hydroflow => dfir}/concepts/index.md | 44 +- .../concepts/life_and_times.md | 14 +- .../concepts/stratification.md | 18 +- docs/docs/{hydroflow => dfir}/ecosystem.md | 8 +- docs/docs/{hydroflow => dfir}/faq.md | 28 +- .../{hydroflow => dfir}/img/hydro_stack.png | Bin .../img/in-out_example.png | Bin .../img/in-out_partition.png | Bin .../{hydroflow => dfir}/img/in-out_tree.png | Bin .../{hydroflow => dfir}/img/max-int-ord.png | Bin .../img/oaklandish_logo.jpg | Bin .../{hydroflow => dfir}/img/set-union-ord.png | Bin docs/docs/dfir/index.mdx | 16 + .../lattices_crate/_category_.json | 2 +- .../lattices_crate/index.mdx | 0 .../lattices_crate/lattice_math.md | 0 .../quickstart/_category_.json | 2 +- .../quickstart/example_1_simplest.mdx | 30 +- .../quickstart/example_2_simple.mdx | 16 +- .../quickstart/example_3_stream.mdx | 22 +- .../quickstart/example_4_neighbors.mdx | 28 +- .../quickstart/example_5_reachability.mdx | 14 +- .../quickstart/example_6_unreachability.mdx | 16 +- .../quickstart/example_7_networking.mdx | 26 +- docs/docs/dfir/quickstart/index.md | 8 + .../{hydroflow => dfir}/quickstart/setup.md | 38 +- .../{hydroflow => dfir}/syntax/.gitignore | 0 .../syntax/_category_.json | 2 +- .../docs/{hydroflow => dfir}/syntax/index.mdx | 12 +- docs/docs/{hydroflow => dfir}/syntax/state.md | 0 .../syntax/surface_data.mdx | 14 +- docs/docs/dfir/syntax/surface_embedding.mdx | 15 + .../syntax/surface_flows.mdx | 16 +- .../syntax/surface_types.md | 2 +- docs/docs/hydro/index.mdx | 2 +- docs/docs/hydroflow/index.mdx | 16 - docs/docs/hydroflow/quickstart/index.md | 8 - .../hydroflow/syntax/surface_embedding.mdx | 15 - docs/docusaurus.config.js | 6 +- docs/sidebars.js | 2 +- docs/src/pages/playground.js | 28 +- docs/src/pages/research.js | 6 +- hydro_deploy/hydro_cli_examples/Cargo.toml | 4 +- .../examples/dedalus_2pc_coordinator/main.rs | 10 +- .../examples/dedalus_2pc_participant/main.rs | 10 +- .../examples/dedalus_receiver/main.rs | 12 +- .../examples/dedalus_sender/main.rs | 14 +- .../examples/dedalus_vote_leader/main.rs | 10 +- .../examples/dedalus_vote_participant/main.rs | 10 +- .../examples/empty_program/main.rs | 4 +- .../examples/panic_program/main.rs | 4 +- .../examples/stdout_receiver/main.rs | 12 +- .../examples/tagged_stdout_receiver/main.rs | 12 +- .../examples/ws_chat_server/main.rs | 20 +- .../examples/ws_chat_server/util.rs | 8 +- hydro_lang/Cargo.toml | 6 +- hydro_lang/src/builder/built.rs | 4 +- hydro_lang/src/builder/compiled.rs | 26 +- hydro_lang/src/builder/deploy.rs | 4 +- hydro_lang/src/deploy/deploy_graph.rs | 14 +- hydro_lang/src/deploy/in_memory_graph.rs | 6 +- hydro_lang/src/deploy/macro_runtime.rs | 12 +- hydro_lang/src/deploy/mod.rs | 8 +- hydro_lang/src/deploy/trybuild.rs | 14 +- hydro_lang/src/deploy_runtime.rs | 2 +- hydro_lang/src/ir.rs | 2 +- hydro_lang/src/lib.rs | 2 +- hydro_lang/src/location/external_process.rs | 2 +- hydro_lang/src/location/mod.rs | 4 +- hydro_lang/src/rewrites/profiler.rs | 2 +- hydro_lang/src/rewrites/properties.rs | 2 +- hydro_lang/src/runtime_context.rs | 4 +- hydro_lang/src/stream.rs | 6 +- .../compile-fail/send_bincode_lifetime.rs | 2 +- .../compile-fail/send_bincode_lifetime.stderr | 6 +- hydro_test_local/Cargo.toml | 2 +- hydro_test_local/src/local/chat_app.rs | 24 +- hydro_test_local/src/local/compute_pi.rs | 4 +- hydro_test_local/src/local/count_elems.rs | 18 +- hydro_test_local/src/local/first_ten.rs | 4 +- .../src/local/graph_reachability.rs | 18 +- hydro_test_local/src/local/negation.rs | 28 +- hydro_test_local/src/local/teed_join.rs | 26 +- hydroflow/examples/example_syntax_output.rs | 13 - .../compile-fail/surface_degenerate_merge.rs | 8 - .../compile-fail/surface_degenerate_tee.rs | 8 - .../surface_dest_sink_badsink.stderr | 28 - .../compile-fail/surface_forwardref_self1.rs | 8 - .../surface_lattice_fold_noarg.rs | 10 - .../surface_lattice_fold_wronggeneric.rs | 10 - .../surface_lattice_reduce_wronggeneric.rs | 10 - hydroflow/tests/compile-fail/surface_null.rs | 8 - lattices/README.md | 2 +- lattices/src/lib.rs | 4 +- multiplatform_test/README.md | 2 +- multiplatform_test/src/lib.rs | 8 +- precheck.bash | 2 +- relalg/Cargo.toml | 2 +- relalg/src/runtime.rs | 12 +- template/{hydroflow => dfir}/.gitignore | 0 template/{hydroflow => dfir}/Cargo.toml | 2 +- template/{hydroflow => dfir}/README.md | 0 .../{hydroflow => dfir}/cargo-generate.toml | 0 .../{hydroflow => dfir}/rust-toolchain.toml | 0 template/{hydroflow => dfir}/src/client.rs | 8 +- template/dfir/src/helpers.rs | 9 + template/{hydroflow => dfir}/src/main.rs | 8 +- template/{hydroflow => dfir}/src/protocol.rs | 0 template/{hydroflow => dfir}/src/server.rs | 10 +- template/hydro/src/first_ten_cluster.rs | 2 +- template/hydro/src/first_ten_distributed.rs | 2 +- template/hydroflow/src/helpers.rs | 9 - topolotree/Cargo.toml | 4 +- topolotree/src/latency_measure.rs | 8 +- topolotree/src/main.rs | 24 +- topolotree/src/pn.rs | 18 +- topolotree/src/pn_delta.rs | 18 +- topolotree/src/tests.rs | 24 +- website_playground/Cargo.toml | 6 +- website_playground/src/lib.rs | 24 +- 1068 files changed, 27378 insertions(+), 4019 deletions(-) rename {hydroflow_datalog => dfir_datalog}/CHANGELOG.md (100%) rename {hydroflow_datalog => dfir_datalog}/Cargo.toml (77%) rename {hydroflow_datalog => dfir_datalog}/src/lib.rs (82%) rename {hydroflow_datalog_core => dfir_datalog_core}/CHANGELOG.md (100%) rename {hydroflow_datalog_core => dfir_datalog_core}/Cargo.toml (68%) rename {hydroflow_datalog_core => dfir_datalog_core}/build.rs (100%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/grammar.rs (100%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/join_plan.rs (99%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/lib.rs (97%) create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program-2.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph-2.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@surface_graph.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@datalog_program.snap create mode 100644 dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@surface_graph.snap rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap (90%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap (97%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap (92%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap (96%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap (96%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap (92%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap (95%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap (96%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap (90%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap (96%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap (86%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap (98%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap (95%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap (91%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap (91%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap (92%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap (95%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap (92%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap (90%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap (92%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap (90%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap (87%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap (98%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap (90%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap (96%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap (91%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap (91%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap (93%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap (95%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap (97%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap (91%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap (94%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap (91%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap (98%) rename {hydroflow_datalog_core => dfir_datalog_core}/src/util.rs (100%) rename {hydroflow_lang => dfir_lang}/CHANGELOG.md (100%) rename {hydroflow_lang => dfir_lang}/Cargo.toml (87%) rename {hydroflow_lang => dfir_lang}/build.rs (91%) rename {hydroflow_lang => dfir_lang}/src/diagnostic.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/di_mul_graph.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/eliminate_extra_unions_tees.rs (86%) rename {hydroflow_lang => dfir_lang}/src/graph/flat_graph_builder.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/flat_to_partitioned.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/graph_algorithms.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/graph_write.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/hydroflow_graph.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/hydroflow_graph_debugging.rs (96%) rename {hydroflow_lang => dfir_lang}/src/graph/mod.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/_lattice_fold_batch.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/_lattice_join_fused_join.rs (95%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/all_once.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/anti_join.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/anti_join_multiset.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/assert.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/assert_eq.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/batch.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/chain.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/cross_join.rs (94%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/cross_join_multiset.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/cross_singleton.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/defer_signal.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/defer_tick.rs (93%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/defer_tick_lazy.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/demux.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/demux_enum.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/dest_file.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/dest_sink.rs (95%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/dest_sink_serde.rs (89%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/difference.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/difference_multiset.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/enumerate.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/filter.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/filter_map.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/flat_map.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/flatten.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/fold.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/fold_keyed.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/for_each.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/identity.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/initialize.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/inspect.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/join.rs (96%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/join_fused.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/join_fused_lhs.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/join_fused_rhs.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/join_multiset.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/lattice_bimorphism.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/lattice_fold.rs (91%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/lattice_reduce.rs (96%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/map.rs (93%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/mod.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/multiset_delta.rs (96%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/next_stratum.rs (100%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/null.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/partition.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/persist.rs (96%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/persist_mut.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/persist_mut_keyed.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/py_udf.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/reduce.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/reduce_keyed.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/sort.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/sort_by_key.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_file.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_interval.rs (87%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_iter.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_json.rs (95%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_stdin.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_stream.rs (95%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/source_stream_serde.rs (92%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/spin.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/state.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/state_by.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/tee.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/union.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/unique.rs (97%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/unzip.rs (98%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/zip.rs (99%) rename {hydroflow_lang => dfir_lang}/src/graph/ops/zip_longest.rs (99%) rename {hydroflow_lang => dfir_lang}/src/lib.rs (100%) rename {hydroflow_lang => dfir_lang}/src/parse.rs (100%) rename {hydroflow_lang => dfir_lang}/src/pretty_span.rs (95%) rename {hydroflow_lang => dfir_lang}/src/process_singletons.rs (100%) rename {hydroflow_lang => dfir_lang}/src/union_find.rs (100%) rename {hydroflow_macro => dfir_macro}/CHANGELOG.md (100%) rename {hydroflow_macro => dfir_macro}/Cargo.toml (67%) rename {hydroflow_macro => dfir_macro}/build.rs (97%) rename {hydroflow_macro => dfir_macro}/src/lib.rs (89%) rename {hydroflow => dfir_rs}/.gitignore (100%) rename {hydroflow => dfir_rs}/CHANGELOG.md (100%) rename {hydroflow => dfir_rs}/Cargo.toml (81%) rename {hydroflow => dfir_rs}/README.md (100%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing/README.md (100%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing/main.rs (93%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing/people.rs (100%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing_dist/database.rs (92%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing_dist/main.rs (98%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing_dist/people.rs (100%) rename {hydroflow => dfir_rs}/deprecated_examples/covid_tracing_dist/tracker.rs (91%) rename {hydroflow => dfir_rs}/example.json (100%) rename {hydroflow => dfir_rs}/example_utils/chat_driver.py (100%) rename {hydroflow => dfir_rs}/example_utils/web2a (100%) rename {hydroflow => dfir_rs}/examples/chat/README.md (64%) rename {hydroflow => dfir_rs}/examples/chat/client.rs (95%) rename {hydroflow => dfir_rs}/examples/chat/main.rs (94%) rename {hydroflow => dfir_rs}/examples/chat/protocol.rs (97%) rename {hydroflow => dfir_rs}/examples/chat/randomized_gossiping_server.rs (98%) rename {hydroflow => dfir_rs}/examples/chat/server.rs (92%) rename {hydroflow => dfir_rs}/examples/deadlock_detector/README.md (100%) rename {hydroflow => dfir_rs}/examples/deadlock_detector/helpers.rs (100%) rename {hydroflow => dfir_rs}/examples/deadlock_detector/main.rs (95%) rename {hydroflow => dfir_rs}/examples/deadlock_detector/peer.rs (95%) rename {hydroflow => dfir_rs}/examples/deadlock_detector/peers.json (100%) rename {hydroflow => dfir_rs}/examples/deadlock_detector/protocol.rs (100%) rename {hydroflow => dfir_rs}/examples/echo_serde_json/README.md (100%) rename {hydroflow => dfir_rs}/examples/echo_serde_json/client.rs (87%) rename {hydroflow => dfir_rs}/examples/echo_serde_json/helpers.rs (100%) rename {hydroflow => dfir_rs}/examples/echo_serde_json/main.rs (94%) rename {hydroflow => dfir_rs}/examples/echo_serde_json/protocol.rs (100%) rename {hydroflow => dfir_rs}/examples/echo_serde_json/server.rs (80%) rename {hydroflow => dfir_rs}/examples/echoserver/README.md (100%) rename {hydroflow => dfir_rs}/examples/echoserver/client.rs (90%) rename {hydroflow => dfir_rs}/examples/echoserver/main.rs (93%) rename {hydroflow => dfir_rs}/examples/echoserver/protocol.rs (100%) rename {hydroflow => dfir_rs}/examples/echoserver/server.rs (82%) rename {hydroflow => dfir_rs}/examples/example_1_simplest.rs (74%) rename {hydroflow => dfir_rs}/examples/example_2_simple_1.rs (78%) rename {hydroflow => dfir_rs}/examples/example_2_simple_2.rs (82%) rename {hydroflow => dfir_rs}/examples/example_3_stream.rs (83%) rename {hydroflow => dfir_rs}/examples/example_4_neighbors.rs (85%) rename {hydroflow => dfir_rs}/examples/example_5_reachability.rs (88%) rename {hydroflow => dfir_rs}/examples/example_6_unreachability.rs (90%) rename {hydroflow => dfir_rs}/examples/example_naturals.rs (79%) rename {hydroflow => dfir_rs}/examples/example_surface_flows_1_basic.rs (70%) rename {hydroflow => dfir_rs}/examples/example_surface_flows_2_varname.rs (73%) rename {hydroflow => dfir_rs}/examples/example_surface_flows_3_ports.rs (86%) rename {hydroflow => dfir_rs}/examples/example_surface_flows_4_context.rs (73%) rename {hydroflow => dfir_rs}/examples/example_syntax_empty.rs (65%) rename {hydroflow => dfir_rs}/examples/example_syntax_hello_world.rs (71%) rename {hydroflow => dfir_rs}/examples/example_syntax_input.rs (60%) create mode 100644 dfir_rs/examples/example_syntax_output.rs rename {hydroflow => dfir_rs}/examples/hello_world/README.md (100%) rename {hydroflow => dfir_rs}/examples/hello_world/main.rs (70%) rename {hydroflow => dfir_rs}/examples/kvs/README.md (100%) rename {hydroflow => dfir_rs}/examples/kvs/client.rs (90%) rename {hydroflow => dfir_rs}/examples/kvs/helpers.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs/main.rs (93%) rename {hydroflow => dfir_rs}/examples/kvs/protocol.rs (96%) rename {hydroflow => dfir_rs}/examples/kvs/server.rs (89%) rename {hydroflow => dfir_rs}/examples/kvs_bench/README.md (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/buffer_pool/mod.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/buffer_pool/serialization.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/main.rs (96%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/mod.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/kvs_request_delete_visitor.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/kvs_request_get_visitor.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/kvs_request_gossip_visitor.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/kvs_request_put_visitor.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/lattices/map_union.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/lattices/mod.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/lattices/my_last_write_wins.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/lattices/point.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/lattices/with_bot.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/serialization/mod.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/test/magic_buffer.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/test/mod.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/protocol/test/util.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_bench/server.rs (95%) rename {hydroflow => dfir_rs}/examples/kvs_mut/README.md (100%) rename {hydroflow => dfir_rs}/examples/kvs_mut/client.rs (90%) rename {hydroflow => dfir_rs}/examples/kvs_mut/helpers.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_mut/main.rs (93%) rename {hydroflow => dfir_rs}/examples/kvs_mut/protocol.rs (96%) rename {hydroflow => dfir_rs}/examples/kvs_mut/server.rs (91%) rename {hydroflow => dfir_rs}/examples/kvs_replicated/README.md (100%) rename {hydroflow => dfir_rs}/examples/kvs_replicated/client.rs (90%) rename {hydroflow => dfir_rs}/examples/kvs_replicated/helpers.rs (100%) rename {hydroflow => dfir_rs}/examples/kvs_replicated/main.rs (93%) rename {hydroflow => dfir_rs}/examples/kvs_replicated/protocol.rs (97%) rename {hydroflow => dfir_rs}/examples/kvs_replicated/server.rs (94%) rename {hydroflow => dfir_rs}/examples/lamport_clock/README.md (100%) rename {hydroflow => dfir_rs}/examples/lamport_clock/client.rs (93%) rename {hydroflow => dfir_rs}/examples/lamport_clock/main.rs (92%) rename {hydroflow => dfir_rs}/examples/lamport_clock/protocol.rs (85%) rename {hydroflow => dfir_rs}/examples/lamport_clock/server.rs (89%) rename {hydroflow => dfir_rs}/examples/python_udf/main.rs (85%) rename {hydroflow => dfir_rs}/examples/rga/README.md (100%) rename {hydroflow => dfir_rs}/examples/rga/adjacency.rs (95%) rename {hydroflow => dfir_rs}/examples/rga/datalog.rs (96%) rename {hydroflow => dfir_rs}/examples/rga/datalog_agg.rs (96%) rename {hydroflow => dfir_rs}/examples/rga/main.rs (95%) rename {hydroflow => dfir_rs}/examples/rga/minimal.rs (78%) rename {hydroflow => dfir_rs}/examples/rga/protocol.rs (100%) rename {hydroflow => dfir_rs}/examples/shopping/README.md (100%) rename {hydroflow => dfir_rs}/examples/shopping/driver.rs (94%) rename {hydroflow => dfir_rs}/examples/shopping/flows/bp_flow.rs (89%) rename {hydroflow => dfir_rs}/examples/shopping/flows/client_state_flow.rs (88%) rename {hydroflow => dfir_rs}/examples/shopping/flows/listener_flow.rs (85%) rename {hydroflow => dfir_rs}/examples/shopping/flows/mod.rs (100%) rename {hydroflow => dfir_rs}/examples/shopping/flows/orig_flow.rs (90%) rename {hydroflow => dfir_rs}/examples/shopping/flows/push_group_flow.rs (90%) rename {hydroflow => dfir_rs}/examples/shopping/flows/rep_server_flow.rs (86%) rename {hydroflow => dfir_rs}/examples/shopping/flows/server_state_flow.rs (88%) rename {hydroflow => dfir_rs}/examples/shopping/flows/ssiv_flow.rs (90%) rename {hydroflow => dfir_rs}/examples/shopping/lattices.rs (99%) rename {hydroflow => dfir_rs}/examples/shopping/main.rs (98%) rename {hydroflow => dfir_rs}/examples/shopping/misc/replicated2.dot (100%) rename {hydroflow => dfir_rs}/examples/shopping/misc/replicated2.pdf (100%) rename {hydroflow => dfir_rs}/examples/shopping/structs.rs (100%) rename {hydroflow => dfir_rs}/examples/shopping/test_data.rs (100%) rename {hydroflow => dfir_rs}/examples/shopping/wrappers.rs (100%) rename {hydroflow => dfir_rs}/examples/three_clique/README.md (100%) rename {hydroflow => dfir_rs}/examples/three_clique/main.rs (91%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/README.md (100%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/coordinator.rs (86%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/helpers.rs (100%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/main.rs (95%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/members.json (100%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/protocol.rs (100%) rename {hydroflow => dfir_rs}/examples/two_pc_hf/subordinate.rs (94%) rename {hydroflow => dfir_rs}/examples/vector_clock/README.md (100%) rename {hydroflow => dfir_rs}/examples/vector_clock/client.rs (96%) rename {hydroflow => dfir_rs}/examples/vector_clock/main.rs (94%) rename {hydroflow => dfir_rs}/examples/vector_clock/protocol.rs (100%) rename {hydroflow => dfir_rs}/examples/vector_clock/server.rs (90%) rename {hydroflow => dfir_rs}/src/compiled/mod.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/anti_join.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/cross_join.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/half_join_state/fold.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/half_join_state/fold_from.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/half_join_state/mod.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/half_join_state/multiset.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/half_join_state/reduce.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/half_join_state/set.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/mod.rs (100%) rename {hydroflow => dfir_rs}/src/compiled/pull/symmetric_hash_join.rs (100%) rename {hydroflow => dfir_rs}/src/declarative_macro.rs (95%) rename {hydroflow => dfir_rs}/src/lib.rs (74%) rename {hydroflow => dfir_rs}/src/scheduled/context.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/graph.rs (97%) rename {hydroflow => dfir_rs}/src/scheduled/graph_ext.rs (98%) rename {hydroflow => dfir_rs}/src/scheduled/handoff/handoff_list.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/handoff/mod.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/handoff/tee.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/handoff/vector.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/input.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/mod.rs (83%) rename {hydroflow => dfir_rs}/src/scheduled/net/mod.rs (99%) rename {hydroflow => dfir_rs}/src/scheduled/net/network_vertex.rs (99%) rename {hydroflow => dfir_rs}/src/scheduled/port.rs (91%) rename {hydroflow => dfir_rs}/src/scheduled/query.rs (97%) rename {hydroflow => dfir_rs}/src/scheduled/reactor.rs (94%) rename {hydroflow => dfir_rs}/src/scheduled/state.rs (93%) rename {hydroflow => dfir_rs}/src/scheduled/subgraph.rs (100%) rename {hydroflow => dfir_rs}/src/scheduled/ticks.rs (94%) rename {hydroflow => dfir_rs}/src/util/clear.rs (100%) rename {hydroflow => dfir_rs}/src/util/demux_enum.rs (92%) rename {hydroflow => dfir_rs}/src/util/deploy.rs (97%) rename {hydroflow => dfir_rs}/src/util/mod.rs (98%) rename {hydroflow => dfir_rs}/src/util/monotonic.rs (100%) rename {hydroflow => dfir_rs}/src/util/monotonic_map.rs (100%) rename {hydroflow => dfir_rs}/src/util/multiset.rs (100%) rename {hydroflow => dfir_rs}/src/util/simulation.rs (97%) rename {hydroflow => dfir_rs}/src/util/socket.rs (100%) rename {hydroflow => dfir_rs}/src/util/sparse_vec.rs (100%) rename {hydroflow => dfir_rs}/src/util/tcp.rs (100%) rename {hydroflow => dfir_rs}/src/util/udp.rs (100%) rename {hydroflow => dfir_rs}/src/util/unsync/mod.rs (100%) rename {hydroflow => dfir_rs}/src/util/unsync/mpsc.rs (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/datalog_badparse.rs (91%) rename {hydroflow => dfir_rs}/tests/compile-fail/datalog_badparse.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/datalog_filter_badtypes.rs (92%) rename {hydroflow => dfir_rs}/tests/compile-fail/datalog_filter_badtypes.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/datalog_join_badtypes.rs (92%) rename {hydroflow => dfir_rs}/tests/compile-fail/datalog_join_badtypes.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_anti_join_badtypes.rs (75%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_anti_join_badtypes.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_both.rs (65%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_both.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_extra.rs (73%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_extra.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_lifetime.rs (64%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_lifetime.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_nocolon.rs (63%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_nocolon.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_type.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_badgeneric_type.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_conflicting_name.rs (60%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_conflicting_name.stderr (100%) create mode 100644 dfir_rs/tests/compile-fail/surface_degenerate_merge.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_degenerate_merge.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_degenerate_null.rs (67%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_degenerate_null.stderr (100%) create mode 100644 dfir_rs/tests/compile-fail/surface_degenerate_tee.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_degenerate_tee.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_badarg.rs (78%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_badarg.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_badclosure.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_badclosure.stderr (76%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_duplicate.rs (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_duplicate.stderr (79%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_elided.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_elided.stderr (80%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_extra.rs (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_extra.stderr (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_extramissing.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_extramissing.stderr (87%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_missing.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demux_port_missing.stderr (71%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_missingtypeparam.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_missingtypeparam.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_notenum.rs (86%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_notenum.stderr (98%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_duplicate.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_duplicate.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs (74%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_duplicate_one.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_elided.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_elided.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_extra.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_extra.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_extra_zero.rs (64%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_extra_zero.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_extramissing.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_extramissing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_missing.rs (80%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_missing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_missing_one.rs (76%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_missing_one.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_wrong_one.rs (70%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_port_wrong_one.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongenum.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongenum.stderr (98%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongfields_1.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongfields_1.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongfields_2.rs (82%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongfields_2.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongtype.rs (78%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_demuxenum_wrongtype.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_dest_sink_baditem.ci.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_dest_sink_baditem.rs.ignore (74%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_dest_sink_baditem.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_dest_sink_badsink.rs.ignore (63%) create mode 100644 dfir_rs/tests/compile-fail/surface_dest_sink_badsink.stderr rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_badtype_int.rs (79%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_badtype_int.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_badtype_option.rs (81%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_badtype_option.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr (95%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_generics_bad.stderr (95%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_generics_extra.rs (79%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_fold_keyed_generics_extra.stderr (77%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_chain_double.rs (77%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_chain_double.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_chain_single.rs (75%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_chain_single.stderr (100%) create mode 100644 dfir_rs/tests/compile-fail/surface_forwardref_self1.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self1.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self2.rs (55%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self2.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self2_indirect.rs (59%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self2_indirect.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self3.rs (58%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_forwardref_self3.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_identity_wronggeneric.rs (64%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_identity_wronggeneric.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_badtypes.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_badtypes.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_generics_extra.rs (75%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_generics_extra.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_persistence_bad.rs (75%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_persistence_bad.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_persistence_extra.rs (76%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_join_persistence_extra.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore (75%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_fold_badgeneric.stderr (89%) create mode 100644 dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_fold_noarg.stderr (62%) create mode 100644 dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr (56%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore (73%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr (90%) create mode 100644 dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr (62%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_latticereduce_wronggeneric.stderr (80%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_cycle.rs (76%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_cycle.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_missing_unwindowing.rs (76%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_missing_unwindowing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_missing_windowing.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_missing_windowing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_multiple_window.rs (78%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_multiple_window.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_source.rs (70%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_loop_source.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_map_badtypes.rs (64%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_map_badtypes.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_merge_badtypes.rs (70%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_merge_badtypes.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_missing_args.rs (54%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_missing_args.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_negative_loop.rs (66%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_negative_loop.stderr (100%) create mode 100644 dfir_rs/tests/compile-fail/surface_null.rs rename {hydroflow => dfir_rs}/tests/compile-fail/surface_null.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_badarg.rs (79%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_badarg.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_badclosure.rs (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_badclosure.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_duplicate.rs (86%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_duplicate.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_elided.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_elided.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_extra.rs (86%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_extra.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_extramissing.rs (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_extramissing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_inconsistent.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_inconsistent.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_indexgap.rs (80%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_indexgap.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_missing.rs (83%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_partition_port_missing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_conflict.rs (70%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_conflict.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_join.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_join.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_join_forwardref.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_join_forwardref.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs (78%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_a.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs (78%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs (74%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs (74%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_simple.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_naked_overwrite_simple.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_both.rs (66%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_both.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_both_indirect.rs (72%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_both_indirect.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_both_parens.rs (66%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_both_parens.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_in.rs (61%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_in.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_out.rs (61%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_port_unused_out.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_reduce_keyed_badtype_int.rs (79%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_reduce_keyed_badtype_int.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_reduce_keyed_badtype_option.rs (81%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_reduce_keyed_badtype_option.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_badexpr.rs (87%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_badexpr.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_nostate.rs (86%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_nostate.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_nostate_undefined.rs (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_nostate_undefined.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_undefined.rs (80%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_undefined.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_undefined_nostate.rs (85%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_singleton_undefined_nostate.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_source_interval_badarg.rs (61%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_source_interval_badarg.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_source_iter_badtype.rs.ignore (58%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_source_iter_badtype.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_arrow.rs (52%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_arrow.stderr (59%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_indexing.rs (53%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_indexing.stderr (58%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_missingop.rs (52%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_missingop.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_op.rs (59%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_eol_op.stderr (53%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_indexing_empty.rs (54%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_indexing_empty.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_noarrow_indexing.rs (62%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_noarrow_indexing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_noarrow_op.rs (58%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_noarrow_op.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_noarrow_paren.rs (59%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_noarrow_paren.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren.rs (58%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_arrow.rs (53%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_arrow.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_indexing.rs (54%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_indexing.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_missingop.rs (53%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_missingop.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_noarrow_op.rs (59%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_noarrow_op.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs (59%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_noarrow_paren.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_semicolon.rs (52%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_syntax_paren_semicolon.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_unknown_operators.rs (57%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_unknown_operators.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_bad1.rs (63%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_bad1.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_bad2.rs (62%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_bad2.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_bad3.rs (62%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_bad3.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_unknown.rs (62%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_use_unknown.stderr (100%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_varname_undefined.rs (57%) rename {hydroflow => dfir_rs}/tests/compile-fail/surface_varname_undefined.stderr (100%) rename {hydroflow => dfir_rs}/tests/datalog_compile_fail.rs (100%) rename {hydroflow => dfir_rs}/tests/datalog_frontend.rs (76%) rename {hydroflow => dfir_rs}/tests/datalog_minimal.rs (64%) rename {hydroflow => dfir_rs}/tests/groupby.rs (97%) rename {hydroflow => dfir_rs}/tests/scheduled_teeing_handoff.rs (96%) rename {hydroflow => dfir_rs}/tests/scheduled_test.rs (92%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_async__echo@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_async__echo@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_batch__basic_2@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_batch__basic_2@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_book__surface_flows_1@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_book__surface_flows_1@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__basic_2@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__basic_2@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__basic_3@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__basic_3@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__basic_union@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__basic_union@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__covid_tracing@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__covid_tracing@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__recv_expr@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__recv_expr@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__sort@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__sort@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__sort_by_key@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__sort_by_key@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__transitive_closure@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_codegen__transitive_closure@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap (81%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap (81%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_mut@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_mut@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_ref@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_context__context_ref@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_cross_singleton__basic@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_cross_singleton__basic@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_timing@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_difference__diff_timing@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_1_simplest.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_2_simple_1.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_2_simple_2.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_3_stream.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_4_neighbors.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_5_reachability.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_6_unreachability.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_naturals.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_surface_flows_1_basic.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_surface_flows_2_varname.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_surface_flows_4_context.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_syntax_empty.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_syntax_hello_world.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_syntax_input.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_examples__example_syntax_output.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_flow_props__basic@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_flow_props__basic@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_flow_props__union_warning@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_flow_props__union_warning@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_sort@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_sort@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_static_join@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_static_join@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold__fold_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__static_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__static_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__static_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__static_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__tick_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__tick_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__tick_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join__tick_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__join@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism__join@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_loop__flo_nested@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_loop__flo_nested@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_loop__flo_syntax@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_loop__flo_syntax@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_basic@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_basic@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_mut@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_mut@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_pull@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_pull@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_push@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_push@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_replay_join@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_persist__persist_replay_join@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_python__python_basic@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_python__python_basic@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_python__python_too_many_args@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_python__python_too_many_args@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_python__python_two_args@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_python__python_two_args@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce_static@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce_static@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce_sum@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce_sum@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_reduce__reduce_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__stratum_loop@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__stratum_loop@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__tick_loop@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_scheduling__tick_loop@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__fold_cross@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__fold_cross@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__fold_singleton@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__fold_singleton@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__multi_tick@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__multi_tick@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__reduce_singleton@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__reduce_singleton@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__state@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__state@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__state_unused@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_singleton__state_unused@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__defer_lazy@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__defer_lazy@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__difference_a@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__difference_a@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__difference_b@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__difference_b@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__tick_loop_1@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__tick_loop_1@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__tick_loop_2@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__tick_loop_2@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__tick_loop_3@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_stratum__tick_loop_3@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_static_pull@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_static_pull@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_static_push@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_static_push@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_tick_pull@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_tick_pull@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_tick_push@graphvis_dot.snap (100%) rename {hydroflow => dfir_rs}/tests/snapshots/surface_unique__unique_tick_push@graphvis_mermaid.snap (100%) rename {hydroflow => dfir_rs}/tests/surface_async.rs (80%) rename {hydroflow => dfir_rs}/tests/surface_batch.rs (66%) rename {hydroflow => dfir_rs}/tests/surface_book.rs (82%) rename {hydroflow => dfir_rs}/tests/surface_codegen.rs (81%) rename {hydroflow => dfir_rs}/tests/surface_compile_fail.rs (100%) rename {hydroflow => dfir_rs}/tests/surface_context.rs (88%) rename {hydroflow => dfir_rs}/tests/surface_cross_singleton.rs (79%) rename {hydroflow => dfir_rs}/tests/surface_demux_enum.rs (92%) rename {hydroflow => dfir_rs}/tests/surface_demux_partition.rs (91%) rename {hydroflow => dfir_rs}/tests/surface_difference.rs (79%) rename {hydroflow => dfir_rs}/tests/surface_examples.rs (87%) rename {hydroflow => dfir_rs}/tests/surface_fold.rs (83%) rename {hydroflow => dfir_rs}/tests/surface_fold_keyed.rs (79%) rename {hydroflow => dfir_rs}/tests/surface_forwardref.rs (71%) rename {hydroflow => dfir_rs}/tests/surface_join.rs (94%) rename {hydroflow => dfir_rs}/tests/surface_join_fused.rs (95%) rename {hydroflow => dfir_rs}/tests/surface_lattice_batch.rs (94%) rename {hydroflow => dfir_rs}/tests/surface_lattice_bimorphism.rs (89%) rename {hydroflow => dfir_rs}/tests/surface_lattice_bimorphism_persist_insertion.rs (78%) rename {hydroflow => dfir_rs}/tests/surface_lattice_fold.rs (79%) rename {hydroflow => dfir_rs}/tests/surface_lattice_generalized_hash_trie.rs (81%) rename {hydroflow => dfir_rs}/tests/surface_lattice_join.rs (85%) rename {hydroflow => dfir_rs}/tests/surface_lattice_reduce.rs (69%) rename {hydroflow => dfir_rs}/tests/surface_loop.rs (87%) rename {hydroflow => dfir_rs}/tests/surface_multiset_delta.rs (79%) rename {hydroflow => dfir_rs}/tests/surface_parser.rs (88%) rename {hydroflow => dfir_rs}/tests/surface_persist.rs (77%) rename {hydroflow => dfir_rs}/tests/surface_python.rs (89%) rename {hydroflow => dfir_rs}/tests/surface_reduce.rs (79%) rename {hydroflow => dfir_rs}/tests/surface_scheduling.rs (80%) rename {hydroflow => dfir_rs}/tests/surface_singleton.rs (82%) rename {hydroflow => dfir_rs}/tests/surface_state_scheduling.rs (86%) rename {hydroflow => dfir_rs}/tests/surface_stratum.rs (90%) rename {hydroflow => dfir_rs}/tests/surface_unique.rs (83%) rename {hydroflow => dfir_rs}/tests/surface_warnings.rs (90%) rename {hydroflow => dfir_rs}/tests/surface_zip_unzip.rs (76%) rename {hydroflow => dfir_rs}/wasm.md (100%) rename docs/docs/{hydroflow => dfir}/architecture/_category_.json (66%) rename docs/docs/{hydroflow => dfir}/architecture/handoffs.md (100%) rename docs/docs/{hydroflow => dfir}/architecture/in-out_trees.md (74%) rename docs/docs/{hydroflow => dfir}/architecture/index.mdx (79%) rename docs/docs/{hydroflow => dfir}/architecture/networking.md (100%) rename docs/docs/{hydroflow => dfir}/architecture/scheduling.md (100%) rename docs/docs/{hydroflow => dfir}/concepts/_category_.json (68%) rename docs/docs/{hydroflow => dfir}/concepts/cyclic_flows.md (60%) rename docs/docs/{hydroflow => dfir}/concepts/debugging.md (100%) rename docs/docs/{hydroflow => dfir}/concepts/distributed_time.md (61%) rename docs/docs/{hydroflow => dfir}/concepts/error_handling.md (100%) rename docs/docs/{hydroflow => dfir}/concepts/index.md (60%) rename docs/docs/{hydroflow => dfir}/concepts/life_and_times.md (60%) rename docs/docs/{hydroflow => dfir}/concepts/stratification.md (73%) rename docs/docs/{hydroflow => dfir}/ecosystem.md (62%) rename docs/docs/{hydroflow => dfir}/faq.md (52%) rename docs/docs/{hydroflow => dfir}/img/hydro_stack.png (100%) rename docs/docs/{hydroflow => dfir}/img/in-out_example.png (100%) rename docs/docs/{hydroflow => dfir}/img/in-out_partition.png (100%) rename docs/docs/{hydroflow => dfir}/img/in-out_tree.png (100%) rename docs/docs/{hydroflow => dfir}/img/max-int-ord.png (100%) rename docs/docs/{hydroflow => dfir}/img/oaklandish_logo.jpg (100%) rename docs/docs/{hydroflow => dfir}/img/set-union-ord.png (100%) create mode 100644 docs/docs/dfir/index.mdx rename docs/docs/{hydroflow => dfir}/lattices_crate/_category_.json (67%) rename docs/docs/{hydroflow => dfir}/lattices_crate/index.mdx (100%) rename docs/docs/{hydroflow => dfir}/lattices_crate/lattice_math.md (100%) rename docs/docs/{hydroflow => dfir}/quickstart/_category_.json (67%) rename docs/docs/{hydroflow => dfir}/quickstart/example_1_simplest.mdx (72%) rename docs/docs/{hydroflow => dfir}/quickstart/example_2_simple.mdx (78%) rename docs/docs/{hydroflow => dfir}/quickstart/example_3_stream.mdx (69%) rename docs/docs/{hydroflow => dfir}/quickstart/example_4_neighbors.mdx (85%) rename docs/docs/{hydroflow => dfir}/quickstart/example_5_reachability.mdx (87%) rename docs/docs/{hydroflow => dfir}/quickstart/example_6_unreachability.mdx (77%) rename docs/docs/{hydroflow => dfir}/quickstart/example_7_networking.mdx (55%) create mode 100644 docs/docs/dfir/quickstart/index.md rename docs/docs/{hydroflow => dfir}/quickstart/setup.md (76%) rename docs/docs/{hydroflow => dfir}/syntax/.gitignore (100%) rename docs/docs/{hydroflow => dfir}/syntax/_category_.json (68%) rename docs/docs/{hydroflow => dfir}/syntax/index.mdx (55%) rename docs/docs/{hydroflow => dfir}/syntax/state.md (100%) rename docs/docs/{hydroflow => dfir}/syntax/surface_data.mdx (83%) create mode 100644 docs/docs/dfir/syntax/surface_embedding.mdx rename docs/docs/{hydroflow => dfir}/syntax/surface_flows.mdx (79%) rename docs/docs/{hydroflow => dfir}/syntax/surface_types.md (63%) delete mode 100644 docs/docs/hydroflow/index.mdx delete mode 100644 docs/docs/hydroflow/quickstart/index.md delete mode 100644 docs/docs/hydroflow/syntax/surface_embedding.mdx delete mode 100644 hydroflow/examples/example_syntax_output.rs delete mode 100644 hydroflow/tests/compile-fail/surface_degenerate_merge.rs delete mode 100644 hydroflow/tests/compile-fail/surface_degenerate_tee.rs delete mode 100644 hydroflow/tests/compile-fail/surface_dest_sink_badsink.stderr delete mode 100644 hydroflow/tests/compile-fail/surface_forwardref_self1.rs delete mode 100644 hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs delete mode 100644 hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs delete mode 100644 hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs delete mode 100644 hydroflow/tests/compile-fail/surface_null.rs rename template/{hydroflow => dfir}/.gitignore (100%) rename template/{hydroflow => dfir}/Cargo.toml (70%) rename template/{hydroflow => dfir}/README.md (100%) rename template/{hydroflow => dfir}/cargo-generate.toml (100%) rename template/{hydroflow => dfir}/rust-toolchain.toml (100%) rename template/{hydroflow => dfir}/src/client.rs (94%) create mode 100644 template/dfir/src/helpers.rs rename template/{hydroflow => dfir}/src/main.rs (95%) rename template/{hydroflow => dfir}/src/protocol.rs (100%) rename template/{hydroflow => dfir}/src/server.rs (93%) delete mode 100644 template/hydroflow/src/helpers.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40e4c9ad3303..292c6fb1cfab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,11 +116,11 @@ jobs: target: wasm32-unknown-unknown override: ${{ matrix.rust_release == 'latest-stable' }} - - name: Check hydroflow_lang + - name: Check dfir_lang uses: actions-rs/cargo@v1 with: command: check - args: -p hydroflow_lang --target wasm32-unknown-unknown + args: -p dfir_lang --target wasm32-unknown-unknown test: name: Test Suite @@ -275,7 +275,7 @@ jobs: CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER: wasm-bindgen-test-runner with: command: test - args: -p hydroflow --target wasm32-unknown-unknown --tests --no-fail-fast + args: -p dfir_rs --target wasm32-unknown-unknown --tests --no-fail-fast build-website: name: Build Website diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9538a1ec3cb8..a006d98cf62e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,8 +86,8 @@ 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_plus_std hydroflow_datalog hydroflow_datalog_core + hydroflow dfir_lang dfir_macro hydroflow_plus + hydroflow_plus_std dfir_datalog dfir_datalog_core hydro_deploy hydro_cli hydroflow_deploy_integration stageleft stageleft_macro stageleft_tool multiplatform_test diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml index 531d18a98e3e..f6982de2eb4c 100644 --- a/.github/workflows/template.yml +++ b/.github/workflows/template.yml @@ -40,7 +40,7 @@ jobs: uses: cargo-generate/cargo-generate-action@v0.20.0 with: name: generated - template: template/hydroflow + template: template/dfir arguments: "-d hydroflow_git=${{ github.event.pull_request.head.repo.clone_url }} -d hydroflow_branch=${{ github.event.pull_request.head.ref }}" - name: Move generated project run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bd6001702fb..3424f4ca8170 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,11 +10,11 @@ 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 `dfir_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`. -* `hydroflow_datalog` provides a datalog compiler, based on top of the Hydroflow surface syntax. +* `dfir_datalog` provides a datalog compiler, based on top of the Hydroflow surface syntax. * `docs` is the [Hydro.run](https://hydro.run/) website. `website_playground` contains the playground portion of the website, used for compiling Hydroflow in-browser via WASM. * `benches` contains some microbenchmarks for Hydroflow and other frameworks. @@ -33,7 +33,7 @@ There are auxillary repositories as well: * [`hydro-project/rust-sitter`](https://github.com/hydro-project/rust-sitter) provides a [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)-based parser generator interface, used - by `hydroflow_datalog`. + by `dfir_datalog`. ## Rust diff --git a/Cargo.lock b/Cargo.lock index 9b91d9b97125..87c120c5c50d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -317,8 +317,8 @@ name = "benches" version = "0.0.0" dependencies = [ "criterion", + "dfir_rs", "differential-dataflow-master", - "hydroflow", "nameof", "rand", "rand_distr", @@ -871,6 +871,112 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "dfir_datalog" +version = "0.10.0" +dependencies = [ + "dfir_datalog_core", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.75", +] + +[[package]] +name = "dfir_datalog_core" +version = "0.10.0" +dependencies = [ + "dfir_lang", + "insta", + "prettyplease", + "proc-macro2", + "quote", + "rust-sitter", + "rust-sitter-tool", + "slotmap", + "syn 2.0.75", + "tempfile", +] + +[[package]] +name = "dfir_lang" +version = "0.10.0" +dependencies = [ + "auto_impl", + "clap", + "data-encoding", + "itertools", + "prettyplease", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "serde", + "serde_json", + "slotmap", + "syn 2.0.75", + "webbrowser", +] + +[[package]] +name = "dfir_macro" +version = "0.10.0" +dependencies = [ + "dfir_lang", + "itertools", + "proc-macro-crate", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "syn 2.0.75", +] + +[[package]] +name = "dfir_rs" +version = "0.10.0" +dependencies = [ + "bincode", + "byteorder", + "bytes", + "chrono", + "clap", + "colored", + "criterion", + "dfir_datalog", + "dfir_lang", + "dfir_macro", + "futures", + "getrandom", + "hydroflow_deploy_integration", + "insta", + "itertools", + "lattices", + "multiplatform_test", + "pusherator", + "pyo3", + "rand", + "rand_distr", + "ref-cast", + "regex", + "rustc-hash 1.1.0", + "sealed 0.5.0", + "serde", + "serde_json", + "slotmap", + "smallvec", + "static_assertions", + "time", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "tracing-subscriber", + "trybuild", + "variadics", + "wasm-bindgen-test", + "web-time", + "zipf", +] + [[package]] name = "differential-dataflow-master" version = "0.13.0-dev.1" @@ -1187,9 +1293,9 @@ version = "0.1.0" dependencies = [ "clap", "config", + "dfir_rs", "governor", "hostname", - "hydroflow", "lattices", "lazy_static", "notify", @@ -1417,9 +1523,9 @@ dependencies = [ name = "hydro_cli_examples" version = "0.0.0" dependencies = [ + "dfir_datalog", + "dfir_rs", "futures", - "hydroflow", - "hydroflow_datalog", "rand", "serde", "serde_json", @@ -1466,9 +1572,9 @@ dependencies = [ "async-ssh2-lite", "bincode", "ctor", + "dfir_lang", + "dfir_rs", "hydro_deploy", - "hydroflow", - "hydroflow_lang", "insta", "match_box", "nameof", @@ -1522,10 +1628,10 @@ dependencies = [ name = "hydro_test_local" version = "0.0.0" dependencies = [ + "dfir_rs", "futures", "hydro_lang", "hydro_test_local_macro", - "hydroflow", "insta", "rand", "stageleft", @@ -1542,80 +1648,6 @@ dependencies = [ "stageleft_tool", ] -[[package]] -name = "hydroflow" -version = "0.10.0" -dependencies = [ - "bincode", - "byteorder", - "bytes", - "chrono", - "clap", - "colored", - "criterion", - "futures", - "getrandom", - "hydroflow_datalog", - "hydroflow_deploy_integration", - "hydroflow_lang", - "hydroflow_macro", - "insta", - "itertools", - "lattices", - "multiplatform_test", - "pusherator", - "pyo3", - "rand", - "rand_distr", - "ref-cast", - "regex", - "rustc-hash 1.1.0", - "sealed 0.5.0", - "serde", - "serde_json", - "slotmap", - "smallvec", - "static_assertions", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-subscriber", - "trybuild", - "variadics", - "wasm-bindgen-test", - "web-time", - "zipf", -] - -[[package]] -name = "hydroflow_datalog" -version = "0.10.0" -dependencies = [ - "hydroflow_datalog_core", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.75", -] - -[[package]] -name = "hydroflow_datalog_core" -version = "0.10.0" -dependencies = [ - "hydroflow_lang", - "insta", - "prettyplease", - "proc-macro2", - "quote", - "rust-sitter", - "rust-sitter-tool", - "slotmap", - "syn 2.0.75", - "tempfile", -] - [[package]] name = "hydroflow_deploy_integration" version = "0.10.0" @@ -1632,38 +1664,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "hydroflow_lang" -version = "0.10.0" -dependencies = [ - "auto_impl", - "clap", - "data-encoding", - "itertools", - "prettyplease", - "proc-macro2", - "quote", - "rustc_version 0.4.1", - "serde", - "serde_json", - "slotmap", - "syn 2.0.75", - "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" @@ -2955,7 +2955,7 @@ version = "0.0.0" dependencies = [ "anyhow", "datadriven", - "hydroflow", + "dfir_rs", "prettyplease", "proc-macro2", "quote", @@ -3788,9 +3788,9 @@ dependencies = [ name = "topolotree" version = "0.0.0" dependencies = [ + "dfir_datalog", + "dfir_rs", "futures", - "hydroflow", - "hydroflow_datalog", "procinfo", "rand", "serde", @@ -4343,10 +4343,10 @@ name = "website_playground" version = "0.0.0" dependencies = [ "console_error_panic_hook", + "dfir_datalog_core", + "dfir_lang", + "dfir_rs", "futures", - "hydroflow", - "hydroflow_datalog_core", - "hydroflow_lang", "prettyplease", "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index da5b718076f3..9bf1954c9be0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,11 +8,11 @@ members = [ "hydro_deploy/hydro_cli", "hydro_deploy/hydro_cli_examples", "hydro_deploy/hydroflow_deploy_integration", - "hydroflow", - "hydroflow_datalog", - "hydroflow_datalog_core", - "hydroflow_lang", - "hydroflow_macro", + "dfir_rs", + "dfir_datalog", + "dfir_datalog_core", + "dfir_lang", + "dfir_macro", "hydro_lang", "hydro_std", "hydro_test", diff --git a/Dockerfile b/Dockerfile index 67786648c559..65768b2b5b78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ RUN mkdir -p xfer/examples RUN ls -dR target/*/release/examples/* | grep -vE '^.*/[a-z_]+\-.*$' | grep -vE '^.*\.d$' | xargs -I{} cp {} xfer/examples/ -RUN mkdir -p xfer/example_utils && cp hydroflow/example_utils/* xfer/example_utils/. +RUN mkdir -p xfer/example_utils && cp dfir_rs/example_utils/* xfer/example_utils/. # Runtime stage FROM rust:slim-buster diff --git a/RELEASING.md b/RELEASING.md index 88832a6e6608..743b22789a35 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -28,8 +28,8 @@ 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_datalog hydroflow_datalog_core \ + dfir_rs dfir_lang dfir_macro hydro_lang \ + dfir_datalog dfir_datalog_core \ hydro_deploy hydro_cli hydroflow_cli_integration \ hydroflow_plus_cli_integration \ stageleft stageleft_macro stageleft_tool \ @@ -60,20 +60,20 @@ showing that all the changelogs can be modified. Make sure the version bumps loo [INFO ] Updating crates-io index [WARN ] Refused to publish 'hydroflow_deploy_integration' as as it didn't change. [INFO ] Will not publish or alter 3 dependent crates: unchanged = 'hydroflow_deploy_integration', 'variadics', 'pusherator' -[INFO ] WOULD auto-bump dependent package 'hydroflow_lang' from 0.4.0 to 0.5.0 for publishing -[INFO ] WOULD auto-bump dependent package 'hydroflow_datalog_core' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'hydroflow_lang' -[INFO ] WOULD auto-bump dependent package 'hydroflow_datalog' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'hydroflow_datalog_core' -[INFO ] WOULD auto-bump dependent package 'hydroflow_macro' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'hydroflow_lang' +[INFO ] WOULD auto-bump dependent package 'dfir_lang' from 0.4.0 to 0.5.0 for publishing +[INFO ] WOULD auto-bump dependent package 'dfir_datalog_core' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'dfir_lang' +[INFO ] WOULD auto-bump dependent package 'dfir_datalog' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'dfir_datalog_core' +[INFO ] WOULD auto-bump dependent package 'hydroflow_macro' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'dfir_lang' [INFO ] WOULD auto-bump dependent package 'lattices' from 0.4.0 to 0.5.0 for publishing -[INFO ] WOULD minor-bump provided package 'hydroflow' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'hydroflow_datalog' +[INFO ] WOULD minor-bump provided package 'hydroflow' from 0.4.0 to 0.5.0 for publishing, for SAFETY due to breaking package 'dfir_datalog' [INFO ] WOULD minor-bump provided package 'hydro_cli' from 0.4.0 to 0.5.0 for publishing -[INFO ] WOULD adjust 2 manifest versions due to breaking change in 'hydroflow_lang': 'hydroflow_datalog_core' 0.4.0 ➡ 0.5.0, 'hydroflow_macro' 0.4.0 ➡ 0.5.0 -[INFO ] WOULD adjust 1 manifest version due to breaking change in 'hydroflow_datalog_core': 'hydroflow_datalog' 0.4.0 ➡ 0.5.0 -[INFO ] WOULD adjust 1 manifest version due to breaking change in 'hydroflow_datalog': 'hydroflow' 0.4.0 ➡ 0.5.0 +[INFO ] WOULD adjust 2 manifest versions due to breaking change in 'dfir_lang': 'dfir_datalog_core' 0.4.0 ➡ 0.5.0, 'hydroflow_macro' 0.4.0 ➡ 0.5.0 +[INFO ] WOULD adjust 1 manifest version due to breaking change in 'dfir_datalog_core': 'dfir_datalog' 0.4.0 ➡ 0.5.0 +[INFO ] WOULD adjust 1 manifest version due to breaking change in 'dfir_datalog': 'hydroflow' 0.4.0 ➡ 0.5.0 [INFO ] WOULD adjust version constraints in manifests of 2 packages as direct dependencies are changing: relalg, website_playground -[INFO ] WOULD modify existing changelog for 'hydroflow_lang'. -[INFO ] WOULD modify existing changelog for 'hydroflow_datalog_core'. -[INFO ] WOULD modify existing changelog for 'hydroflow_datalog'. +[INFO ] WOULD modify existing changelog for 'dfir_lang'. +[INFO ] WOULD modify existing changelog for 'dfir_datalog_core'. +[INFO ] WOULD modify existing changelog for 'dfir_datalog'. [INFO ] WOULD modify existing changelog for 'hydroflow_macro'. [INFO ] WOULD modify existing changelog for 'lattices'. [INFO ] WOULD modify existing changelog for 'hydroflow'. @@ -85,7 +85,7 @@ showing that all the changelogs can be modified. Make sure the version bumps loo If the job does not succeed or succeeds but fails to generate changelogs for certain packages, then you will need to do a bit of manual work. That looks like this in the log (check for this!): ```log -[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: hydroflow_datalog, hydroflow_macro +[WARN ] WOULD ask for review after commit as the changelog entry is empty for crates: dfir_datalog, hydroflow_macro ``` In this case, you will need to create a commit to each package's `CHANGELOG.md` to mark it as unchanged (or minimally changed). For example, [hydro_datalog 0.4](https://github.com/hydro-project/hydroflow/commit/5faee64ab82eeb7a24f62a1b55c46d72d8eb5320) diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 82c024eba660..bcfbbfa78b59 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -14,7 +14,7 @@ workspace = true [dev-dependencies] criterion = { version = "0.5.0", features = [ "async_tokio", "html_reports" ] } -hydroflow = { path = "../hydroflow", features = [ "debugging" ] } +dfir_rs = { path = "../dfir_rs", features = [ "debugging" ] } nameof = "1.0.0" rand = "0.8.0" rand_distr = "0.4.3" diff --git a/benches/README.md b/benches/README.md index e6c4ab07389a..0c24934db127 100644 --- a/benches/README.md +++ b/benches/README.md @@ -1,6 +1,6 @@ # Microbenchmarks -Of Hydroflow and other crates. +Of Hydro and other crates. Run all benchmarks: ``` diff --git a/benches/benches/arithmetic.rs b/benches/benches/arithmetic.rs index cde87cce81ff..0ea16d34a404 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 dfir_rs::dfir_syntax; use static_assertions::const_assert; use timely::dataflow::operators::{Inspect, Map, ToStream}; @@ -94,9 +94,9 @@ fn benchmark_iter_collect(c: &mut Criterion) { } fn benchmark_hydroflow_compiled(c: &mut Criterion) { - use hydroflow::pusherator::{InputBuild, Pusherator, PusheratorBuild}; + use dfir_rs::pusherator::{InputBuild, Pusherator, PusheratorBuild}; - c.bench_function("arithmetic/hydroflow/compiled", |b| { + c.bench_function("arithmetic/dfir_rs/compiled", |b| { b.iter(|| { let mut pusherator = InputBuild::::new() .map(|x| x + 1) @@ -131,9 +131,9 @@ fn benchmark_hydroflow_compiled(c: &mut Criterion) { } fn benchmark_hydroflow_compiled_no_cheating(c: &mut Criterion) { - use hydroflow::pusherator::{InputBuild, Pusherator, PusheratorBuild}; + use dfir_rs::pusherator::{InputBuild, Pusherator, PusheratorBuild}; - c.bench_function("arithmetic/hydroflow/compiled_no_cheating", |b| { + c.bench_function("arithmetic/dfir_rs/compiled_no_cheating", |b| { b.iter(|| { let mut pusherator = InputBuild::::new() .map(|x| black_box(x + 1)) @@ -169,10 +169,10 @@ fn benchmark_hydroflow_compiled_no_cheating(c: &mut Criterion) { 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("arithmetic/hydroflow/surface", |b| { + c.bench_function("arithmetic/dfir_rs/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..064ecec7f286 100644 --- a/benches/benches/fan_in.rs +++ b/benches/benches/fan_in.rs @@ -1,7 +1,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::handoff::Iter; -use hydroflow::scheduled::query::Query as Q; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::handoff::Iter; +use dfir_rs::scheduled::query::Query as Q; use static_assertions::const_assert; use timely::dataflow::operators::{Concatenate, Inspect, ToStream}; @@ -13,7 +13,7 @@ fn make_ints(i: usize) -> impl Iterator { } fn benchmark_hydroflow(c: &mut Criterion) { - c.bench_function("fan_in/hydroflow", |b| { + c.bench_function("fan_in/dfir_rs", |b| { b.iter(|| { let mut q = Q::new(); @@ -38,9 +38,9 @@ fn benchmark_hydroflow(c: &mut Criterion) { 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| { + c.bench_function("fan_in/dfir_rs/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..9f001bead44e 100644 --- a/benches/benches/fan_out.rs +++ b/benches/benches/fan_out.rs @@ -1,7 +1,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::handoff::Iter; -use hydroflow::scheduled::query::Query as Q; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::handoff::Iter; +use dfir_rs::scheduled::query::Query as Q; use static_assertions::const_assert; use timely::dataflow::operators::{Map, ToStream}; @@ -9,7 +9,7 @@ const NUM_OPS: usize = 20; const NUM_INTS: usize = 1_000_000; fn benchmark_hydroflow_scheduled(c: &mut Criterion) { - c.bench_function("fan_out/hydroflow/scheduled", |b| { + c.bench_function("fan_out/dfir_rs/scheduled", |b| { b.iter(|| { let mut q = Q::new(); @@ -30,9 +30,9 @@ fn benchmark_hydroflow_scheduled(c: &mut Criterion) { 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| { + c.bench_function("fan_out/dfir_rs/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; @@ -68,7 +68,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) { } // fn benchmark_hydroflow_teer(c: &mut Criterion) { -// c.bench_function("fan_out/hydroflow/teer", |b| { +// c.bench_function("fan_out/dfir/teer", |b| { // b.iter(|| { // let mut df = Hydroflow::new(); // let output = df.add_source(|send: &SendCtx>| { diff --git a/benches/benches/fork_join.rs b/benches/benches/fork_join.rs index 4e3ba4c776de..b4fdd3f81c8d 100644 --- a/benches/benches/fork_join.rs +++ b/benches/benches/fork_join.rs @@ -1,9 +1,9 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::{Iter, VecHandoff}; -use hydroflow::scheduled::query::Query as Q; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::{Iter, VecHandoff}; +use dfir_rs::scheduled::query::Query as Q; use timely::dataflow::operators::{Concatenate, Filter, Inspect, ToStream}; const NUM_OPS: usize = 20; @@ -11,9 +11,9 @@ const NUM_INTS: usize = 100_000; const BRANCH_FACTOR: usize = 2; fn benchmark_hydroflow(c: &mut Criterion) { - c.bench_function("fork_join/hydroflow", |b| { + c.bench_function("fork_join/dfir_rs", |b| { b.iter(|| { - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (start_send, start_recv) = df.make_edge::<_, VecHandoff>("start"); @@ -84,7 +84,7 @@ fn benchmark_hydroflow(c: &mut Criterion) { } fn benchmark_hydroflow_surface(c: &mut Criterion) { - c.bench_function("fork_join/hydroflow/surface", |b| { + c.bench_function("fork_join/dfir_rs/surface", |b| { b.iter(|| { let mut hf = include!("fork_join_20.hf"); hf.run_available(); diff --git a/benches/benches/identity.rs b/benches/benches/identity.rs index 5bb28588e644..36e3468be0a8 100644 --- a/benches/benches/identity.rs +++ b/benches/benches/identity.rs @@ -2,8 +2,8 @@ use std::sync::mpsc::channel; use std::thread; use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph_ext::GraphExt; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph_ext::GraphExt; use static_assertions::const_assert; use timely::dataflow::operators::{Inspect, Map, ToStream}; @@ -112,9 +112,9 @@ fn benchmark_timely(c: &mut Criterion) { } fn benchmark_hydroflow_compiled(c: &mut Criterion) { - use hydroflow::pusherator::{InputBuild, Pusherator, PusheratorBuild}; + use dfir_rs::pusherator::{InputBuild, Pusherator, PusheratorBuild}; - c.bench_function("identity/hydroflow/compiled", |b| { + c.bench_function("identity/dfir_rs/compiled", |b| { b.iter(|| { let mut pusherator = InputBuild::::new() .map(black_box) @@ -149,12 +149,12 @@ fn benchmark_hydroflow_compiled(c: &mut Criterion) { } fn benchmark_hydroflow(c: &mut Criterion) { - use hydroflow::scheduled::graph::Hydroflow; - use hydroflow::scheduled::handoff::{Iter, VecHandoff}; + use dfir_rs::scheduled::graph::Dfir; + use dfir_rs::scheduled::handoff::{Iter, VecHandoff}; - c.bench_function("identity/hydroflow", |b| { + c.bench_function("identity/dfir_rs", |b| { b.iter(|| { - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (next_send, mut next_recv) = df.make_edge::<_, VecHandoff>("end"); @@ -188,9 +188,9 @@ fn benchmark_hydroflow(c: &mut Criterion) { 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| { + c.bench_function("identity/dfir_rs/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..6eaef2ccec49 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 dfir_rs::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..4c5e0c7492bf 100644 --- a/benches/benches/reachability.rs +++ b/benches/benches/reachability.rs @@ -5,10 +5,10 @@ use std::rc::Rc; use std::sync::LazyLock; use criterion::{criterion_group, criterion_main, Criterion}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph_ext::GraphExt; use differential_dataflow::input::Input; use differential_dataflow::operators::{Iterate, Join, Threshold}; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph_ext::GraphExt; static EDGES: LazyLock>> = LazyLock::new(|| { let cursor = Cursor::new(include_bytes!("reachability_edges.txt")); @@ -119,17 +119,17 @@ fn benchmark_differential(c: &mut Criterion) { } fn benchmark_hydroflow_scheduled(c: &mut Criterion) { - use hydroflow::scheduled::graph::Hydroflow; - use hydroflow::scheduled::handoff::{Iter, VecHandoff}; - use hydroflow::{var_args, var_expr}; + use dfir_rs::scheduled::graph::Dfir; + use dfir_rs::scheduled::handoff::{Iter, VecHandoff}; + use dfir_rs::{var_args, var_expr}; let edges = &*EDGES; let reachable = &*REACHABLE; - c.bench_function("reachability/hydroflow/scheduled", |b| { + c.bench_function("reachability/dfir_rs/scheduled", |b| { b.iter(|| { // A dataflow that represents graph reachability. - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); type Hoff = VecHandoff; let (reachable_out, union_lhs) = df.make_edge::<_, Hoff>("reachable_out -> union_lhs"); @@ -213,19 +213,19 @@ fn benchmark_hydroflow_scheduled(c: &mut Criterion) { } fn benchmark_hydroflow(c: &mut Criterion) { - use hydroflow::pusherator::for_each::ForEach; - use hydroflow::pusherator::{IteratorToPusherator, PusheratorBuild}; - use hydroflow::scheduled::graph::Hydroflow; - use hydroflow::scheduled::handoff::VecHandoff; - use hydroflow::{var_args, var_expr}; + use dfir_rs::pusherator::for_each::ForEach; + use dfir_rs::pusherator::{IteratorToPusherator, PusheratorBuild}; + use dfir_rs::scheduled::graph::Dfir; + use dfir_rs::scheduled::handoff::VecHandoff; + use dfir_rs::{var_args, var_expr}; let edges = &*EDGES; let reachable = &*REACHABLE; - c.bench_function("reachability/hydroflow", |b| { + c.bench_function("reachability/dfir_rs", |b| { b.iter(|| { // A dataflow that represents graph reachability. - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (reachable_out, origins_in) = df.make_edge::<_, VecHandoff>("reachable -> origins"); @@ -290,7 +290,7 @@ fn benchmark_hydroflow(c: &mut Criterion) { } fn benchmark_hydroflow_surface_cheating(c: &mut Criterion) { - c.bench_function("reachability/hydroflow/surface_cheating", |b| { + c.bench_function("reachability/dfir_rs/surface_cheating", |b| { b.iter_batched( || { let reachable_verts = Rc::new(RefCell::new(HashSet::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; @@ -320,7 +320,7 @@ fn benchmark_hydroflow_surface_cheating(c: &mut Criterion) { } fn benchmark_hydroflow_surface(c: &mut Criterion) { - c.bench_function("reachability/hydroflow/surface", |b| { + c.bench_function("reachability/dfir_rs/surface", |b| { let edges: Vec<_> = EDGES .iter() .flat_map(|(&k, v)| v.iter().map(move |v| (k, *v))) @@ -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/symmetric_hash_join.rs b/benches/benches/symmetric_hash_join.rs index 1834c767cc27..a4dce40df415 100644 --- a/benches/benches/symmetric_hash_join.rs +++ b/benches/benches/symmetric_hash_join.rs @@ -1,7 +1,7 @@ use std::hint::black_box; use criterion::{criterion_group, criterion_main, Criterion}; -use hydroflow::compiled::pull::{symmetric_hash_join_into_iter, HalfSetJoinState}; +use dfir_rs::compiled::pull::{symmetric_hash_join_into_iter, HalfSetJoinState}; use rand::distributions::Distribution; use rand::rngs::StdRng; use rand::SeedableRng; diff --git a/benches/benches/words_diamond.rs b/benches/benches/words_diamond.rs index c3c4c1e133b7..82d2c279c3d1 100644 --- a/benches/benches/words_diamond.rs +++ b/benches/benches/words_diamond.rs @@ -3,8 +3,8 @@ use std::path::PathBuf; use std::sync::LazyLock; use criterion::{criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; -use hydroflow::itertools::Itertools; +use dfir_rs::dfir_syntax; +use dfir_rs::itertools::Itertools; use nameof::name_of; const OUTPUT: usize = 5_123_595; @@ -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/Cargo.toml b/datastores/gossip_kv/Cargo.toml index c2b7e8dc243b..bc7dee089815 100644 --- a/datastores/gossip_kv/Cargo.toml +++ b/datastores/gossip_kv/Cargo.toml @@ -11,7 +11,7 @@ clap = { version = "4.5.4", features = ["derive", "env"] } config = "0.14.0" governor = "0.7.0" hostname = "0.4.0" -hydroflow = { path="../../hydroflow" } +dfir_rs = { path= "../../dfir_rs" } lattices = { path = '../../lattices'} lazy_static = "1.5.0" # The specific set of features for Notify are picked to disable the default cross-beam channels (cause problems with diff --git a/datastores/gossip_kv/cli/main.rs b/datastores/gossip_kv/cli/main.rs index 8834da9ce459..d008387b900c 100644 --- a/datastores/gossip_kv/cli/main.rs +++ b/datastores/gossip_kv/cli/main.rs @@ -1,9 +1,9 @@ use std::net::SocketAddr; use clap::{CommandFactory, Parser, Subcommand}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::{dfir_syntax, tokio, DemuxEnum}; use gossip_kv::{ClientRequest, ClientResponse, Key}; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow::{hydroflow_syntax, tokio, DemuxEnum}; use tracing::error; /// CLI program to interact with Layer 0 gossip store. @@ -80,7 +80,7 @@ fn parse_command(line: String) -> Option { } } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { tracing_subscriber::fmt::init(); @@ -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/lattices/mod.rs b/datastores/gossip_kv/kv/lattices/mod.rs index 1aa5883b4bda..d9d6098638d5 100644 --- a/datastores/gossip_kv/kv/lattices/mod.rs +++ b/datastores/gossip_kv/kv/lattices/mod.rs @@ -2,7 +2,7 @@ use std::cmp::Ordering; use std::collections::HashSet; use std::hash::Hash; -use hydroflow::lattices::{IsBot, IsTop, LatticeFrom, LatticeOrd, Merge}; +use dfir_rs::lattices::{IsBot, IsTop, LatticeFrom, LatticeOrd, Merge}; use serde::{Deserialize, Serialize}; /// A bounded set union lattice with a fixed size N. @@ -191,7 +191,7 @@ where #[cfg(test)] mod tests { - use hydroflow::lattices::test::check_all; + use dfir_rs::lattices::test::check_all; use super::*; diff --git a/datastores/gossip_kv/kv/model.rs b/datastores/gossip_kv/kv/model.rs index 3d17d78d3b68..5a4d349496c2 100644 --- a/datastores/gossip_kv/kv/model.rs +++ b/datastores/gossip_kv/kv/model.rs @@ -1,6 +1,6 @@ -use hydroflow::lattices::map_union::MapUnionHashMap; -use hydroflow::lattices::set_union::SetUnionHashSet; -use hydroflow::lattices::{DomPair, Max}; +use dfir_rs::lattices::map_union::MapUnionHashMap; +use dfir_rs::lattices::set_union::SetUnionHashSet; +use dfir_rs::lattices::{DomPair, Max}; use crate::Namespace; @@ -77,7 +77,7 @@ pub fn delete_row( mod tests { use std::collections::HashSet; - use hydroflow::lattices::Merge; + use dfir_rs::lattices::Merge; use crate::model::{delete_row, upsert_row, Clock, Namespaces, RowKey, TableName}; use crate::Namespace::System; diff --git a/datastores/gossip_kv/kv/server.rs b/datastores/gossip_kv/kv/server.rs index a36d89013c40..553a9991aebe 100644 --- a/datastores/gossip_kv/kv/server.rs +++ b/datastores/gossip_kv/kv/server.rs @@ -2,13 +2,13 @@ use std::collections::{HashMap, HashSet}; use std::fmt::Debug; use std::hash::Hash; -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; -use hydroflow::lattices::{Lattice, PairBimorphism}; -use hydroflow::scheduled::graph::Hydroflow; +use dfir_rs::dfir_syntax; +use dfir_rs::futures::{Sink, Stream}; +use dfir_rs::itertools::Itertools; +use dfir_rs::lattices::map_union::{KeyedBimorphism, MapUnionHashMap, MapUnionSingletonMap}; +use dfir_rs::lattices::set_union::SetUnionHashSet; +use dfir_rs::lattices::{Lattice, PairBimorphism}; +use dfir_rs::scheduled::graph::Dfir; use lattices::set_union::SetUnion; use lattices::{IsTop, Max, Pair}; use lazy_static::lazy_static; @@ -82,7 +82,7 @@ pub fn server< member_info: MemberData, seed_nodes: Vec>, seed_node_stream: SeedNodeStream, -) -> Hydroflow<'static> +) -> Dfir<'static> where ClientInput: Stream + Unpin + 'static, ClientOutput: Sink<(ClientResponse, Addr), Error = ClientOutputError> + Unpin + 'static, @@ -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)); @@ -351,13 +351,13 @@ where mod tests { use std::collections::HashSet; - use hydroflow::tokio_stream::empty; - use hydroflow::util::simulation::{Address, Fleet, Hostname}; + use dfir_rs::tokio_stream::empty; + use dfir_rs::util::simulation::{Address, Fleet, Hostname}; use super::*; use crate::membership::{MemberDataBuilder, Protocol}; - #[hydroflow::test] + #[dfir_rs::test] async fn test_member_init() { let mut fleet = Fleet::new(); @@ -366,7 +366,7 @@ mod tests { let server_client_address = Address::new(server_name.clone(), "client".to_string()); let server_gossip_address = Address::new(server_name.clone(), "gossip".to_string()); - let (_, gossip_trigger_rx) = hydroflow::util::unbounded_channel::<()>(); + let (_, gossip_trigger_rx) = dfir_rs::util::unbounded_channel::<()>(); // Create the kv server fleet.add_host(server_name.clone(), |ctx| { @@ -403,8 +403,8 @@ mod tests { let key = "/sys/members/server".parse::().unwrap(); - let (trigger_tx, trigger_rx) = hydroflow::util::unbounded_channel::<()>(); - let (response_tx, mut response_rx) = hydroflow::util::unbounded_channel::(); + let (trigger_tx, trigger_rx) = dfir_rs::util::unbounded_channel::<()>(); + let (response_tx, mut response_rx) = dfir_rs::util::unbounded_channel::(); let key_clone = key.clone(); let server_client_address_clone = server_client_address.clone(); @@ -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); @@ -444,8 +444,7 @@ mod tests { loop { fleet.run_single_tick_all_hosts().await; - let responses = - hydroflow::util::collect_ready_async::, _>(&mut response_rx).await; + let responses = dfir_rs::util::collect_ready_async::, _>(&mut response_rx).await; if !responses.is_empty() { assert_eq!( @@ -462,7 +461,7 @@ mod tests { } } - #[hydroflow::test] + #[dfir_rs::test] async fn test_multiple_values_same_tick() { let mut fleet = Fleet::new(); @@ -470,7 +469,7 @@ mod tests { let server_client_address = Address::new(server_name.clone(), "client".to_string()); - let (_, gossip_trigger_rx) = hydroflow::util::unbounded_channel::<()>(); + let (_, gossip_trigger_rx) = dfir_rs::util::unbounded_channel::<()>(); // Create the kv server fleet.add_host(server_name.clone(), |ctx| { @@ -514,13 +513,13 @@ mod tests { let writer_name: Hostname = "writer".to_string(); - let (writer_trigger_tx, writer_trigger_rx) = hydroflow::util::unbounded_channel::(); + let (writer_trigger_tx, writer_trigger_rx) = dfir_rs::util::unbounded_channel::(); let key_clone = key.clone(); let server_client_address_clone = server_client_address.clone(); 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) @@ -547,8 +546,8 @@ mod tests { // Read the value back. let reader_name: Hostname = "reader".to_string(); - let (reader_trigger_tx, reader_trigger_rx) = hydroflow::util::unbounded_channel::<()>(); - let (response_tx, mut response_rx) = hydroflow::util::unbounded_channel::(); + let (reader_trigger_tx, reader_trigger_rx) = dfir_rs::util::unbounded_channel::<()>(); + let (response_tx, mut response_rx) = dfir_rs::util::unbounded_channel::(); let key_clone = key.clone(); let server_client_address_clone = server_client_address.clone(); @@ -557,7 +556,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) @@ -575,8 +574,7 @@ mod tests { loop { fleet.run_single_tick_all_hosts().await; - let responses = - hydroflow::util::collect_ready_async::, _>(&mut response_rx).await; + let responses = dfir_rs::util::collect_ready_async::, _>(&mut response_rx).await; if !responses.is_empty() { assert_eq!( @@ -591,7 +589,7 @@ mod tests { } } - #[hydroflow::test] + #[dfir_rs::test] async fn test_gossip() { let subscriber = tracing_subscriber::FmtSubscriber::builder() .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) @@ -622,7 +620,7 @@ mod tests { }, ]; - let (gossip_trigger_tx_a, gossip_trigger_rx_a) = hydroflow::util::unbounded_channel::<()>(); + let (gossip_trigger_tx_a, gossip_trigger_rx_a) = dfir_rs::util::unbounded_channel::<()>(); let seed_nodes_clone = seed_nodes.clone(); fleet.add_host(server_a.clone(), |ctx| { @@ -655,7 +653,7 @@ mod tests { ) }); - let (_, gossip_trigger_rx_b) = hydroflow::util::unbounded_channel::<()>(); + let (_, gossip_trigger_rx_b) = dfir_rs::util::unbounded_channel::<()>(); let seed_nodes_clone = seed_nodes.clone(); fleet.add_host(server_b.clone(), |ctx| { @@ -696,14 +694,14 @@ mod tests { let writer_name: Hostname = "writer".to_string(); - let (writer_trigger_tx, writer_trigger_rx) = hydroflow::util::unbounded_channel::(); + let (writer_trigger_tx, writer_trigger_rx) = dfir_rs::util::unbounded_channel::(); let key_clone = key.clone(); let server_a_client_address_clone = server_a_client_address.clone(); 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) @@ -714,8 +712,8 @@ mod tests { let reader_name: Hostname = "reader".to_string(); - let (reader_trigger_tx, reader_trigger_rx) = hydroflow::util::unbounded_channel::<()>(); - let (response_tx, mut response_rx) = hydroflow::util::unbounded_channel::(); + let (reader_trigger_tx, reader_trigger_rx) = dfir_rs::util::unbounded_channel::<()>(); + let (response_tx, mut response_rx) = dfir_rs::util::unbounded_channel::(); let key_clone = key.clone(); let server_b_client_address_clone = server_b_client_address.clone(); @@ -724,7 +722,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) @@ -743,8 +741,7 @@ mod tests { loop { reader_trigger_tx.send(()).unwrap(); fleet.run_single_tick_all_hosts().await; - let responses = - hydroflow::util::collect_ready_async::, _>(&mut response_rx).await; + let responses = dfir_rs::util::collect_ready_async::, _>(&mut response_rx).await; if !responses.is_empty() { assert_eq!( diff --git a/datastores/gossip_kv/kv/util.rs b/datastores/gossip_kv/kv/util.rs index 4cc391da6e7a..a34d8f2246f8 100644 --- a/datastores/gossip_kv/kv/util.rs +++ b/datastores/gossip_kv/kv/util.rs @@ -1,4 +1,4 @@ -use hydroflow::DemuxEnum; +use dfir_rs::DemuxEnum; use crate::model::{Clock, Namespaces}; use crate::{ClientRequest, GossipMessage, Key}; diff --git a/datastores/gossip_kv/load_test_server/server.rs b/datastores/gossip_kv/load_test_server/server.rs index 88bd40e3fb32..df9df93699a4 100644 --- a/datastores/gossip_kv/load_test_server/server.rs +++ b/datastores/gossip_kv/load_test_server/server.rs @@ -4,10 +4,10 @@ use std::thread::sleep; use std::time::Duration; use clap::Parser; +use dfir_rs::util::{unbounded_channel, unsync_channel}; use gossip_kv::membership::{MemberDataBuilder, Protocol}; use gossip_kv::{ClientRequest, GossipMessage}; use governor::{Quota, RateLimiter}; -use hydroflow::util::{unbounded_channel, unsync_channel}; use prometheus::{gather, Encoder, TextEncoder}; use tokio::sync::mpsc::UnboundedSender; use tokio::task; @@ -16,11 +16,11 @@ use warp::Filter; type LoadTestAddress = u64; +use dfir_rs::futures::sink::drain; +use dfir_rs::futures::stream; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; +use dfir_rs::tokio_stream::StreamExt; use gossip_kv::server::{server, SeedNode}; -use hydroflow::futures::sink::drain; -use hydroflow::futures::stream; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; -use hydroflow::tokio_stream::StreamExt; use lattices::cc_traits::Iter; const UNKNOWN_ADDRESS: LoadTestAddress = 9999999999; diff --git a/datastores/gossip_kv/server/config/mod.rs b/datastores/gossip_kv/server/config/mod.rs index 13ff54873ad2..8df2aae8e96f 100644 --- a/datastores/gossip_kv/server/config/mod.rs +++ b/datastores/gossip_kv/server/config/mod.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use config::{Config, ConfigError, File}; -use hydroflow::futures::future::ready; -use hydroflow::futures::{Stream, StreamExt}; +use dfir_rs::futures::future::ready; +use dfir_rs::futures::{Stream, StreamExt}; use notify::{Event, EventHandler, EventKind, RecommendedWatcher, RecursiveMode, Watcher}; use serde::{Deserialize, Serialize}; use tokio::sync::mpsc::UnboundedSender; @@ -76,7 +76,7 @@ pub fn setup_settings_watch() -> ( ServerSettings, impl Stream, ) { - let (tx, rx) = hydroflow::util::unbounded_channel(); + let (tx, rx) = dfir_rs::util::unbounded_channel(); // Setup the watcher let mut watcher = notify::RecommendedWatcher::new( diff --git a/datastores/gossip_kv/server/main.rs b/datastores/gossip_kv/server/main.rs index bca640e9449b..656232842e75 100644 --- a/datastores/gossip_kv/server/main.rs +++ b/datastores/gossip_kv/server/main.rs @@ -8,12 +8,12 @@ use std::num::ParseFloatError; use std::time::Duration; use clap::Parser; +use dfir_rs::futures::{Sink, SinkExt, StreamExt}; +use dfir_rs::tokio_stream::wrappers::IntervalStream; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::{bincode, bytes, tokio}; use gossip_kv::membership::{MemberDataBuilder, Protocol}; use gossip_kv::server::{server, SeedNode}; -use hydroflow::futures::{Sink, SinkExt, StreamExt}; -use hydroflow::tokio_stream::wrappers::IntervalStream; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow::{bincode, bytes, tokio}; use prometheus::{gather, Encoder, TextEncoder}; use serde::Serialize; use tracing::{error, info, trace}; @@ -82,7 +82,7 @@ where { outbound.with(|(msg, addr): (Message, SocketAddr)| { ready(Ok::<(bytes::Bytes, SocketAddr), Error>(( - hydroflow::util::serialize_to_bytes(msg), + dfir_rs::util::serialize_to_bytes(msg), addr, ))) }) @@ -91,15 +91,15 @@ where /// Setup deserialization for inbound networking messages. fn setup_inbound_deserialization( inbound: Inbound, -) -> impl hydroflow::futures::Stream +) -> impl dfir_rs::futures::Stream where - Inbound: hydroflow::futures::Stream>, + Inbound: dfir_rs::futures::Stream>, Message: for<'de> serde::Deserialize<'de> + Debug + Send + 'static, { inbound.filter_map(|input| { let mapped = match input { Ok((bytes, addr)) => { - let msg: bincode::Result = hydroflow::util::deserialize_from_bytes(&bytes); + let msg: bincode::Result = dfir_rs::util::deserialize_from_bytes(&bytes); match msg { Ok(msg) => Some((msg, addr)), Err(e) => { @@ -117,7 +117,7 @@ where }) } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { tracing_subscriber::fmt::init(); diff --git a/hydroflow_datalog/CHANGELOG.md b/dfir_datalog/CHANGELOG.md similarity index 100% rename from hydroflow_datalog/CHANGELOG.md rename to dfir_datalog/CHANGELOG.md diff --git a/hydroflow_datalog/Cargo.toml b/dfir_datalog/Cargo.toml similarity index 77% rename from hydroflow_datalog/Cargo.toml rename to dfir_datalog/Cargo.toml index c4771f901c7a..5f4ff294842e 100644 --- a/hydroflow_datalog/Cargo.toml +++ b/dfir_datalog/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "hydroflow_datalog" +name = "dfir_datalog" publish = true version = "0.10.0" edition = "2021" license = "Apache-2.0" -documentation = "https://docs.rs/hydroflow_datalog/" +documentation = "https://docs.rs/dfir_datalog/" description = "Datalog proc-macro for Hydroflow" [lints] @@ -22,4 +22,4 @@ proc-macro-crate = "1.0.0" # Note: If we ever compile this proc macro crate to WASM (e.g., if we are # building on a WASM host), we may need to turn diagnostics off for WASM if # proc_macro2 does not support WASM at that time. -hydroflow_datalog_core = { path = "../hydroflow_datalog_core", version = "^0.10.0" } +dfir_datalog_core = { path = "../dfir_datalog_core", version = "^0.10.0" } diff --git a/hydroflow_datalog/src/lib.rs b/dfir_datalog/src/lib.rs similarity index 82% rename from hydroflow_datalog/src/lib.rs rename to dfir_datalog/src/lib.rs index 919115bd986b..4b6152f5117f 100644 --- a/hydroflow_datalog/src/lib.rs +++ b/dfir_datalog/src/lib.rs @@ -1,5 +1,5 @@ -use hydroflow_datalog_core::diagnostic::Diagnostic; -use hydroflow_datalog_core::{gen_hydroflow_graph, hydroflow_graph_to_program}; +use dfir_datalog_core::diagnostic::Diagnostic; +use dfir_datalog_core::{gen_hydroflow_graph, hydroflow_graph_to_program}; use proc_macro2::Span; use quote::{quote, ToTokens}; @@ -16,8 +16,8 @@ pub fn datalog(item: proc_macro::TokenStream) -> proc_macro::TokenStream { #item }; - let hydroflow_crate = proc_macro_crate::crate_name("hydroflow") - .expect("hydroflow should be present in `Cargo.toml`"); + let hydroflow_crate = + proc_macro_crate::crate_name("dfir_rs").expect("dfir_rs should be present in `Cargo.toml`"); let root = match hydroflow_crate { proc_macro_crate::FoundCrate::Itself => quote! { hydroflow }, proc_macro_crate::FoundCrate::Name(name) => { @@ -38,7 +38,7 @@ pub fn datalog(item: proc_macro::TokenStream) -> proc_macro::TokenStream { proc_macro::TokenStream::from(quote! { { #diagnostic_tokens - hydroflow::scheduled::graph::Hydroflow::new() + dfir_rs::scheduled::graph::Dfir::new() } }) } diff --git a/hydroflow_datalog_core/CHANGELOG.md b/dfir_datalog_core/CHANGELOG.md similarity index 100% rename from hydroflow_datalog_core/CHANGELOG.md rename to dfir_datalog_core/CHANGELOG.md diff --git a/hydroflow_datalog_core/Cargo.toml b/dfir_datalog_core/Cargo.toml similarity index 68% rename from hydroflow_datalog_core/Cargo.toml rename to dfir_datalog_core/Cargo.toml index ab7a2b1a7688..b5e68b4bd85f 100644 --- a/hydroflow_datalog_core/Cargo.toml +++ b/dfir_datalog_core/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "hydroflow_datalog_core" +name = "dfir_datalog_core" publish = true version = "0.10.0" edition = "2021" license = "Apache-2.0" -documentation = "https://docs.rs/hydroflow_datalog_core/" -description = "Datalog implementation for Hydroflow" +documentation = "https://docs.rs/dfir_datalog_core/" +description = "Datalog implementation for DFIR" [lints] workspace = true @@ -19,7 +19,7 @@ slotmap = "1.0.0" syn = { version = "2.0.46", features = [ "parsing", "extra-traits" ] } proc-macro2 = "1.0.74" rust-sitter = "0.4.3" -hydroflow_lang = { path = "../hydroflow_lang", version = "^0.10.0" } +dfir_lang = { path = "../dfir_lang", version = "^0.10.0" } [build-dependencies] rust-sitter-tool = "0.4.3" diff --git a/hydroflow_datalog_core/build.rs b/dfir_datalog_core/build.rs similarity index 100% rename from hydroflow_datalog_core/build.rs rename to dfir_datalog_core/build.rs diff --git a/hydroflow_datalog_core/src/grammar.rs b/dfir_datalog_core/src/grammar.rs similarity index 100% rename from hydroflow_datalog_core/src/grammar.rs rename to dfir_datalog_core/src/grammar.rs diff --git a/hydroflow_datalog_core/src/join_plan.rs b/dfir_datalog_core/src/join_plan.rs similarity index 99% rename from hydroflow_datalog_core/src/join_plan.rs rename to dfir_datalog_core/src/join_plan.rs index 6bdd103ad72d..66739bf39e9b 100644 --- a/hydroflow_datalog_core/src/join_plan.rs +++ b/dfir_datalog_core/src/join_plan.rs @@ -1,9 +1,9 @@ use std::collections::btree_map::Entry; use std::collections::{BTreeMap, HashMap}; -use hydroflow_lang::diagnostic::{Diagnostic, Level}; -use hydroflow_lang::graph::FlatGraphBuilder; -use hydroflow_lang::parse::Pipeline; +use dfir_lang::diagnostic::{Diagnostic, Level}; +use dfir_lang::graph::FlatGraphBuilder; +use dfir_lang::parse::Pipeline; use proc_macro2::Span; use rust_sitter::Spanned; use syn::{parse_quote, parse_quote_spanned}; @@ -568,7 +568,7 @@ pub fn expand_join_plan( } else { flat_graph_builder.add_statement( parse_quote_spanned! {get_span(rule_span)=> - #join_node = join::<#lt_left, #lt_right, hydroflow::compiled::pull::HalfMultisetJoinState>() -> map(#flatten_closure); + #join_node = join::<#lt_left, #lt_right, dfir_rs::compiled::pull::HalfMultisetJoinState>() -> map(#flatten_closure); } ); } diff --git a/hydroflow_datalog_core/src/lib.rs b/dfir_datalog_core/src/lib.rs similarity index 97% rename from hydroflow_datalog_core/src/lib.rs rename to dfir_datalog_core/src/lib.rs index 64835e74ab6e..748d0693c3e1 100644 --- a/hydroflow_datalog_core/src/lib.rs +++ b/dfir_datalog_core/src/lib.rs @@ -1,12 +1,10 @@ use std::collections::{HashMap, HashSet}; use std::ops::Deref; -pub use hydroflow_lang::diagnostic; -use hydroflow_lang::diagnostic::{Diagnostic, Level}; -use hydroflow_lang::graph::{ - eliminate_extra_unions_tees, partition_graph, FlatGraphBuilder, HydroflowGraph, -}; -use hydroflow_lang::parse::{ +pub use dfir_lang::diagnostic; +use dfir_lang::diagnostic::{Diagnostic, Level}; +use dfir_lang::graph::{eliminate_extra_unions_tees, partition_graph, DfirGraph, FlatGraphBuilder}; +use dfir_lang::parse::{ HfStatement, IndexInt, Indexing, Pipeline, PipelineLink, PipelineStatement, PortIndex, }; use proc_macro2::{Span, TokenStream}; @@ -55,9 +53,7 @@ pub fn parse_static( }) } -pub fn gen_hydroflow_graph( - literal: proc_macro2::Literal, -) -> Result> { +pub fn gen_hydroflow_graph(literal: proc_macro2::Literal) -> Result> { let offset = { // This includes the quotes, i.e. 'r#"my test"#' or '"hello\nworld"'. let source_str = literal.to_string(); @@ -325,7 +321,7 @@ fn handle_errors( diagnostics } -pub fn hydroflow_graph_to_program(flat_graph: HydroflowGraph, root: TokenStream) -> TokenStream { +pub fn hydroflow_graph_to_program(flat_graph: DfirGraph, root: TokenStream) -> TokenStream { let partitioned_graph = partition_graph(flat_graph).expect("Failed to partition (cycle detected)."); @@ -744,8 +740,8 @@ fn apply_aggregations( } Aggregation::CountUnique(..) => { parse_quote!({ - let prev: (hydroflow::rustc_hash::FxHashSet<_>, _) = prev; - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev.0; + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; if set.insert(#val_at_index) { (set, prev.1 + 1) } else { @@ -755,7 +751,7 @@ fn apply_aggregations( } Aggregation::CollectVec(..) => { parse_quote!({ - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev; set.insert(#val_at_index); set }) @@ -777,14 +773,14 @@ fn apply_aggregations( } Aggregation::CountUnique(..) => { parse_quote!({ - let mut set = hydroflow::rustc_hash::FxHashSet::<_>::default(); + let mut set = dfir_rs::rustc_hash::FxHashSet::<_>::default(); set.insert(#val_at_index); (set, 1) }) } Aggregation::CollectVec(..) => { parse_quote!({ - let mut set = hydroflow::rustc_hash::FxHashSet::<_>::default(); + let mut set = dfir_rs::rustc_hash::FxHashSet::<_>::default(); set.insert(#val_at_index); set }) diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@datalog_program.snap new file mode 100644 index 000000000000..970f27ea57ad --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@datalog_program.snap @@ -0,0 +1,1136 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , ((row . 0) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () . 1 , g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + val . 0) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,))\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Operator\":\"identity ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":24,\"version\":1}],\"version\":5},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":14,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":7,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":3},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":2,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":false,\"version\":1}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_1v3_send, hoff_1v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(1v3)"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_7v3_send, hoff_7v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(7v3)"); + let (hoff_9v3_send, hoff_9v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(9v3)"); + let (hoff_23v1_send, hoff_23v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(23v1)"); + let (hoff_25v1_send, hoff_25v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(25v1)"); + let mut sg_5v1_node_10v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_5v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_14v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_2v1_node_21v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + let sg_2v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_17v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(5v1)", + 0, + var_expr!(), + var_expr!(hoff_1v3_send, hoff_9v3_send, hoff_23v1_send), + false, + move | + context, + var_args!(), + var_args!(hoff_1v3_send, hoff_9v3_send, hoff_23v1_send)| + { + let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_1v3_send.give(Some(v)); + }); + let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_9v3_send.give(Some(v)); + }); + let hoff_23v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_23v1_send.give(Some(v)); + }); + let op_10v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_5v1_node_10v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__source_stream__loc_nopath_3_25_3_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__source_stream__loc_nopath_3_25_3_44(op_10v1) + }; + let op_2v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_5v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_3_19_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_3_19_3_23(op_2v1) + }; + let op_20v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.1,), (row.0,)), + hoff_23v1_send, + ); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_20v1__map__loc_nopath_1_0_1_0(op_20v1) + }; + let op_16v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.1,), (row.0,)), + hoff_1v3_send, + ); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_16v1__map__loc_nopath_1_0_1_0(op_16v1) + }; + let op_13v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.1,), ((row.0),)), + hoff_9v3_send, + ); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + op_13v1, + hydroflow::pusherator::tee::Tee::new(op_16v1, op_20v1), + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_3_19_3_23< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_3_19_3_23(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_5v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_5v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 1, + var_expr!(hoff_9v3_recv, hoff_25v1_recv), + var_expr!(), + false, + move |context, var_args!(hoff_9v3_recv, hoff_25v1_recv), var_args!()| { + let mut hoff_9v3_recv = hoff_9v3_recv.borrow_mut_swap(); + let hoff_9v3_recv = hoff_9v3_recv.drain(..); + let mut hoff_25v1_recv = hoff_25v1_recv.borrow_mut_swap(); + let hoff_25v1_recv = hoff_25v1_recv.drain(..); + let mut sg_1v1_node_14v1_hashtable = context + .state_ref(sg_1v1_node_14v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_9v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_1v1_node_14v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some({ + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; + if set.insert(val.0) { + (set, prev.1 + 1) + } else { + (set, prev.1) + } + }) + } else { + Some({ + let mut set = dfir_rs::rustc_hash::FxHashSet::< + _, + >::default(); + set.insert(val.0); + (set, 1) + }) + }; + }, + ); + } + } + let op_14v1 = sg_1v1_node_14v1_hashtable.drain(); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__fold_keyed__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_14v1.map(|(g, a): ((_,), _)| (a.0.unwrap().1, g.0)); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_1_0_1_0(op_15v1) + }; + let op_19v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_25v1_recv) + }; + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__defer_tick__loc_nopath_8_30_8_32< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__defer_tick__loc_nopath_8_30_8_32(op_19v1) + }; + let op_4v1 = { + #[allow(unused)] + #[inline(always)] + fn check_inputs< + A: ::std::iter::Iterator, + B: ::std::iter::Iterator, + Item, + >(a: A, b: B) -> impl ::std::iter::Iterator { + a.chain(b) + } + check_inputs(op_15v1, op_19v1) + }; + let op_4v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_4v1__union__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_4v1__union__loc_nopath_4_20_4_26(op_4v1) + }; + let op_5v1 = op_4v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_11v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_11v1__for_each__loc_nopath_4_28_4_65(op_11v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_11v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 1, + var_expr!(hoff_23v1_recv), + var_expr!(), + false, + move |context, var_args!(hoff_23v1_recv), var_args!()| { + let mut hoff_23v1_recv = hoff_23v1_recv.borrow_mut_swap(); + let hoff_23v1_recv = hoff_23v1_recv.drain(..); + let mut sg_2v1_node_21v1_hashtable = context + .state_ref(sg_2v1_node_21v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_23v1_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_2v1_node_21v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some(prev) + } else { + Some(val.0) + }; + }, + ); + } + } + let op_21v1 = sg_2v1_node_21v1_hashtable.drain(); + let op_21v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_21v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_21v1__fold_keyed__loc_nopath_1_0_1_0(op_21v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_22v1 = op_21v1.map(|(g, a): ((_,), _)| (a.0.unwrap(), g.0)); + let op_22v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_22v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_22v1__map__loc_nopath_1_0_1_0(op_22v1) + }; + let op_8v1 = op_22v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_5_20_5_27< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_5_20_5_27(op_8v1) + }; + let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result2.send(v).unwrap() + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__for_each__loc_nopath_5_29_5_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__for_each__loc_nopath_5_29_5_67(op_12v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_8v1, op_12v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(3v1)", + 1, + var_expr!(hoff_1v3_recv), + var_expr!(hoff_7v3_send), + false, + move |context, var_args!(hoff_1v3_recv), var_args!(hoff_7v3_send)| { + let mut hoff_1v3_recv = hoff_1v3_recv.borrow_mut_swap(); + let hoff_1v3_recv = hoff_1v3_recv.drain(..); + let hoff_7v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_7v3_send.give(Some(v)); + }); + let mut sg_3v1_node_17v1_hashtable = context + .state_ref(sg_3v1_node_17v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_1v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_3v1_node_17v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some(prev + val.0) + } else { + Some(val.0) + }; + }, + ); + } + } + let op_17v1 = sg_3v1_node_17v1_hashtable.drain(); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__fold_keyed__loc_nopath_1_0_1_0(op_17v1) + }; + #[inline(always)] + fn pivot_run_sg_3v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_3v1(op_17v1, hoff_7v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(4v1)", + 1, + var_expr!(hoff_7v3_recv), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(hoff_7v3_recv), var_args!(hoff_6v3_send)| { + let mut hoff_7v3_recv = hoff_7v3_recv.borrow_mut_swap(); + let hoff_7v3_recv = hoff_7v3_recv.drain(..); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = hoff_7v3_recv + .map(|(g, a): ((_,), _)| (a.0.unwrap(), g.0)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_1_0_1_0(op_18v1) + }; + #[inline(always)] + fn pivot_run_sg_4v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_4v1(op_18v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(6v1)", + 2, + var_expr!(hoff_6v3_recv), + var_expr!(hoff_25v1_send), + false, + move |context, var_args!(hoff_6v3_recv), var_args!(hoff_25v1_send)| { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let hoff_25v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_25v1_send.give(Some(v)); + }); + let op_24v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_6v3_recv) + }; + let op_24v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_24v1__identity__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_24v1__identity__loc_nopath_1_0_1_0(op_24v1) + }; + #[inline(always)] + fn pivot_run_sg_6v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_6v1(op_24v1, hoff_25v1_send); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@surface_graph.snap new file mode 100644 index 000000000000..a5de206f275c --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_and_comments@surface_graph.snap @@ -0,0 +1,41 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +4v1 = union (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +10v1 = source_stream (ints); +11v1 = for_each (| v | result . send (v) . unwrap ()); +12v1 = for_each (| v | result2 . send (v) . unwrap ()); +13v1 = map (| row : (_ , _ ,) | ((row . 1 ,) , ((row . 0) ,))); +14v1 = fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; }); +15v1 = map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () . 1 , g . 0 ,)); +16v1 = map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,))); +17v1 = fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + val . 0) } else { Some (val . 0) } ; }); +18v1 = map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,)); +19v1 = defer_tick (); +20v1 = map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,))); +21v1 = fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev) } else { Some (val . 0) } ; }); +22v1 = map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,)); + +10v1 -> 2v1; +2v1 -> 3v1; +4v1 -> 5v1; +22v1 -> 8v1; +5v1 -> 11v1; +8v1 -> 12v1; +15v1 -> 4v1; +14v1 -> 15v1; +13v1 -> 14v1; +3v1 -> 13v1; +19v1 -> 4v1; +18v1 -> 19v1; +17v1 -> 18v1; +16v1 -> 17v1; +3v1 -> 16v1; +21v1 -> 22v1; +20v1 -> 21v1; +3v1 -> 20v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap new file mode 100644 index 000000000000..115f312fb081 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap @@ -0,0 +1,429 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 % 2 ,) , (row . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + val . 0) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 , a . 0 . unwrap () ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let mut sg_2v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_2v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_10v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_6v3_send)| { + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_25_2_44(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1.map(|row: (_, _)| ((row.0 % 2,), (row.1,))); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_1_0_1_0(op_9v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_9v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 1, + var_expr!(hoff_6v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_6v3_recv), var_args!()| { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut sg_1v1_node_10v1_hashtable = context + .state_ref(sg_1v1_node_10v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_6v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_1v1_node_10v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some(prev + val.0) + } else { + Some(val.0) + }; + }, + ); + } + } + let op_10v1 = sg_1v1_node_10v1_hashtable.drain(); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__fold_keyed__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_,), _)| (g.0, a.0.unwrap())); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap new file mode 100644 index 000000000000..15f9204b4f0f --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row : (_ , _ ,) | ((row . 0 % 2 ,) , (row . 1 ,))); +10v1 = fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + val . 0) } else { Some (val . 0) } ; }); +11v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 , a . 0 . unwrap () ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +10v1 -> 11v1; +9v1 -> 10v1; +2v1 -> 9v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@datalog_program.snap new file mode 100644 index 000000000000..e7d451dc5dbf --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@datalog_program.snap @@ -0,0 +1,1049 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints_1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints_2)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints_3)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"anti_join ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , (_ , _ ,)) | (kv . 0 . 0 , kv . 1 . 0 , kv . 1 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ , _ ,) | ((_v . 0 ,) , (_v . 1 , _v . 2 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (_v . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ ,) | ((row . 1 , row . 2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":5},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":3},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":12,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_4\",\"version\":1},{\"value\":\"join_4\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_9v3_send, hoff_9v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(9v3)"); + let (hoff_12v3_send, hoff_12v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(12v3)"); + let mut sg_2v1_node_15v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints_3) + }; + let sg_2v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_3v1_node_13v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints_1) + }; + let mut sg_4v1_node_14v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints_2) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_17v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_17v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_17v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_17v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_21v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_21v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_11v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_12v3_send), + false, + move |context, var_args!(), var_args!(hoff_12v3_send)| { + let hoff_12v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_12v3_send.give(Some(v)); + }); + let op_15v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_15v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__source_stream__loc_nopath_4_27_4_48< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__source_stream__loc_nopath_4_27_4_48(op_15v1) + }; + let op_8v1 = op_15v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_4_19_4_25< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_4_19_4_25(op_8v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_24v1 = op_8v1.map(|_v: (_,)| (_v.0,)); + let op_24v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_24v1__map__loc_nopath_7_57_7_66< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_24v1__map__loc_nopath_7_57_7_66(op_24v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_24v1, hoff_12v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(3v1)", + 0, + var_expr!(), + var_expr!(hoff_9v3_send), + false, + move |context, var_args!(), var_args!(hoff_9v3_send)| { + let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_9v3_send.give(Some(v)); + }); + let op_13v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_3v1_node_13v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__source_stream__loc_nopath_2_27_2_48< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__source_stream__loc_nopath_2_27_2_48(op_13v1) + }; + #[inline(always)] + fn pivot_run_sg_3v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_3v1(op_13v1, hoff_9v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(4v1)", + 0, + var_expr!(), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_6v3_send)| { + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_14v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_4v1_node_14v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__source_stream__loc_nopath_3_27_3_48< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__source_stream__loc_nopath_3_27_3_48(op_14v1) + }; + #[inline(always)] + fn pivot_run_sg_4v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_4v1(op_14v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 1, + var_expr!(hoff_6v3_recv, hoff_9v3_recv, hoff_12v3_recv), + var_expr!(), + false, + move | + context, + var_args!(hoff_6v3_recv, hoff_9v3_recv, hoff_12v3_recv), + var_args!()| + { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut hoff_9v3_recv = hoff_9v3_recv.borrow_mut_swap(); + let hoff_9v3_recv = hoff_9v3_recv.drain(..); + let mut hoff_12v3_recv = hoff_12v3_recv.borrow_mut_swap(); + let hoff_12v3_recv = hoff_12v3_recv.drain(..); + let op_2v1 = hoff_9v3_recv + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_25< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_25(op_2v1) + }; + let op_5v1 = hoff_6v3_recv + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_25< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_25(op_5v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = op_2v1.map(|_v: (_, _)| ((_v.1,), (_v.0,))); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_7_28_7_40< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_7_28_7_40(op_19v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_20v1 = op_5v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_7_42_7_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__map__loc_nopath_7_42_7_54(op_20v1) + }; + let mut sg_1v1_node_17v1_joindata_lhs_borrow = context + .state_ref(sg_1v1_node_17v1_joindata_lhs) + .borrow_mut(); + let mut sg_1v1_node_17v1_joindata_rhs_borrow = context + .state_ref(sg_1v1_node_17v1_joindata_rhs) + .borrow_mut(); + let op_17v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_19v1, + op_20v1, + &mut *sg_1v1_node_17v1_joindata_lhs_borrow, + &mut *sg_1v1_node_17v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__join__loc_nopath_7_12_7_66< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__join__loc_nopath_7_12_7_66(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1 + .map(|kv: ((_,), ((_,), (_,)))| (kv.0.0, kv.1.0.0, kv.1.1.0)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_7_12_7_66< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_7_12_7_66(op_18v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_23v1 = op_18v1.map(|_v: (_, _, _)| ((_v.0,), (_v.1, _v.2))); + let op_23v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_23v1__map__loc_nopath_7_28_7_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_23v1__map__loc_nopath_7_28_7_54(op_23v1) + }; + let mut sg_1v1_node_21v1_antijoindata_neg_borrow = context + .state_ref(sg_1v1_node_21v1_antijoindata_neg) + .borrow_mut(); + let mut sg_1v1_node_21v1_antijoindata_pos_borrow = context + .state_ref(sg_1v1_node_21v1_antijoindata_pos) + .borrow_mut(); + let op_21v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_12v3_recv, + op_23v1, + &mut *sg_1v1_node_21v1_antijoindata_neg_borrow + .get_mut_clear(context.current_tick()), + &mut *sg_1v1_node_21v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_21v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_21v1__anti_join__loc_nopath_7_12_7_66< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_21v1__anti_join__loc_nopath_7_12_7_66(op_21v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_22v1 = op_21v1 + .map(|kv: ((_,), (_, _))| (kv.0.0, kv.1.0, kv.1.1)); + let op_22v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_22v1__map__loc_nopath_7_12_7_66< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_22v1__map__loc_nopath_7_12_7_66(op_22v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_25v1 = op_22v1.map(|row: (_, _, _)| ((row.1, row.2), ())); + let op_25v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_25v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_25v1__map__loc_nopath_1_0_1_0(op_25v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_26v1 = op_25v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_26v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_26v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_26v1__map__loc_nopath_1_0_1_0(op_26v1) + }; + let op_11v1 = op_26v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_11v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__unique__loc_nopath_5_20_5_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__unique__loc_nopath_5_20_5_26(op_11v1) + }; + let op_16v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__for_each__loc_nopath_5_28_5_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_16v1__for_each__loc_nopath_5_28_5_65(op_16v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_11v1, op_16v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@surface_graph.snap new file mode 100644 index 000000000000..6c6b388656a1 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__anti_join@surface_graph.snap @@ -0,0 +1,40 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +11v1 = unique :: < 'tick > (); +13v1 = source_stream (ints_1); +14v1 = source_stream (ints_2); +15v1 = source_stream (ints_3); +16v1 = for_each (| v | result . send (v) . unwrap ()); +17v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +18v1 = map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,)); +19v1 = map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,))); +20v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +21v1 = anti_join (); +22v1 = map (| kv : ((_ ,) , (_ , _ ,)) | (kv . 0 . 0 , kv . 1 . 0 , kv . 1 . 1 ,)); +23v1 = map (| _v : (_ , _ , _ ,) | ((_v . 0 ,) , (_v . 1 , _v . 2 ,))); +24v1 = map (| _v : (_ ,) | (_v . 0 ,)); +25v1 = map (| row : (_ , _ , _ ,) | ((row . 1 , row . 2 ,) , ())); +26v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +13v1 -> 2v1; +14v1 -> 5v1; +15v1 -> 8v1; +26v1 -> 11v1; +11v1 -> 16v1; +17v1 -> 18v1; +19v1 -> 17v1; +2v1 -> 19v1; +20v1 -> 17v1; +5v1 -> 20v1; +21v1 -> 22v1; +23v1 -> 21v1; +18v1 -> 23v1; +24v1 -> 21v1; +8v1 -> 24v1; +25v1 -> 26v1; +22v1 -> 25v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@datalog_program.snap new file mode 100644 index 000000000000..2746532b1021 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@datalog_program.snap @@ -0,0 +1,766 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : (() , ((_ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , ((row . 0 , row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev ; set . insert (val . 0) ; set }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; set }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () . into_iter () . collect :: < Vec < _ > > () ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_9v3_send, hoff_9v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(9v3)"); + let mut sg_2v1_node_10v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_2v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_2v1_node_11v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints2) + }; + let sg_2v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_2v1_node_13v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_2v1_node_13v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_2v1_node_13v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_2v1_node_13v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_18v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + ), + ); + let sg_1v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_9v3_send), + false, + move |context, var_args!(), var_args!(hoff_9v3_send)| { + let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_9v3_send.give(Some(v)); + }); + let op_10v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_10v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__source_stream__loc_nopath_2_26_2_46(op_10v1) + }; + let op_2v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_11v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_11v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__source_stream__loc_nopath_3_26_3_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__source_stream__loc_nopath_3_26_3_46(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_24(op_5v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_2v1.map(|_v: (_,)| ((), (_v.0,))); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_7_41_7_49< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_7_41_7_49(op_15v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = op_5v1.map(|_v: (_,)| ((), (_v.0,))); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_7_51_7_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_7_51_7_59(op_16v1) + }; + let mut sg_2v1_node_13v1_joindata_lhs_borrow = context + .state_ref(sg_2v1_node_13v1_joindata_lhs) + .borrow_mut(); + let mut sg_2v1_node_13v1_joindata_rhs_borrow = context + .state_ref(sg_2v1_node_13v1_joindata_rhs) + .borrow_mut(); + let op_13v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_15v1, + op_16v1, + &mut *sg_2v1_node_13v1_joindata_lhs_borrow, + &mut *sg_2v1_node_13v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__join__loc_nopath_7_12_7_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__join__loc_nopath_7_12_7_59(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1 + .map(|kv: ((), ((_,), (_,)))| (kv.1.0.0, kv.1.1.0)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_7_12_7_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_7_12_7_59(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_17v1 = op_14v1.map(|row: (_, _)| ((), ((row.0, row.1),))); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__map__loc_nopath_1_0_1_0(op_17v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_17v1, hoff_9v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 1, + var_expr!(hoff_9v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_9v3_recv), var_args!()| { + let mut hoff_9v3_recv = hoff_9v3_recv.borrow_mut_swap(); + let hoff_9v3_recv = hoff_9v3_recv.drain(..); + let mut sg_1v1_node_18v1_hashtable = context + .state_ref(sg_1v1_node_18v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_9v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_1v1_node_18v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some({ + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev; + set.insert(val.0); + set + }) + } else { + Some({ + let mut set = dfir_rs::rustc_hash::FxHashSet::< + _, + >::default(); + set.insert(val.0); + set + }) + }; + }, + ); + } + } + let op_18v1 = sg_1v1_node_18v1_hashtable.drain(); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__fold_keyed__loc_nopath_1_0_1_0(op_18v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = op_18v1 + .map(|(g, a): ((), _)| ( + a.0.unwrap().into_iter().collect::>(), + )); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_1_0_1_0(op_19v1) + }; + let op_8v1 = op_19v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_5_20_5_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_5_20_5_26(op_8v1) + }; + let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__for_each__loc_nopath_5_28_5_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__for_each__loc_nopath_5_28_5_65(op_12v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_8v1, op_12v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@surface_graph.snap new file mode 100644 index 000000000000..869912b4e3da --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__collect_vec@surface_graph.snap @@ -0,0 +1,30 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +10v1 = source_stream (ints1); +11v1 = source_stream (ints2); +12v1 = for_each (| v | result . send (v) . unwrap ()); +13v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +14v1 = map (| kv : (() , ((_ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,)); +15v1 = map (| _v : (_ ,) | (() , (_v . 0 ,))); +16v1 = map (| _v : (_ ,) | (() , (_v . 0 ,))); +17v1 = map (| row : (_ , _ ,) | (() , ((row . 0 , row . 1) ,))); +18v1 = fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev ; set . insert (val . 0) ; set }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; set }) } ; }); +19v1 = map (| (g , a) : (() , _) | (a . 0 . unwrap () . into_iter () . collect :: < Vec < _ > > () ,)); + +10v1 -> 2v1; +11v1 -> 5v1; +19v1 -> 8v1; +8v1 -> 12v1; +13v1 -> 14v1; +15v1 -> 13v1; +2v1 -> 15v1; +16v1 -> 13v1; +5v1 -> 16v1; +18v1 -> 19v1; +17v1 -> 18v1; +14v1 -> 17v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@datalog_program.snap new file mode 100644 index 000000000000..0559b25104f3 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@datalog_program.snap @@ -0,0 +1,353 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1 + .map(|row_untuple: (_,)| (row_untuple.0.0, row_untuple.0.1)); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_6_12_6_41< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_6_12_6_41(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_4_28_4_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@surface_graph.snap new file mode 100644 index 000000000000..63f7aeef3bfb --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints1); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,)); +10v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +11v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +2v1 -> 9v1; +10v1 -> 11v1; +9v1 -> 10v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@datalog_program.snap new file mode 100644 index 000000000000..77652992c937 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@datalog_program.snap @@ -0,0 +1,437 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ , _ ,) | row . 0 . into_iter () . map (move | __flattened_element | (__flattened_element , :: std :: clone :: Clone :: clone (& row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ , _ ,) | row . 1 . into_iter () . map (move | __flattened_element | (:: std :: clone :: Clone :: clone (& row . 0) , __flattened_element ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1 + .map(|row_untuple: (_,)| (row_untuple.0.0, row_untuple.0.1)); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_6_12_6_43< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_6_12_6_43(op_9v1) + }; + let op_10v1 = op_9v1 + .flat_map(|row: (_, _)| { + row + .0 + .into_iter() + .map(move |__flattened_element| ( + __flattened_element, + ::std::clone::Clone::clone(&row.1), + )) + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__flat_map__loc_nopath_6_12_6_43< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__flat_map__loc_nopath_6_12_6_43(op_10v1) + }; + let op_11v1 = op_10v1 + .flat_map(|row: (_, _)| { + row + .1 + .into_iter() + .map(move |__flattened_element| ( + ::std::clone::Clone::clone(&row.0), + __flattened_element, + )) + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__flat_map__loc_nopath_6_12_6_43< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__flat_map__loc_nopath_6_12_6_43(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_12v1 = op_11v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__map__loc_nopath_1_0_1_0(op_12v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = op_12v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + let op_5v1 = op_13v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_4_28_4_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@surface_graph.snap new file mode 100644 index 000000000000..46d445f2f28a --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__detuple_then_flat@surface_graph.snap @@ -0,0 +1,22 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints1); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,)); +10v1 = flat_map (| row : (_ , _ ,) | row . 0 . into_iter () . map (move | __flattened_element | (__flattened_element , :: std :: clone :: Clone :: clone (& row . 1) ,))); +11v1 = flat_map (| row : (_ , _ ,) | row . 1 . into_iter () . map (move | __flattened_element | (:: std :: clone :: Clone :: clone (& row . 0) , __flattened_element ,))); +12v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +13v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +13v1 -> 5v1; +5v1 -> 8v1; +10v1 -> 11v1; +9v1 -> 10v1; +2v1 -> 9v1; +12v1 -> 13v1; +11v1 -> 12v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@datalog_program.snap new file mode 100644 index 000000000000..ac8f39e24cae --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@datalog_program.snap @@ -0,0 +1,896 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((123 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 + 123 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 . clone () + row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((123 - row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((123 % (row . 0 + 5) ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 * 5 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"2\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"3\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"3\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"4\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"4\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"5\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"5\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_1v3_send, hoff_1v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(1v3)"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_21v1_send, hoff_21v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(21v1)"); + let (hoff_22v1_send, hoff_22v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(22v1)"); + let (hoff_23v1_send, hoff_23v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(23v1)"); + let (hoff_24v1_send, hoff_24v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(24v1)"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_2v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!( + hoff_1v3_send, hoff_6v3_send, hoff_21v1_send, hoff_22v1_send, + hoff_23v1_send, hoff_24v1_send + ), + false, + move | + context, + var_args!(), + var_args!( + hoff_1v3_send, hoff_6v3_send, hoff_21v1_send, hoff_22v1_send, + hoff_23v1_send, hoff_24v1_send + )| + { + let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_1v3_send.give(Some(v)); + }); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let hoff_21v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_21v1_send.give(Some(v)); + }); + let hoff_22v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_22v1_send.give(Some(v)); + }); + let hoff_23v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_23v1_send.give(Some(v)); + }); + let hoff_24v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_24v1_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_25_2_44(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + hoff_6v3_send, + hydroflow::pusherator::tee::Tee::new( + hoff_1v3_send, + hydroflow::pusherator::tee::Tee::new( + hoff_21v1_send, + hydroflow::pusherator::tee::Tee::new( + hoff_22v1_send, + hydroflow::pusherator::tee::Tee::new( + hoff_23v1_send, + hoff_24v1_send, + ), + ), + ), + ), + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_2_19_2_23< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_2_19_2_23(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!( + hoff_1v3_recv, hoff_6v3_recv, hoff_21v1_recv, hoff_22v1_recv, + hoff_23v1_recv, hoff_24v1_recv + ), + var_expr!(), + false, + move | + context, + var_args!( + hoff_1v3_recv, hoff_6v3_recv, hoff_21v1_recv, hoff_22v1_recv, + hoff_23v1_recv, hoff_24v1_recv + ), + var_args!()| + { + let mut hoff_1v3_recv = hoff_1v3_recv.borrow_mut_swap(); + let hoff_1v3_recv = hoff_1v3_recv.drain(..); + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut hoff_21v1_recv = hoff_21v1_recv.borrow_mut_swap(); + let hoff_21v1_recv = hoff_21v1_recv.drain(..); + let mut hoff_22v1_recv = hoff_22v1_recv.borrow_mut_swap(); + let hoff_22v1_recv = hoff_22v1_recv.drain(..); + let mut hoff_23v1_recv = hoff_23v1_recv.borrow_mut_swap(); + let hoff_23v1_recv = hoff_23v1_recv.drain(..); + let mut hoff_24v1_recv = hoff_24v1_recv.borrow_mut_swap(); + let hoff_24v1_recv = hoff_24v1_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = hoff_6v3_recv.map(|row: (_,)| ((123,), ())); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_1_0_1_0(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = hoff_1v3_recv.map(|row: (_,)| ((row.0 + 123,), ())); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_12v1 = op_11v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__map__loc_nopath_1_0_1_0(op_12v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = hoff_21v1_recv + .map(|row: (_,)| ((row.0.clone() + row.0,), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = hoff_22v1_recv.map(|row: (_,)| ((123 - row.0,), ())); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_1_0_1_0(op_15v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = op_15v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_1_0_1_0(op_16v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_17v1 = hoff_23v1_recv + .map(|row: (_,)| ((123 % (row.0 + 5),), ())); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__map__loc_nopath_1_0_1_0(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_1_0_1_0(op_18v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = hoff_24v1_recv.map(|row: (_,)| ((row.0 * 5,), ())); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_1_0_1_0(op_19v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_20v1 = op_19v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__map__loc_nopath_1_0_1_0(op_20v1) + }; + let op_4v1 = { + #[allow(unused)] + #[inline(always)] + fn check_inputs< + A: ::std::iter::Iterator, + B: ::std::iter::Iterator, + Item, + >(a: A, b: B) -> impl ::std::iter::Iterator { + a.chain(b) + } + check_inputs( + check_inputs( + check_inputs( + check_inputs(check_inputs(op_10v1, op_12v1), op_14v1), + op_16v1, + ), + op_18v1, + ), + op_20v1, + ) + }; + let op_4v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_4v1__union__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_4v1__union__loc_nopath_3_20_3_26(op_4v1) + }; + let op_5v1 = op_4v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@surface_graph.snap new file mode 100644 index 000000000000..1ba6a240a163 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_lhs@surface_graph.snap @@ -0,0 +1,45 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +4v1 = union (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row : (_ ,) | ((123 ,) , ())); +10v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +11v1 = map (| row : (_ ,) | ((row . 0 + 123 ,) , ())); +12v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +13v1 = map (| row : (_ ,) | ((row . 0 . clone () + row . 0 ,) , ())); +14v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +15v1 = map (| row : (_ ,) | ((123 - row . 0 ,) , ())); +16v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +17v1 = map (| row : (_ ,) | ((123 % (row . 0 + 5) ,) , ())); +18v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +19v1 = map (| row : (_ ,) | ((row . 0 * 5 ,) , ())); +20v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); + +7v1 -> 2v1; +2v1 -> 3v1; +4v1 -> 5v1; +5v1 -> 8v1; +10v1 -> 4v1; +9v1 -> 10v1; +3v1 -> 9v1; +12v1 -> 4v1; +11v1 -> 12v1; +3v1 -> 11v1; +14v1 -> 4v1; +13v1 -> 14v1; +3v1 -> 13v1; +16v1 -> 4v1; +15v1 -> 16v1; +3v1 -> 15v1; +18v1 -> 4v1; +17v1 -> 18v1; +3v1 -> 17v1; +20v1 -> 4v1; +19v1 -> 20v1; +3v1 -> 19v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@datalog_program.snap new file mode 100644 index 000000000000..332537cff236 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@datalog_program.snap @@ -0,0 +1,835 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 == 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 != 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 - 1 == 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((3 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 - 1 == 1 - 1)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((4 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"2\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"3\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"3\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_1_filter\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_3_filter\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_5_filter\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_7_filter\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_1v3_send, hoff_1v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(1v3)"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_21v1_send, hoff_21v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(21v1)"); + let (hoff_22v1_send, hoff_22v1_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(22v1)"); + let mut sg_2v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_2v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_1v3_send, hoff_6v3_send, hoff_21v1_send, hoff_22v1_send), + false, + move | + context, + var_args!(), + var_args!( + hoff_1v3_send, hoff_6v3_send, hoff_21v1_send, hoff_22v1_send + )| + { + let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_1v3_send.give(Some(v)); + }); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let hoff_21v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_21v1_send.give(Some(v)); + }); + let hoff_22v1_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_22v1_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_25_2_44(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + let op_18v1 = hydroflow::pusherator::filter::Filter::new( + |row: &(_,)| row.0 - 1 == 1 - 1, + hoff_22v1_send, + ); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__filter__loc_nopath_8_12_8_50< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_18v1__filter__loc_nopath_8_12_8_50(op_18v1) + }; + let op_15v1 = hydroflow::pusherator::filter::Filter::new( + |row: &(_,)| row.0 - 1 == 0, + hoff_21v1_send, + ); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__filter__loc_nopath_7_12_7_46< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_15v1__filter__loc_nopath_7_12_7_46(op_15v1) + }; + let op_12v1 = hydroflow::pusherator::filter::Filter::new( + |row: &(_,)| row.0 != 0, + hoff_1v3_send, + ); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__filter__loc_nopath_6_12_6_42< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__filter__loc_nopath_6_12_6_42(op_12v1) + }; + let op_9v1 = hydroflow::pusherator::filter::Filter::new( + |row: &(_,)| row.0 == 0, + hoff_6v3_send, + ); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__filter__loc_nopath_5_12_5_42< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_9v1__filter__loc_nopath_5_12_5_42(op_9v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + op_9v1, + hydroflow::pusherator::tee::Tee::new( + op_12v1, + hydroflow::pusherator::tee::Tee::new(op_15v1, op_18v1), + ), + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_2_19_2_23< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_2_19_2_23(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(hoff_1v3_recv, hoff_6v3_recv, hoff_21v1_recv, hoff_22v1_recv), + var_expr!(), + false, + move | + context, + var_args!( + hoff_1v3_recv, hoff_6v3_recv, hoff_21v1_recv, hoff_22v1_recv + ), + var_args!()| + { + let mut hoff_1v3_recv = hoff_1v3_recv.borrow_mut_swap(); + let hoff_1v3_recv = hoff_1v3_recv.drain(..); + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut hoff_21v1_recv = hoff_21v1_recv.borrow_mut_swap(); + let hoff_21v1_recv = hoff_21v1_recv.drain(..); + let mut hoff_22v1_recv = hoff_22v1_recv.borrow_mut_swap(); + let hoff_22v1_recv = hoff_22v1_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = hoff_6v3_recv.map(|row: (_,)| ((1,), ())); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = hoff_1v3_recv.map(|row: (_,)| ((2,), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = hoff_21v1_recv.map(|row: (_,)| ((3,), ())); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_1_0_1_0(op_16v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_17v1 = op_16v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__map__loc_nopath_1_0_1_0(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = hoff_22v1_recv.map(|row: (_,)| ((4,), ())); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_1_0_1_0(op_19v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_20v1 = op_19v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__map__loc_nopath_1_0_1_0(op_20v1) + }; + let op_4v1 = { + #[allow(unused)] + #[inline(always)] + fn check_inputs< + A: ::std::iter::Iterator, + B: ::std::iter::Iterator, + Item, + >(a: A, b: B) -> impl ::std::iter::Iterator { + a.chain(b) + } + check_inputs( + check_inputs(check_inputs(op_11v1, op_14v1), op_17v1), + op_20v1, + ) + }; + let op_4v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_4v1__union__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_4v1__union__loc_nopath_3_20_3_26(op_4v1) + }; + let op_5v1 = op_4v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@surface_graph.snap new file mode 100644 index 000000000000..47d5fbe6d835 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__expr_predicate@surface_graph.snap @@ -0,0 +1,43 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +4v1 = union (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = filter (| row : & (_ ,) | row . 0 == 0); +10v1 = map (| row : (_ ,) | ((1 ,) , ())); +11v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +12v1 = filter (| row : & (_ ,) | row . 0 != 0); +13v1 = map (| row : (_ ,) | ((2 ,) , ())); +14v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +15v1 = filter (| row : & (_ ,) | row . 0 - 1 == 0); +16v1 = map (| row : (_ ,) | ((3 ,) , ())); +17v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +18v1 = filter (| row : & (_ ,) | row . 0 - 1 == 1 - 1); +19v1 = map (| row : (_ ,) | ((4 ,) , ())); +20v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); + +7v1 -> 2v1; +2v1 -> 3v1; +4v1 -> 5v1; +5v1 -> 8v1; +3v1 -> 9v1; +11v1 -> 4v1; +10v1 -> 11v1; +9v1 -> 10v1; +3v1 -> 12v1; +14v1 -> 4v1; +13v1 -> 14v1; +12v1 -> 13v1; +3v1 -> 15v1; +17v1 -> 4v1; +16v1 -> 17v1; +15v1 -> 16v1; +3v1 -> 18v1; +20v1 -> 4v1; +19v1 -> 20v1; +18v1 -> 19v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@datalog_program.snap new file mode 100644 index 000000000000..24271d1ac77a --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@datalog_program.snap @@ -0,0 +1,392 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ ,) | row . 0 . into_iter () . map (move | __flattened_element | (__flattened_element ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_9v1 = op_2v1 + .flat_map(|row: (_,)| { + row + .0 + .into_iter() + .map(move |__flattened_element| (__flattened_element,)) + }); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__flat_map__loc_nopath_6_12_6_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__flat_map__loc_nopath_6_12_6_42(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1 + .map(|row_untuple: (_,)| (row_untuple.0.0, row_untuple.0.1)); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_6_12_6_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_6_12_6_42(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_12v1 = op_11v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__map__loc_nopath_1_0_1_0(op_12v1) + }; + let op_5v1 = op_12v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_4_28_4_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@surface_graph.snap new file mode 100644 index 000000000000..3d0b425bc2d2 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flat_then_detuple@surface_graph.snap @@ -0,0 +1,20 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints1); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = flat_map (| row : (_ ,) | row . 0 . into_iter () . map (move | __flattened_element | (__flattened_element ,))); +10v1 = map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,)); +11v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +12v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +12v1 -> 5v1; +5v1 -> 8v1; +9v1 -> 10v1; +2v1 -> 9v1; +11v1 -> 12v1; +10v1 -> 11v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@datalog_program.snap new file mode 100644 index 000000000000..bdff7ff96c91 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@datalog_program.snap @@ -0,0 +1,357 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ , _ ,) | row . 1 . into_iter () . map (move | __flattened_element | (:: std :: clone :: Clone :: clone (& row . 0) , __flattened_element ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_9v1 = op_2v1 + .flat_map(|row: (_, _)| { + row + .1 + .into_iter() + .map(move |__flattened_element| ( + ::std::clone::Clone::clone(&row.0), + __flattened_element, + )) + }); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__flat_map__loc_nopath_6_12_6_40< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__flat_map__loc_nopath_6_12_6_40(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_4_28_4_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@surface_graph.snap new file mode 100644 index 000000000000..9bf39aabba06 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__flatten@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints1); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = flat_map (| row : (_ , _ ,) | row . 1 . into_iter () . map (move | __flattened_element | (:: std :: clone :: Clone :: clone (& row . 0) , __flattened_element ,))); +10v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +11v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +2v1 -> 9v1; +10v1 -> 11v1; +9v1 -> 10v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@datalog_program.snap new file mode 100644 index 000000000000..e08e994e7fcc --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@datalog_program.snap @@ -0,0 +1,2250 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result3 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result4 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result5 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 ,) , ((row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ ,) , _)) | (g . 0 , a . 0 . unwrap () . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 ,) , ((row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'static , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ ,) , _)) | (g . 0 , a . 0 . unwrap () . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":35,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":25,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":39,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":23,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":45,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":3},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":49,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":3},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":52,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":15,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":12,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":41,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":27,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":29,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":31,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":34,\"version\":1},{\"idx\":35,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":33,\"version\":1},{\"idx\":34,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":33,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":38,\"version\":1},{\"idx\":39,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":37,\"version\":1},{\"idx\":38,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":36,\"version\":1},{\"idx\":21,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":36,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":21,\"version\":3},{\"idx\":37,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":40,\"version\":1},{\"idx\":16,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":3},{\"idx\":51,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":44,\"version\":1},{\"idx\":45,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":43,\"version\":1},{\"idx\":44,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":42,\"version\":1},{\"idx\":43,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":42,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":3},{\"idx\":47,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":48,\"version\":1},{\"idx\":49,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":47,\"version\":1},{\"idx\":48,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":46,\"version\":1},{\"idx\":13,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":46,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":3},{\"idx\":41,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":50,\"version\":1},{\"idx\":10,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":50,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":25,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":33,\"version\":1},{\"idx\":34,\"version\":1},{\"idx\":35,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":27,\"version\":1},{\"idx\":36,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":37,\"version\":1},{\"idx\":38,\"version\":1},{\"idx\":39,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":41,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":42,\"version\":1},{\"idx\":43,\"version\":1},{\"idx\":44,\"version\":1},{\"idx\":45,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":29,\"version\":1},{\"idx\":46,\"version\":1},{\"idx\":50,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":47,\"version\":1},{\"idx\":48,\"version\":1},{\"idx\":49,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":2,\"version\":1},{\"value\":1,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result4_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result5_insert\",\"version\":1},{\"value\":\"result5\",\"version\":1},{\"value\":\"result5\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_persisted_insert\",\"version\":1},{\"value\":\"ints_persisted\",\"version\":1},{\"value\":\"ints_persisted\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_9v3_send, hoff_9v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(9v3)"); + let (hoff_10v3_send, hoff_10v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(10v3)"); + let (hoff_12v3_send, hoff_12v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(12v3)"); + let (hoff_13v3_send, hoff_13v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(13v3)"); + let (hoff_15v3_send, hoff_15v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(15v3)"); + let (hoff_16v3_send, hoff_16v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(16v3)"); + let (hoff_21v3_send, hoff_21v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(21v3)"); + let mut sg_3v1_node_26v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_3v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_34v1_counterdata = df + .add_state(::std::cell::RefCell::new(0..)); + df.set_state_tick_hook( + sg_3v1_node_34v1_counterdata, + |rcell| { + rcell.replace(0..); + }, + ); + let sg_4v1_node_37v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + let sg_4v1_node_38v1_counterdata = df + .add_state(::std::cell::RefCell::new(0..)); + df.set_state_tick_hook( + sg_4v1_node_38v1_counterdata, + |rcell| { + rcell.replace(0..); + }, + ); + let sg_4v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_5v1_node_22v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_5v1_node_23v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + ); + let sg_5v1_node_23v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_5v1_node_11v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let singleton_op_45v1 = df + .add_state(::std::cell::RefCell::new(::std::vec::Vec::new())); + let sg_5v1_node_43v1_counterdata = df + .add_state(::std::cell::RefCell::new(0..)); + let sg_6v1_node_47v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + let sg_6v1_node_48v1_counterdata = df + .add_state(::std::cell::RefCell::new(0..)); + df.set_state_tick_hook( + sg_6v1_node_48v1_counterdata, + |rcell| { + rcell.replace(0..); + }, + ); + let sg_6v1_node_14v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_7v1_node_51v1_counterdata = df + .add_state(::std::cell::RefCell::new(0..)); + let sg_7v1_node_17v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_7v1_node_18v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + ); + let sg_7v1_node_18v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let singleton_op_31v1 = df + .add_state(::std::cell::RefCell::new(::std::vec::Vec::new())); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(3v1)", + 0, + var_expr!(), + var_expr!(hoff_16v3_send, hoff_21v3_send), + false, + move |context, var_args!(), var_args!(hoff_16v3_send, hoff_21v3_send)| { + let hoff_16v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_16v3_send.give(Some(v)); + }); + let hoff_21v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_21v3_send.give(Some(v)); + }); + let op_26v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_3v1_node_26v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_26v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_26v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_26v1__source_stream__loc_nopath_2_25_2_44(op_26v1) + }; + let op_2v1 = op_26v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_3v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + let op_40v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.0, row.1), ()), + hoff_16v3_send, + ); + let op_40v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_40v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_40v1__map__loc_nopath_1_0_1_0(op_40v1) + }; + let op_36v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.0,), ((row.1),)), + hoff_21v3_send, + ); + let op_36v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_36v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_36v1__map__loc_nopath_1_0_1_0(op_36v1) + }; + let op_27v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_27v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_27v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_27v1__for_each__loc_nopath_4_28_4_65(op_27v1) + }; + let op_5v1 = hydroflow::pusherator::filter::Filter::new( + |item| { + let mut borrow = context + .state_ref(sg_3v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }, + op_27v1, + ); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_35v1 = hydroflow::pusherator::map::Map::new( + |(__enumerate_index, (g, a)): (_, ((_, _), _))| ( + g.0, + g.1, + __enumerate_index, + ), + op_5v1, + ); + let op_35v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_35v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_35v1__map__loc_nopath_1_0_1_0(op_35v1) + }; + let op_34v1 = hydroflow::pusherator::map::Map::new( + |item| { + let mut counter = context + .state_ref(sg_3v1_node_34v1_counterdata) + .borrow_mut(); + (counter.next().unwrap(), item) + }, + op_35v1, + ); + let op_34v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_34v1__enumerate__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_34v1__enumerate__loc_nopath_1_0_1_0(op_34v1) + }; + let op_33v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.0, row.1), ()), + op_34v1, + ); + let op_33v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_33v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_33v1__map__loc_nopath_1_0_1_0(op_33v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + op_33v1, + hydroflow::pusherator::tee::Tee::new(op_36v1, op_40v1), + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_2_19_2_23< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_2_19_2_23(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_3v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_3v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(hoff_12v3_recv), + var_expr!(hoff_15v3_send), + false, + move |context, var_args!(hoff_12v3_recv), var_args!(hoff_15v3_send)| { + let mut hoff_12v3_recv = hoff_12v3_recv.borrow_mut_swap(); + let hoff_12v3_recv = hoff_12v3_recv.drain(..); + let hoff_15v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_15v3_send.give(Some(v)); + }); + let op_20v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_12v3_recv) + }; + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__defer_tick__loc_nopath_9_21_9_28< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__defer_tick__loc_nopath_9_21_9_28(op_20v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_20v1, hoff_15v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(hoff_6v3_recv), + var_expr!(hoff_9v3_send), + false, + move |context, var_args!(hoff_6v3_recv), var_args!(hoff_9v3_send)| { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_9v3_send.give(Some(v)); + }); + let op_25v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_6v3_recv) + }; + let op_25v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_25v1__defer_tick__loc_nopath_15_21_15_35< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_25v1__defer_tick__loc_nopath_15_21_15_35(op_25v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_25v1, hoff_9v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(4v1)", + 1, + var_expr!(hoff_21v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_21v3_recv), var_args!()| { + let mut hoff_21v3_recv = hoff_21v3_recv.borrow_mut_swap(); + let hoff_21v3_recv = hoff_21v3_recv.drain(..); + let mut sg_4v1_node_37v1_hashtable = context + .state_ref(sg_4v1_node_37v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_21v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_4v1_node_37v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some({ + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; + if set.insert(val.0) { + (set, prev.1 + 1) + } else { + (set, prev.1) + } + }) + } else { + Some({ + let mut set = dfir_rs::rustc_hash::FxHashSet::< + _, + >::default(); + set.insert(val.0); + (set, 1) + }) + }; + }, + ); + } + } + let op_37v1 = sg_4v1_node_37v1_hashtable.drain(); + let op_37v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_37v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_37v1__fold_keyed__loc_nopath_1_0_1_0(op_37v1) + }; + let op_38v1 = ::std::iter::Iterator::map( + op_37v1, + |item| { + let mut counter = context + .state_ref(sg_4v1_node_38v1_counterdata) + .borrow_mut(); + (counter.next().unwrap(), item) + }, + ); + let op_38v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_38v1__enumerate__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_38v1__enumerate__loc_nopath_1_0_1_0(op_38v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_39v1 = op_38v1 + .map(|(__enumerate_index, (g, a)): (_, ((_,), _))| ( + g.0, + a.0.unwrap().1, + __enumerate_index, + )); + let op_39v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_39v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_39v1__map__loc_nopath_1_0_1_0(op_39v1) + }; + let op_8v1 = op_39v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_4v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_5_20_5_27< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_5_20_5_27(op_8v1) + }; + let op_28v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result2.send(v).unwrap() + }); + let op_28v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_28v1__for_each__loc_nopath_5_29_5_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_28v1__for_each__loc_nopath_5_29_5_67(op_28v1) + }; + #[inline(always)] + fn pivot_run_sg_4v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_4v1(op_8v1, op_28v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(5v1)", + 1, + var_expr!(hoff_9v3_recv, hoff_16v3_recv), + var_expr!(hoff_6v3_send, hoff_10v3_send, hoff_13v3_send), + false, + move | + context, + var_args!(hoff_9v3_recv, hoff_16v3_recv), + var_args!(hoff_6v3_send, hoff_10v3_send, hoff_13v3_send)| + { + let mut hoff_9v3_recv = hoff_9v3_recv.borrow_mut_swap(); + let hoff_9v3_recv = hoff_9v3_recv.drain(..); + let mut hoff_16v3_recv = hoff_16v3_recv.borrow_mut_swap(); + let hoff_16v3_recv = hoff_16v3_recv.drain(..); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let hoff_10v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_10v3_send.give(Some(v)); + }); + let hoff_13v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_13v3_send.give(Some(v)); + }); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_41v1 = hoff_16v3_recv.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_41v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_41v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_41v1__map__loc_nopath_1_0_1_0(op_41v1) + }; + let op_22v1 = op_41v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_5v1_node_22v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_22v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_22v1__unique__loc_nopath_15_21_15_35< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_22v1__unique__loc_nopath_15_21_15_35(op_22v1) + }; + let op_22v1 = op_22v1.map(|k| (k, ())); + let mut sg_5v1_node_23v1_antijoindata_neg_borrow = context + .state_ref(sg_5v1_node_23v1_antijoindata_neg) + .borrow_mut(); + let mut sg_5v1_node_23v1_antijoindata_pos_borrow = context + .state_ref(sg_5v1_node_23v1_antijoindata_pos) + .borrow_mut(); + let op_23v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_9v3_recv, + op_22v1, + &mut *sg_5v1_node_23v1_antijoindata_neg_borrow, + &mut *sg_5v1_node_23v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_23v1 = op_23v1.map(|(k, ())| k); + let op_23v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_23v1__difference__loc_nopath_15_21_15_35< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_23v1__difference__loc_nopath_15_21_15_35(op_23v1) + }; + let op_50v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.0, row.1), ()), + hoff_10v3_send, + ); + let op_50v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_50v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_50v1__map__loc_nopath_1_0_1_0(op_50v1) + }; + let op_46v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.0,), ((row.1),)), + hoff_13v3_send, + ); + let op_46v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_46v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_46v1__map__loc_nopath_1_0_1_0(op_46v1) + }; + let op_29v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result3.send(v).unwrap() + }); + let op_29v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_29v1__for_each__loc_nopath_6_29_6_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_29v1__for_each__loc_nopath_6_29_6_67(op_29v1) + }; + let op_11v1 = hydroflow::pusherator::filter::Filter::new( + |item| { + let mut borrow = context + .state_ref(sg_5v1_node_11v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }, + op_29v1, + ); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__unique__loc_nopath_6_20_6_27< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_11v1__unique__loc_nopath_6_20_6_27(op_11v1) + }; + let mut sg_5v1_node_45v1_persistvec = context + .state_ref(singleton_op_45v1) + .borrow_mut(); + let op_45v1 = { + fn constrain_types<'ctx, Push, Item>( + vec: &'ctx mut Vec, + mut output: Push, + is_new_tick: bool, + ) -> impl 'ctx + hydroflow::pusherator::Pusherator + where + Push: 'ctx + hydroflow::pusherator::Pusherator, + Item: ::std::clone::Clone, + { + if is_new_tick { + vec.iter() + .cloned() + .for_each(|item| { + hydroflow::pusherator::Pusherator::give(&mut output, item); + }); + } + hydroflow::pusherator::map::Map::new( + |item| { + vec.push(item); + vec.last().unwrap().clone() + }, + output, + ) + } + constrain_types( + &mut *sg_5v1_node_45v1_persistvec, + op_11v1, + context.is_first_run_this_tick(), + ) + }; + let op_45v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_45v1__persist__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_45v1__persist__loc_nopath_1_0_1_0(op_45v1) + }; + let op_44v1 = hydroflow::pusherator::map::Map::new( + |(__enumerate_index, (g, a)): (_, ((_, _), _))| ( + g.0, + g.1, + __enumerate_index, + ), + op_45v1, + ); + let op_44v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_44v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_44v1__map__loc_nopath_1_0_1_0(op_44v1) + }; + let op_43v1 = hydroflow::pusherator::map::Map::new( + |item| { + let mut counter = context + .state_ref(sg_5v1_node_43v1_counterdata) + .borrow_mut(); + (counter.next().unwrap(), item) + }, + op_44v1, + ); + let op_43v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_43v1__enumerate__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_43v1__enumerate__loc_nopath_1_0_1_0(op_43v1) + }; + let op_42v1 = hydroflow::pusherator::map::Map::new( + |row: (_, _)| ((row.0, row.1), ()), + op_43v1, + ); + let op_42v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_42v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_42v1__map__loc_nopath_1_0_1_0(op_42v1) + }; + let op_24v1 = hydroflow::pusherator::tee::Tee::new( + op_42v1, + hydroflow::pusherator::tee::Tee::new( + op_46v1, + hydroflow::pusherator::tee::Tee::new(op_50v1, hoff_6v3_send), + ), + ); + let op_24v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_24v1__tee__loc_nopath_15_21_15_35< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_24v1__tee__loc_nopath_15_21_15_35(op_24v1) + }; + #[inline(always)] + fn pivot_run_sg_5v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_5v1(op_23v1, op_24v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(6v1)", + 2, + var_expr!(hoff_13v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_13v3_recv), var_args!()| { + let mut hoff_13v3_recv = hoff_13v3_recv.borrow_mut_swap(); + let hoff_13v3_recv = hoff_13v3_recv.drain(..); + let mut sg_6v1_node_47v1_hashtable = context + .state_ref(sg_6v1_node_47v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_13v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_6v1_node_47v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some({ + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; + if set.insert(val.0) { + (set, prev.1 + 1) + } else { + (set, prev.1) + } + }) + } else { + Some({ + let mut set = dfir_rs::rustc_hash::FxHashSet::< + _, + >::default(); + set.insert(val.0); + (set, 1) + }) + }; + }, + ); + } + } + let op_47v1 = context + .is_first_run_this_tick() + .then_some(sg_6v1_node_47v1_hashtable.iter()) + .into_iter() + .flatten() + .map( + #[allow( + unknown_lints, + suspicious_double_ref_op, + clippy::clone_on_copy + )] + |(k, v)| ( + ::std::clone::Clone::clone(k), + ::std::clone::Clone::clone(v), + ), + ); + let op_47v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_47v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_47v1__fold_keyed__loc_nopath_1_0_1_0(op_47v1) + }; + let op_48v1 = ::std::iter::Iterator::map( + op_47v1, + |item| { + let mut counter = context + .state_ref(sg_6v1_node_48v1_counterdata) + .borrow_mut(); + (counter.next().unwrap(), item) + }, + ); + let op_48v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_48v1__enumerate__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_48v1__enumerate__loc_nopath_1_0_1_0(op_48v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_49v1 = op_48v1 + .map(|(__enumerate_index, (g, a)): (_, ((_,), _))| ( + g.0, + a.0.unwrap().1, + __enumerate_index, + )); + let op_49v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_49v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_49v1__map__loc_nopath_1_0_1_0(op_49v1) + }; + let op_14v1 = op_49v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_6v1_node_14v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__unique__loc_nopath_7_20_7_27< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__unique__loc_nopath_7_20_7_27(op_14v1) + }; + let op_30v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result4.send(v).unwrap() + }); + let op_30v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_30v1__for_each__loc_nopath_7_29_7_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_30v1__for_each__loc_nopath_7_29_7_67(op_30v1) + }; + #[inline(always)] + fn pivot_run_sg_6v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_6v1(op_14v1, op_30v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(7v1)", + 1, + var_expr!(hoff_10v3_recv, hoff_15v3_recv), + var_expr!(hoff_12v3_send), + false, + move | + context, + var_args!(hoff_10v3_recv, hoff_15v3_recv), + var_args!(hoff_12v3_send)| + { + let mut hoff_10v3_recv = hoff_10v3_recv.borrow_mut_swap(); + let hoff_10v3_recv = hoff_10v3_recv.drain(..); + let mut hoff_15v3_recv = hoff_15v3_recv.borrow_mut_swap(); + let hoff_15v3_recv = hoff_15v3_recv.drain(..); + let hoff_12v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_12v3_send.give(Some(v)); + }); + let op_51v1 = ::std::iter::Iterator::map( + hoff_10v3_recv, + |item| { + let mut counter = context + .state_ref(sg_7v1_node_51v1_counterdata) + .borrow_mut(); + (counter.next().unwrap(), item) + }, + ); + let op_51v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_51v1__enumerate__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_51v1__enumerate__loc_nopath_1_0_1_0(op_51v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_52v1 = op_51v1 + .map(|(__enumerate_index, (g, a)): (_, ((_, _), _))| ( + g.0, + g.1, + __enumerate_index, + )); + let op_52v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_52v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_52v1__map__loc_nopath_1_0_1_0(op_52v1) + }; + let op_17v1 = op_52v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_7v1_node_17v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__unique__loc_nopath_9_21_9_28< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__unique__loc_nopath_9_21_9_28(op_17v1) + }; + let op_17v1 = op_17v1.map(|k| (k, ())); + let mut sg_7v1_node_18v1_antijoindata_neg_borrow = context + .state_ref(sg_7v1_node_18v1_antijoindata_neg) + .borrow_mut(); + let mut sg_7v1_node_18v1_antijoindata_pos_borrow = context + .state_ref(sg_7v1_node_18v1_antijoindata_pos) + .borrow_mut(); + let op_18v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_15v3_recv, + op_17v1, + &mut *sg_7v1_node_18v1_antijoindata_neg_borrow, + &mut *sg_7v1_node_18v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_18v1 = op_18v1.map(|(k, ())| k); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__difference__loc_nopath_9_21_9_28< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__difference__loc_nopath_9_21_9_28(op_18v1) + }; + let op_32v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result5.send(v).unwrap() + }); + let op_32v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_32v1__for_each__loc_nopath_10_29_10_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_32v1__for_each__loc_nopath_10_29_10_67(op_32v1) + }; + let mut sg_7v1_node_31v1_persistvec = context + .state_ref(singleton_op_31v1) + .borrow_mut(); + let op_31v1 = { + fn constrain_types<'ctx, Push, Item>( + vec: &'ctx mut Vec, + mut output: Push, + is_new_tick: bool, + ) -> impl 'ctx + hydroflow::pusherator::Pusherator + where + Push: 'ctx + hydroflow::pusherator::Pusherator, + Item: ::std::clone::Clone, + { + if is_new_tick { + vec.iter() + .cloned() + .for_each(|item| { + hydroflow::pusherator::Pusherator::give(&mut output, item); + }); + } + hydroflow::pusherator::map::Map::new( + |item| { + vec.push(item); + vec.last().unwrap().clone() + }, + output, + ) + } + constrain_types( + &mut *sg_7v1_node_31v1_persistvec, + op_32v1, + context.is_first_run_this_tick(), + ) + }; + let op_31v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_31v1__persist__loc_nopath_10_20_10_27< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_31v1__persist__loc_nopath_10_20_10_27(op_31v1) + }; + let op_19v1 = hydroflow::pusherator::tee::Tee::new( + op_31v1, + hoff_12v3_send, + ); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__tee__loc_nopath_9_21_9_28< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_19v1__tee__loc_nopath_9_21_9_28(op_19v1) + }; + #[inline(always)] + fn pivot_run_sg_7v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_7v1(op_18v1, op_19v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@surface_graph.snap new file mode 100644 index 000000000000..67d0385b8895 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__index@surface_graph.snap @@ -0,0 +1,88 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +11v1 = unique :: < 'tick > (); +14v1 = unique :: < 'tick > (); +17v1 = unique :: < 'tick > (); +18v1 = difference :: < 'tick , 'static > (); +19v1 = tee (); +20v1 = defer_tick (); +22v1 = unique :: < 'tick > (); +23v1 = difference :: < 'tick , 'static > (); +24v1 = tee (); +25v1 = defer_tick (); +26v1 = source_stream (ints); +27v1 = for_each (| v | result . send (v) . unwrap ()); +28v1 = for_each (| v | result2 . send (v) . unwrap ()); +29v1 = for_each (| v | result3 . send (v) . unwrap ()); +30v1 = for_each (| v | result4 . send (v) . unwrap ()); +31v1 = persist :: < 'static > (); +32v1 = for_each (| v | result5 . send (v) . unwrap ()); +33v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +34v1 = enumerate :: < 'tick > (); +35v1 = map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,)); +36v1 = map (| row : (_ , _ ,) | ((row . 0 ,) , ((row . 1) ,))); +37v1 = fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; }); +38v1 = enumerate :: < 'tick > (); +39v1 = map (| (__enumerate_index , (g , a)) : (_ , ((_ ,) , _)) | (g . 0 , a . 0 . unwrap () . 1 , __enumerate_index ,)); +40v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +41v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); +42v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +43v1 = enumerate :: < 'static > (); +44v1 = map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,)); +45v1 = persist :: < 'static > (); +46v1 = map (| row : (_ , _ ,) | ((row . 0 ,) , ((row . 1) ,))); +47v1 = fold_keyed :: < 'static , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; }); +48v1 = enumerate :: < 'tick > (); +49v1 = map (| (__enumerate_index , (g , a)) : (_ , ((_ ,) , _)) | (g . 0 , a . 0 . unwrap () . 1 , __enumerate_index ,)); +50v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +51v1 = enumerate :: < 'static > (); +52v1 = map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,)); + +26v1 -> 2v1; +2v1 -> 3v1; +35v1 -> 5v1; +39v1 -> 8v1; +45v1 -> 11v1; +49v1 -> 14v1; +52v1 -> 17v1; +18v1 -> 19v1; +17v1 -> 18v1; +20v1 -> 18v1; +19v1 -> 20v1; +41v1 -> 22v1; +23v1 -> 24v1; +22v1 -> 23v1; +25v1 -> 23v1; +24v1 -> 25v1; +5v1 -> 27v1; +8v1 -> 28v1; +11v1 -> 29v1; +14v1 -> 30v1; +31v1 -> 32v1; +19v1 -> 31v1; +34v1 -> 35v1; +33v1 -> 34v1; +3v1 -> 33v1; +38v1 -> 39v1; +37v1 -> 38v1; +36v1 -> 37v1; +3v1 -> 36v1; +40v1 -> 41v1; +3v1 -> 40v1; +44v1 -> 45v1; +43v1 -> 44v1; +42v1 -> 43v1; +24v1 -> 42v1; +48v1 -> 49v1; +47v1 -> 48v1; +46v1 -> 47v1; +24v1 -> 46v1; +51v1 -> 52v1; +50v1 -> 51v1; +24v1 -> 50v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@datalog_program.snap new file mode 100644 index 000000000000..07146036595c --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@datalog_program.snap @@ -0,0 +1,638 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ , _ ,) , (() , ())) | (kv . 0 . 0 , kv . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 , _v . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 , _v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_10v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_1v1_node_11v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in2) + }; + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_13v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_13v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_13v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_13v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_10v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__source_stream__loc_nopath_2_24_2_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__source_stream__loc_nopath_2_24_2_42(op_10v1) + }; + let op_2v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) + }; + let op_11v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__source_stream__loc_nopath_3_24_3_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__source_stream__loc_nopath_3_24_3_42(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_2v1.map(|_v: (_, _)| ((_v.0, _v.1), ())); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_6_25_6_34< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_6_25_6_34(op_15v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = op_5v1.map(|_v: (_, _)| ((_v.1, _v.0), ())); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_6_36_6_45< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_6_36_6_45(op_16v1) + }; + let mut sg_1v1_node_13v1_joindata_lhs_borrow = context + .state_ref(sg_1v1_node_13v1_joindata_lhs) + .borrow_mut(); + let mut sg_1v1_node_13v1_joindata_rhs_borrow = context + .state_ref(sg_1v1_node_13v1_joindata_rhs) + .borrow_mut(); + let op_13v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_15v1, + op_16v1, + &mut *sg_1v1_node_13v1_joindata_lhs_borrow, + &mut *sg_1v1_node_13v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__join__loc_nopath_6_12_6_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__join__loc_nopath_6_12_6_46(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|kv: ((_, _), ((), ()))| (kv.0.0, kv.0.1)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_6_12_6_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_6_12_6_46(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_17v1 = op_14v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__map__loc_nopath_1_0_1_0(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_1_0_1_0(op_18v1) + }; + let op_8v1 = op_18v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_4_20_4_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_4_20_4_23(op_8v1) + }; + let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__for_each__loc_nopath_4_25_4_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__for_each__loc_nopath_4_25_4_59(op_12v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_8v1, op_12v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@surface_graph.snap new file mode 100644 index 000000000000..1024330bdd95 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_other@surface_graph.snap @@ -0,0 +1,28 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +10v1 = source_stream (in1); +11v1 = source_stream (in2); +12v1 = for_each (| v | out . send (v) . unwrap ()); +13v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +14v1 = map (| kv : ((_ , _ ,) , (() , ())) | (kv . 0 . 0 , kv . 0 . 1 ,)); +15v1 = map (| _v : (_ , _ ,) | ((_v . 0 , _v . 1 ,) , ())); +16v1 = map (| _v : (_ , _ ,) | ((_v . 1 , _v . 0 ,) , ())); +17v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +18v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +10v1 -> 2v1; +11v1 -> 5v1; +18v1 -> 8v1; +8v1 -> 12v1; +13v1 -> 14v1; +15v1 -> 13v1; +2v1 -> 15v1; +16v1 -> 13v1; +5v1 -> 16v1; +17v1 -> 18v1; +14v1 -> 17v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@datalog_program.snap new file mode 100644 index 000000000000..5c117735069e --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@datalog_program.snap @@ -0,0 +1,600 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ , _ ,) , (() , ())) | (kv . 0 . 0 , kv . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 , _v . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 , _v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":3},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":\"input\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_4v3_send, hoff_4v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(4v3)"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(input) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_2v1_node_9v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_2v1_node_9v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_2v1_node_9v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_2v1_node_9v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_2v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(hoff_4v3_send, hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_4v3_send, hoff_6v3_send)| { + let hoff_4v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_4v3_send.give(Some(v)); + }); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + hoff_6v3_send, + hoff_4v3_send, + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_2_19_2_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_2_19_2_24(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(hoff_4v3_recv, hoff_6v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_4v3_recv, hoff_6v3_recv), var_args!()| { + let mut hoff_4v3_recv = hoff_4v3_recv.borrow_mut_swap(); + let hoff_4v3_recv = hoff_4v3_recv.drain(..); + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = hoff_6v3_recv.map(|_v: (_, _)| ((_v.0, _v.1), ())); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_5_25_5_36< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_5_25_5_36(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_12v1 = hoff_4v3_recv.map(|_v: (_, _)| ((_v.1, _v.0), ())); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__map__loc_nopath_5_38_5_49< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__map__loc_nopath_5_38_5_49(op_12v1) + }; + let mut sg_2v1_node_9v1_joindata_lhs_borrow = context + .state_ref(sg_2v1_node_9v1_joindata_lhs) + .borrow_mut(); + let mut sg_2v1_node_9v1_joindata_rhs_borrow = context + .state_ref(sg_2v1_node_9v1_joindata_rhs) + .borrow_mut(); + let op_9v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_11v1, + op_12v1, + &mut *sg_2v1_node_9v1_joindata_lhs_borrow, + &mut *sg_2v1_node_9v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__join__loc_nopath_5_12_5_50< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__join__loc_nopath_5_12_5_50(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|kv: ((_, _), ((), ()))| (kv.0.0, kv.0.1)); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_5_12_5_50< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_5_12_5_50(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = op_10v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + let op_5v1 = op_14v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_25_3_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_25_3_59(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@surface_graph.snap new file mode 100644 index 000000000000..73ddd80bb68c --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__join_with_self@surface_graph.snap @@ -0,0 +1,27 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (input); +8v1 = for_each (| v | out . send (v) . unwrap ()); +9v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +10v1 = map (| kv : ((_ , _ ,) , (() , ())) | (kv . 0 . 0 , kv . 0 . 1 ,)); +11v1 = map (| _v : (_ , _ ,) | ((_v . 0 , _v . 1 ,) , ())); +12v1 = map (| _v : (_ , _ ,) | ((_v . 1 , _v . 0 ,) , ())); +13v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +14v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +2v1 -> 3v1; +14v1 -> 5v1; +5v1 -> 8v1; +9v1 -> 10v1; +11v1 -> 9v1; +3v1 -> 11v1; +12v1 -> 9v1; +3v1 -> 12v1; +13v1 -> 14v1; +10v1 -> 13v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program-2.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program-2.snap new file mode 100644 index 000000000000..c83997d98b23 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program-2.snap @@ -0,0 +1,354 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ , _ , _ , _ ,) | row . 0 == row . 1 && row . 2 == row . 3)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ , _ ,) | ((row . 0 . clone () , row . 0 , row . 2 . clone () , row . 2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(input) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_9v1 = op_2v1 + .filter(|row: &(_, _, _, _)| row.0 == row.1 && row.2 == row.3); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__filter__loc_nopath_5_12_5_49< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__filter__loc_nopath_5_12_5_49(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1 + .map(|row: (_, _, _, _)| ( + (row.0.clone(), row.0, row.2.clone(), row.2), + (), + )); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1 + .map(|(g, a): ((_, _, _, _), _)| (g.0, g.1, g.2, g.3)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_25_3_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_25_3_59(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program.snap new file mode 100644 index 000000000000..f4074971246c --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@datalog_program.snap @@ -0,0 +1,348 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ , _ ,) | row . 0 == row . 1)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 . clone () , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(input) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_9v1 = op_2v1.filter(|row: &(_, _)| row.0 == row.1); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__filter__loc_nopath_5_12_5_37< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__filter__loc_nopath_5_12_5_37(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0.clone(), row.0), ())); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_25_3_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_25_3_59(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph-2.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph-2.snap new file mode 100644 index 000000000000..ed12c1665cc9 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph-2.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (input); +8v1 = for_each (| v | out . send (v) . unwrap ()); +9v1 = filter (| row : & (_ , _ , _ , _ ,) | row . 0 == row . 1 && row . 2 == row . 3); +10v1 = map (| row : (_ , _ , _ , _ ,) | ((row . 0 . clone () , row . 0 , row . 2 . clone () , row . 2 ,) , ())); +11v1 = map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +2v1 -> 9v1; +10v1 -> 11v1; +9v1 -> 10v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph.snap new file mode 100644 index 000000000000..df5a63d279f9 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__local_constraints@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (input); +8v1 = for_each (| v | out . send (v) . unwrap ()); +9v1 = filter (| row : & (_ , _ ,) | row . 0 == row . 1); +10v1 = map (| row : (_ , _ ,) | ((row . 0 . clone () , row . 0 ,) , ())); +11v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +2v1 -> 9v1; +10v1 -> 11v1; +9v1 -> 10v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@datalog_program.snap new file mode 100644 index 000000000000..94e324f4db27 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@datalog_program.snap @@ -0,0 +1,429 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (std :: cmp :: max (prev , val . 0)) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let mut sg_2v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_2v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_10v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_6v3_send)| { + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_25_2_44(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1.map(|row: (_, _)| ((row.1,), (row.0,))); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_1_0_1_0(op_9v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_9v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 1, + var_expr!(hoff_6v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_6v3_recv), var_args!()| { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut sg_1v1_node_10v1_hashtable = context + .state_ref(sg_1v1_node_10v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_6v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_1v1_node_10v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some(std::cmp::max(prev, val.0)) + } else { + Some(val.0) + }; + }, + ); + } + } + let op_10v1 = sg_1v1_node_10v1_hashtable.drain(); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__fold_keyed__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_,), _)| (a.0.unwrap(), g.0)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@surface_graph.snap new file mode 100644 index 000000000000..64008763afde --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,))); +10v1 = fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (std :: cmp :: max (prev , val . 0)) } else { Some (val . 0) } ; }); +11v1 = map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +10v1 -> 11v1; +9v1 -> 10v1; +2v1 -> 9v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@datalog_program.snap new file mode 100644 index 000000000000..291d1b48c3a1 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@datalog_program.snap @@ -0,0 +1,438 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , (row . 0 , row . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > , Option < _ > ,) > (| | (None , None ,) , | old : & mut (Option < _ > , Option < _ > ,) , val : (_ , _ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (std :: cmp :: max (prev , val . 0)) } else { Some (val . 0) } ; old . 1 = if let Some (prev) = old . 1 . take () { Some (std :: cmp :: max (prev , val . 1)) } else { Some (val . 1) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () , a . 1 . unwrap () ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let mut sg_2v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_2v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_10v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::< + (), + (Option<_>, Option<_>), + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_6v3_send)| { + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_25_2_44(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1.map(|row: (_, _)| ((), (row.0, row.1))); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_1_0_1_0(op_9v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_9v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 1, + var_expr!(hoff_6v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_6v3_recv), var_args!()| { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut sg_1v1_node_10v1_hashtable = context + .state_ref(sg_1v1_node_10v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_6v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_1v1_node_10v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None, None)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>, Option<_>), val: (_, _)| { + old.0 = if let Some(prev) = old.0.take() { + Some(std::cmp::max(prev, val.0)) + } else { + Some(val.0) + }; + old.1 = if let Some(prev) = old.1.take() { + Some(std::cmp::max(prev, val.1)) + } else { + Some(val.1) + }; + }, + ); + } + } + let op_10v1 = sg_1v1_node_10v1_hashtable.drain(); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__fold_keyed__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1 + .map(|(g, a): ((), _)| (a.0.unwrap(), a.1.unwrap())); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@surface_graph.snap new file mode 100644 index 000000000000..62617b30d3d5 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__max_all@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row : (_ , _ ,) | (() , (row . 0 , row . 1 ,))); +10v1 = fold_keyed :: < 'tick , () , (Option < _ > , Option < _ > ,) > (| | (None , None ,) , | old : & mut (Option < _ > , Option < _ > ,) , val : (_ , _ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (std :: cmp :: max (prev , val . 0)) } else { Some (val . 0) } ; old . 1 = if let Some (prev) = old . 1 . take () { Some (std :: cmp :: max (prev , val . 1)) } else { Some (val . 1) } ; }); +11v1 = map (| (g , a) : (() , _) | (a . 0 . unwrap () , a . 1 . unwrap () ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +10v1 -> 11v1; +9v1 -> 10v1; +2v1 -> 9v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@datalog_program.snap new file mode 100644 index 000000000000..5c00c8626c5c --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@datalog_program.snap @@ -0,0 +1,315 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(input) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1.map(|row: (_, _)| ((row.1, row.0), ())); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_1_0_1_0(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + let op_5v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_25_3_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_25_3_59(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@surface_graph.snap new file mode 100644 index 000000000000..c9b222ec3488 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__minimal_program@surface_graph.snap @@ -0,0 +1,16 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (input); +8v1 = for_each (| v | out . send (v) . unwrap ()); +9v1 = map (| row : (_ , _ ,) | ((row . 1 , row . 0 ,) , ())); +10v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +10v1 -> 5v1; +5v1 -> 8v1; +9v1 -> 10v1; +2v1 -> 9v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@datalog_program.snap new file mode 100644 index 000000000000..6d91a3b85706 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@datalog_program.snap @@ -0,0 +1,402 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ , _ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 , row_untuple . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ , _ , _ ,) | (row_untuple . 0 , row_untuple . 1 , row_untuple . 2 . 0 , row_untuple . 2 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ , _ ,) | ((row . 0 , row . 1 , row . 2 , row . 3 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1 + .map(|row_untuple: (_, _)| ( + row_untuple.0.0, + row_untuple.0.1, + row_untuple.1, + )); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_6_12_6_55< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_6_12_6_55(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1 + .map(|row_untuple: (_, _, _)| ( + row_untuple.0, + row_untuple.1, + row_untuple.2.0, + row_untuple.2.1, + )); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_6_12_6_55< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_6_12_6_55(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1 + .map(|row: (_, _, _, _)| ((row.0, row.1, row.2, row.3), ())); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_12v1 = op_11v1 + .map(|(g, a): ((_, _, _, _), _)| (g.0, g.1, g.2, g.3)); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__map__loc_nopath_1_0_1_0(op_12v1) + }; + let op_5v1 = op_12v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_4_20_4_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_4_28_4_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_4_28_4_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@surface_graph.snap new file mode 100644 index 000000000000..d19d8f1dd48e --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multi_detuple@surface_graph.snap @@ -0,0 +1,20 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints1); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row_untuple : (_ , _ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 , row_untuple . 1 ,)); +10v1 = map (| row_untuple : (_ , _ , _ ,) | (row_untuple . 0 , row_untuple . 1 , row_untuple . 2 . 0 , row_untuple . 2 . 1 ,)); +11v1 = map (| row : (_ , _ , _ , _ ,) | ((row . 0 , row . 1 , row . 2 , row . 3 ,) , ())); +12v1 = map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,)); + +7v1 -> 2v1; +12v1 -> 5v1; +5v1 -> 8v1; +9v1 -> 10v1; +2v1 -> 9v1; +11v1 -> 12v1; +10v1 -> 11v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@datalog_program.snap new file mode 100644 index 000000000000..91a476436ba8 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@datalog_program.snap @@ -0,0 +1,547 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":\"out_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_10v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_1v1_node_11v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in2) + }; + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_10v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__source_stream__loc_nopath_2_24_2_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__source_stream__loc_nopath_2_24_2_42(op_10v1) + }; + let op_2v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) + }; + let op_11v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__source_stream__loc_nopath_3_24_3_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__source_stream__loc_nopath_3_24_3_42(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = op_2v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_5v1.map(|row: (_, _)| ((row.1, row.0), ())); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_1_0_1_0(op_15v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = op_15v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_1_0_1_0(op_16v1) + }; + let op_7v1 = { + #[allow(unused)] + #[inline(always)] + fn check_inputs< + A: ::std::iter::Iterator, + B: ::std::iter::Iterator, + Item, + >(a: A, b: B) -> impl ::std::iter::Iterator { + a.chain(b) + } + check_inputs(op_14v1, op_16v1) + }; + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__union__loc_nopath_4_20_4_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__union__loc_nopath_4_20_4_23(op_7v1) + }; + let op_8v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_4_20_4_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_4_20_4_23(op_8v1) + }; + let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__for_each__loc_nopath_4_25_4_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__for_each__loc_nopath_4_25_4_59(op_12v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_8v1, op_12v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@surface_graph.snap new file mode 100644 index 000000000000..502b61725fe0 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__multiple_contributors@surface_graph.snap @@ -0,0 +1,26 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = union (); +8v1 = unique :: < 'tick > (); +10v1 = source_stream (in1); +11v1 = source_stream (in2); +12v1 = for_each (| v | out . send (v) . unwrap ()); +13v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +14v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); +15v1 = map (| row : (_ , _ ,) | ((row . 1 , row . 0 ,) , ())); +16v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +10v1 -> 2v1; +11v1 -> 5v1; +7v1 -> 8v1; +8v1 -> 12v1; +14v1 -> 7v1; +13v1 -> 14v1; +2v1 -> 13v1; +16v1 -> 7v1; +15v1 -> 16v1; +5v1 -> 15v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@datalog_program.snap new file mode 100644 index 000000000000..d2cb16f0aab6 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@datalog_program.snap @@ -0,0 +1,315 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (strings)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 . clone () , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"strings_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(strings) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_28_2_50< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_28_2_50(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_26(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_9v1 = op_2v1.map(|row: (_,)| ((row.0.clone(), row.0), ())); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__map__loc_nopath_1_0_1_0(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + let op_5v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@surface_graph.snap new file mode 100644 index 000000000000..182918123c11 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__non_copy_but_clone@surface_graph.snap @@ -0,0 +1,16 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (strings); +8v1 = for_each (| v | result . send (v) . unwrap ()); +9v1 = map (| row : (_ ,) | ((row . 0 . clone () , row . 0 ,) , ())); +10v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +10v1 -> 5v1; +5v1 -> 8v1; +9v1 -> 10v1; +2v1 -> 9v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@datalog_program.snap new file mode 100644 index 000000000000..5dbfaafe8bc5 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@datalog_program.snap @@ -0,0 +1,2996 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints3)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result3 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result4 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'static , 'static , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : (() , ((_ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'static , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : (() , ((_ , _ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 0 . 1 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | (() , (_v . 0 , _v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ ,) | ((row . 0 , row . 1 , row . 2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"anti_join ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ()) | (kv . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (_v . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":34,\"version\":1},{\"idx\":14,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":28,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":25,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":35,\"version\":1},{\"idx\":11,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":22,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":19,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":36,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":13,\"version\":3},{\"idx\":33,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":50,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":3},{\"idx\":31,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":58,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":19,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":63,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":22,\"version\":3},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":68,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":25,\"version\":3},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":61,\"version\":1},{\"idx\":27,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":28,\"version\":3},{\"idx\":3,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":65,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":30,\"version\":1},{\"idx\":31,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":33,\"version\":1},{\"idx\":16,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":32,\"version\":1},{\"idx\":13,\"version\":3}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":3},{\"idx\":7,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":37,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":38,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":39,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":41,\"version\":1},{\"idx\":42,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":43,\"version\":1},{\"idx\":41,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":29,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":44,\"version\":1},{\"idx\":41,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":26,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":45,\"version\":1},{\"idx\":46,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":47,\"version\":1},{\"idx\":45,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":42,\"version\":1},{\"idx\":47,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":48,\"version\":1},{\"idx\":45,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":48,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":3},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":49,\"version\":1},{\"idx\":50,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":46,\"version\":1},{\"idx\":49,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":54,\"version\":1},{\"idx\":51,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":53,\"version\":1},{\"idx\":54,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":23,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":56,\"version\":1},{\"idx\":20,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":55,\"version\":1},{\"idx\":56,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":55,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":3},{\"idx\":65,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":57,\"version\":1},{\"idx\":58,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":52,\"version\":1},{\"idx\":57,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":3},{\"idx\":44,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":60,\"version\":1},{\"idx\":61,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":59,\"version\":1},{\"idx\":60,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":59,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":3},{\"idx\":51,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":62,\"version\":1},{\"idx\":63,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":27,\"version\":1},{\"idx\":62,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":29,\"version\":3},{\"idx\":43,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":64,\"version\":1},{\"idx\":17,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":64,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":3},{\"idx\":53,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":67,\"version\":1},{\"idx\":68,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":66,\"version\":1},{\"idx\":67,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":32,\"version\":1},{\"idx\":66,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"3\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":9,\"version\":1},\"version\":1},{\"value\":{\"idx\":10,\"version\":1},\"version\":1},{\"value\":{\"idx\":11,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":33,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":43,\"version\":1},{\"idx\":44,\"version\":1},{\"idx\":41,\"version\":1},{\"idx\":42,\"version\":1},{\"idx\":47,\"version\":1},{\"idx\":48,\"version\":1},{\"idx\":45,\"version\":1},{\"idx\":46,\"version\":1},{\"idx\":49,\"version\":1},{\"idx\":50,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":37,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":53,\"version\":1},{\"idx\":54,\"version\":1},{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1},{\"idx\":57,\"version\":1},{\"idx\":58,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":38,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":59,\"version\":1},{\"idx\":60,\"version\":1},{\"idx\":61,\"version\":1},{\"idx\":27,\"version\":1},{\"idx\":62,\"version\":1},{\"idx\":63,\"version\":1},{\"idx\":21,\"version\":1},{\"idx\":39,\"version\":1},{\"idx\":64,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":65,\"version\":1},{\"idx\":30,\"version\":1},{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1},{\"idx\":66,\"version\":1},{\"idx\":67,\"version\":1},{\"idx\":68,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":55,\"version\":1},{\"idx\":56,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":34,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":35,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":36,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":1,\"version\":1},{\"value\":2,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":\"ints2\",\"version\":1},{\"value\":\"ints2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result4_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"intermediate_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"intermediate_persist_insert\",\"version\":1},{\"value\":\"intermediate_persist\",\"version\":1},{\"value\":\"intermediate_persist\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_4\",\"version\":1},{\"value\":\"join_4\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_7\",\"version\":1},{\"value\":\"join_7\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_11v3_send, hoff_11v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(11v3)"); + let (hoff_13v3_send, hoff_13v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(13v3)"); + let (hoff_14v3_send, hoff_14v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(14v3)"); + let (hoff_16v3_send, hoff_16v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(16v3)"); + let (hoff_17v3_send, hoff_17v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(17v3)"); + let (hoff_19v3_send, hoff_19v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(19v3)"); + let (hoff_20v3_send, hoff_20v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(20v3)"); + let (hoff_22v3_send, hoff_22v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(22v3)"); + let (hoff_23v3_send, hoff_23v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(23v3)"); + let (hoff_25v3_send, hoff_25v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(25v3)"); + let (hoff_26v3_send, hoff_26v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(26v3)"); + let (hoff_28v3_send, hoff_28v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(28v3)"); + let (hoff_29v3_send, hoff_29v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(29v3)"); + let mut sg_9v1_node_34v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let mut sg_10v1_node_35v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints2) + }; + let mut sg_11v1_node_36v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints3) + }; + let sg_4v1_node_12v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_4v1_node_41v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + let sg_4v1_node_41v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + let sg_4v1_node_45v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + let sg_4v1_node_45v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_4v1_node_45v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_4v1_node_15v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let singleton_op_53v1 = df + .add_state(::std::cell::RefCell::new(::std::vec::Vec::new())); + let sg_5v1_node_51v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_5v1_node_51v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_5v1_node_18v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_6v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_6v1_node_3v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + ); + let sg_6v1_node_3v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_6v1_node_21v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_6v1_node_27v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let singleton_op_61v1 = df + .add_state(::std::cell::RefCell::new(::std::vec::Vec::new())); + let sg_7v1_node_30v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_7v1_node_31v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + ); + let sg_7v1_node_31v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_7v1_node_24v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let singleton_op_68v1 = df + .add_state(::std::cell::RefCell::new(::std::vec::Vec::new())); + let sg_8v1_node_7v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_8v1_node_8v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + ); + let sg_8v1_node_8v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let singleton_op_55v1 = df + .add_state(::std::cell::RefCell::new(::std::vec::Vec::new())); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(9v1)", + 0, + var_expr!(), + var_expr!(hoff_14v3_send), + false, + move |context, var_args!(), var_args!(hoff_14v3_send)| { + let hoff_14v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_14v3_send.give(Some(v)); + }); + let op_34v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_9v1_node_34v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_34v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_34v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_34v1__source_stream__loc_nopath_2_26_2_46(op_34v1) + }; + #[inline(always)] + fn pivot_run_sg_9v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_9v1(op_34v1, hoff_14v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(10v1)", + 0, + var_expr!(), + var_expr!(hoff_11v3_send), + false, + move |context, var_args!(), var_args!(hoff_11v3_send)| { + let hoff_11v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_11v3_send.give(Some(v)); + }); + let op_35v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_10v1_node_35v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_35v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_35v1__source_stream__loc_nopath_5_26_5_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_35v1__source_stream__loc_nopath_5_26_5_46(op_35v1) + }; + #[inline(always)] + fn pivot_run_sg_10v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_10v1(op_35v1, hoff_11v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(11v1)", + 0, + var_expr!(), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_6v3_send)| { + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_36v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_11v1_node_36v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_36v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_36v1__source_stream__loc_nopath_8_26_8_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_36v1__source_stream__loc_nopath_8_26_8_46(op_36v1) + }; + #[inline(always)] + fn pivot_run_sg_11v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_11v1(op_36v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(hoff_25v3_recv), + var_expr!(hoff_28v3_send), + false, + move |context, var_args!(hoff_25v3_recv), var_args!(hoff_28v3_send)| { + let mut hoff_25v3_recv = hoff_25v3_recv.borrow_mut_swap(); + let hoff_25v3_recv = hoff_25v3_recv.drain(..); + let hoff_28v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_28v3_send.give(Some(v)); + }); + let op_5v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_25v3_recv) + }; + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__defer_tick__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__defer_tick__loc_nopath_2_19_2_24(op_5v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, hoff_28v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(hoff_19v3_recv), + var_expr!(hoff_22v3_send), + false, + move |context, var_args!(hoff_19v3_recv), var_args!(hoff_22v3_send)| { + let mut hoff_19v3_recv = hoff_19v3_recv.borrow_mut_swap(); + let hoff_19v3_recv = hoff_19v3_recv.drain(..); + let hoff_22v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_22v3_send.give(Some(v)); + }); + let op_10v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_19v3_recv) + }; + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__defer_tick__loc_nopath_5_19_5_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__defer_tick__loc_nopath_5_19_5_24(op_10v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_10v1, hoff_22v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(3v1)", + 0, + var_expr!(hoff_13v3_recv), + var_expr!(hoff_16v3_send), + false, + move |context, var_args!(hoff_13v3_recv), var_args!(hoff_16v3_send)| { + let mut hoff_13v3_recv = hoff_13v3_recv.borrow_mut_swap(); + let hoff_13v3_recv = hoff_13v3_recv.drain(..); + let hoff_16v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_16v3_send.give(Some(v)); + }); + let op_33v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_13v3_recv) + }; + let op_33v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_33v1__defer_tick__loc_nopath_21_21_21_41< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_33v1__defer_tick__loc_nopath_21_21_21_41(op_33v1) + }; + #[inline(always)] + fn pivot_run_sg_3v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_3v1(op_33v1, hoff_16v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(4v1)", + 1, + var_expr!(hoff_6v3_recv, hoff_26v3_recv, hoff_29v3_recv), + var_expr!(), + false, + move | + context, + var_args!(hoff_6v3_recv, hoff_26v3_recv, hoff_29v3_recv), + var_args!()| + { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut hoff_26v3_recv = hoff_26v3_recv.borrow_mut_swap(); + let hoff_26v3_recv = hoff_26v3_recv.drain(..); + let mut hoff_29v3_recv = hoff_29v3_recv.borrow_mut_swap(); + let hoff_29v3_recv = hoff_29v3_recv.drain(..); + let op_12v1 = hoff_6v3_recv + .filter(|item| { + let mut borrow = context + .state_ref(sg_4v1_node_12v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__unique__loc_nopath_8_19_8_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__unique__loc_nopath_8_19_8_24(op_12v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_43v1 = hoff_29v3_recv.map(|_v: (_,)| ((), (_v.0,))); + let op_43v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_43v1__map__loc_nopath_15_31_15_39< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_43v1__map__loc_nopath_15_31_15_39(op_43v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_44v1 = hoff_26v3_recv.map(|_v: (_,)| ((), (_v.0,))); + let op_44v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_44v1__map__loc_nopath_15_41_15_49< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_44v1__map__loc_nopath_15_41_15_49(op_44v1) + }; + let mut sg_4v1_node_41v1_joindata_lhs_borrow = context + .state_ref(sg_4v1_node_41v1_joindata_lhs) + .borrow_mut(); + let mut sg_4v1_node_41v1_joindata_rhs_borrow = context + .state_ref(sg_4v1_node_41v1_joindata_rhs) + .borrow_mut(); + let op_41v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_43v1, + op_44v1, + &mut *sg_4v1_node_41v1_joindata_lhs_borrow, + &mut *sg_4v1_node_41v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_41v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_41v1__join__loc_nopath_15_12_15_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_41v1__join__loc_nopath_15_12_15_59(op_41v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_42v1 = op_41v1 + .map(|kv: ((), ((_,), (_,)))| (kv.1.0.0, kv.1.1.0)); + let op_42v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_42v1__map__loc_nopath_15_12_15_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_42v1__map__loc_nopath_15_12_15_59(op_42v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_47v1 = op_42v1.map(|_v: (_, _)| ((), (_v.0, _v.1))); + let op_47v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_47v1__map__loc_nopath_15_31_15_49< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_47v1__map__loc_nopath_15_31_15_49(op_47v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_48v1 = op_12v1.map(|_v: (_,)| ((), (_v.0,))); + let op_48v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_48v1__map__loc_nopath_15_51_15_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_48v1__map__loc_nopath_15_51_15_59(op_48v1) + }; + let mut sg_4v1_node_45v1_joindata_lhs_borrow = context + .state_ref(sg_4v1_node_45v1_joindata_lhs) + .borrow_mut(); + let mut sg_4v1_node_45v1_joindata_rhs_borrow = context + .state_ref(sg_4v1_node_45v1_joindata_rhs) + .borrow_mut(); + let op_45v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_47v1, + op_48v1, + &mut *sg_4v1_node_45v1_joindata_lhs_borrow, + &mut *sg_4v1_node_45v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_45v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_45v1__join__loc_nopath_15_12_15_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_45v1__join__loc_nopath_15_12_15_59(op_45v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_46v1 = op_45v1 + .map(|kv: ((), ((_, _), (_,)))| (kv.1.0.0, kv.1.0.1, kv.1.1.0)); + let op_46v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_46v1__map__loc_nopath_15_12_15_59< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_46v1__map__loc_nopath_15_12_15_59(op_46v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_49v1 = op_46v1 + .map(|row: (_, _, _)| ((row.0, row.1, row.2), ())); + let op_49v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_49v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_49v1__map__loc_nopath_1_0_1_0(op_49v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_50v1 = op_49v1.map(|(g, a): ((_, _, _), _)| (g.0, g.1, g.2)); + let op_50v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_50v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_50v1__map__loc_nopath_1_0_1_0(op_50v1) + }; + let op_15v1 = op_50v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_4v1_node_15v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__unique__loc_nopath_10_20_10_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__unique__loc_nopath_10_20_10_26(op_15v1) + }; + let op_37v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_37v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_37v1__for_each__loc_nopath_10_28_10_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_37v1__for_each__loc_nopath_10_28_10_65(op_37v1) + }; + #[inline(always)] + fn pivot_run_sg_4v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_4v1(op_15v1, op_37v1); + context.schedule_subgraph(context.current_subgraph(), false); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(5v1)", + 2, + var_expr!(hoff_20v3_recv, hoff_23v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_20v3_recv, hoff_23v3_recv), var_args!()| { + let mut hoff_20v3_recv = hoff_20v3_recv.borrow_mut_swap(); + let hoff_20v3_recv = hoff_20v3_recv.drain(..); + let mut hoff_23v3_recv = hoff_23v3_recv.borrow_mut_swap(); + let hoff_23v3_recv = hoff_23v3_recv.drain(..); + let mut sg_5v1_node_53v1_persistvec = context + .state_ref(singleton_op_53v1) + .borrow_mut(); + let op_53v1 = { + if context.is_first_run_this_tick() { + sg_5v1_node_53v1_persistvec.extend(hoff_23v3_recv); + sg_5v1_node_53v1_persistvec.iter().cloned() + } else { + let len = sg_5v1_node_53v1_persistvec.len(); + sg_5v1_node_53v1_persistvec.extend(hoff_23v3_recv); + sg_5v1_node_53v1_persistvec[len..].iter().cloned() + } + }; + let op_53v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_53v1__persist__loc_nopath_16_26_16_34< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_53v1__persist__loc_nopath_16_26_16_34(op_53v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_54v1 = op_53v1.map(|_v: (_,)| ((_v.0,), ())); + let op_54v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_54v1__map__loc_nopath_16_26_16_34< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_54v1__map__loc_nopath_16_26_16_34(op_54v1) + }; + let mut sg_5v1_node_51v1_antijoindata_neg_borrow = context + .state_ref(sg_5v1_node_51v1_antijoindata_neg) + .borrow_mut(); + let mut sg_5v1_node_51v1_antijoindata_pos_borrow = context + .state_ref(sg_5v1_node_51v1_antijoindata_pos) + .borrow_mut(); + let op_51v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_20v3_recv, + op_54v1, + &mut *sg_5v1_node_51v1_antijoindata_neg_borrow + .get_mut_clear(context.current_tick()), + &mut *sg_5v1_node_51v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_51v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_51v1__anti_join__loc_nopath_16_12_16_45< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_51v1__anti_join__loc_nopath_16_12_16_45(op_51v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_52v1 = op_51v1.map(|kv: ((_,), ())| (kv.0.0,)); + let op_52v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_52v1__map__loc_nopath_16_12_16_45< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_52v1__map__loc_nopath_16_12_16_45(op_52v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_57v1 = op_52v1.map(|row: (_,)| ((row.0,), ())); + let op_57v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_57v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_57v1__map__loc_nopath_1_0_1_0(op_57v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_58v1 = op_57v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_58v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_58v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_58v1__map__loc_nopath_1_0_1_0(op_58v1) + }; + let op_18v1 = op_58v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_5v1_node_18v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__unique__loc_nopath_11_20_11_27< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__unique__loc_nopath_11_20_11_27(op_18v1) + }; + let op_38v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result2.send(v).unwrap() + }); + let op_38v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_38v1__for_each__loc_nopath_11_29_11_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_38v1__for_each__loc_nopath_11_29_11_67(op_38v1) + }; + #[inline(always)] + fn pivot_run_sg_5v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_5v1(op_18v1, op_38v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(6v1)", + 1, + var_expr!(hoff_14v3_recv, hoff_28v3_recv), + var_expr!( + hoff_17v3_send, hoff_23v3_send, hoff_25v3_send, hoff_29v3_send + ), + false, + move | + context, + var_args!(hoff_14v3_recv, hoff_28v3_recv), + var_args!( + hoff_17v3_send, hoff_23v3_send, hoff_25v3_send, hoff_29v3_send + )| + { + let mut hoff_14v3_recv = hoff_14v3_recv.borrow_mut_swap(); + let hoff_14v3_recv = hoff_14v3_recv.drain(..); + let mut hoff_28v3_recv = hoff_28v3_recv.borrow_mut_swap(); + let hoff_28v3_recv = hoff_28v3_recv.drain(..); + let hoff_17v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_17v3_send.give(Some(v)); + }); + let hoff_23v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_23v3_send.give(Some(v)); + }); + let hoff_25v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_25v3_send.give(Some(v)); + }); + let hoff_29v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_29v3_send.give(Some(v)); + }); + let op_2v1 = hoff_14v3_recv + .filter(|item| { + let mut borrow = context + .state_ref(sg_6v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_2v1 = op_2v1.map(|k| (k, ())); + let mut sg_6v1_node_3v1_antijoindata_neg_borrow = context + .state_ref(sg_6v1_node_3v1_antijoindata_neg) + .borrow_mut(); + let mut sg_6v1_node_3v1_antijoindata_pos_borrow = context + .state_ref(sg_6v1_node_3v1_antijoindata_pos) + .borrow_mut(); + let op_3v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_28v3_recv, + op_2v1, + &mut *sg_6v1_node_3v1_antijoindata_neg_borrow, + &mut *sg_6v1_node_3v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_3v1 = op_3v1.map(|(k, ())| k); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__difference__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_3v1__difference__loc_nopath_2_19_2_24(op_3v1) + }; + let op_64v1 = hydroflow::pusherator::map::Map::new( + |row: (_,)| ((row.0,), ()), + hoff_17v3_send, + ); + let op_64v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_64v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_64v1__map__loc_nopath_1_0_1_0(op_64v1) + }; + let op_39v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result3.send(v).unwrap() + }); + let op_39v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_39v1__for_each__loc_nopath_12_29_12_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_39v1__for_each__loc_nopath_12_29_12_67(op_39v1) + }; + let op_21v1 = hydroflow::pusherator::filter::Filter::new( + |item| { + let mut borrow = context + .state_ref(sg_6v1_node_21v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }, + op_39v1, + ); + let op_21v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_21v1__unique__loc_nopath_12_20_12_27< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_21v1__unique__loc_nopath_12_20_12_27(op_21v1) + }; + let op_63v1 = hydroflow::pusherator::map::Map::new( + |(g, a): ((_,), _)| (g.0,), + op_21v1, + ); + let op_63v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_63v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_63v1__map__loc_nopath_1_0_1_0(op_63v1) + }; + let op_62v1 = hydroflow::pusherator::map::Map::new( + |row: (_,)| ((row.0,), ()), + op_63v1, + ); + let op_62v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_62v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_62v1__map__loc_nopath_1_0_1_0(op_62v1) + }; + let op_27v1 = hydroflow::pusherator::filter::Filter::new( + |item| { + let mut borrow = context + .state_ref(sg_6v1_node_27v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }, + op_62v1, + ); + let op_27v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_27v1__unique__loc_nopath_18_12_18_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_27v1__unique__loc_nopath_18_12_18_24(op_27v1) + }; + let mut sg_6v1_node_61v1_persistvec = context + .state_ref(singleton_op_61v1) + .borrow_mut(); + let op_61v1 = { + fn constrain_types<'ctx, Push, Item>( + vec: &'ctx mut Vec, + mut output: Push, + is_new_tick: bool, + ) -> impl 'ctx + hydroflow::pusherator::Pusherator + where + Push: 'ctx + hydroflow::pusherator::Pusherator, + Item: ::std::clone::Clone, + { + if is_new_tick { + vec.iter() + .cloned() + .for_each(|item| { + hydroflow::pusherator::Pusherator::give(&mut output, item); + }); + } + hydroflow::pusherator::map::Map::new( + |item| { + vec.push(item); + vec.last().unwrap().clone() + }, + output, + ) + } + constrain_types( + &mut *sg_6v1_node_61v1_persistvec, + op_27v1, + context.is_first_run_this_tick(), + ) + }; + let op_61v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_61v1__persist__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_61v1__persist__loc_nopath_1_0_1_0(op_61v1) + }; + let op_60v1 = hydroflow::pusherator::map::Map::new( + |(g, a): ((_,), _)| (g.0,), + op_61v1, + ); + let op_60v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_60v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_60v1__map__loc_nopath_1_0_1_0(op_60v1) + }; + let op_59v1 = hydroflow::pusherator::map::Map::new( + |row: (_,)| ((row.0,), ()), + op_60v1, + ); + let op_59v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_59v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_59v1__map__loc_nopath_1_0_1_0(op_59v1) + }; + let op_4v1 = hydroflow::pusherator::tee::Tee::new( + hoff_29v3_send, + hydroflow::pusherator::tee::Tee::new( + hoff_23v3_send, + hydroflow::pusherator::tee::Tee::new( + op_59v1, + hydroflow::pusherator::tee::Tee::new( + op_64v1, + hoff_25v3_send, + ), + ), + ), + ); + let op_4v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_4v1__tee__loc_nopath_2_19_2_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_4v1__tee__loc_nopath_2_19_2_24(op_4v1) + }; + #[inline(always)] + fn pivot_run_sg_6v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_6v1(op_3v1, op_4v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(7v1)", + 1, + var_expr!(hoff_16v3_recv, hoff_17v3_recv), + var_expr!(hoff_13v3_send), + false, + move | + context, + var_args!(hoff_16v3_recv, hoff_17v3_recv), + var_args!(hoff_13v3_send)| + { + let mut hoff_16v3_recv = hoff_16v3_recv.borrow_mut_swap(); + let hoff_16v3_recv = hoff_16v3_recv.drain(..); + let mut hoff_17v3_recv = hoff_17v3_recv.borrow_mut_swap(); + let hoff_17v3_recv = hoff_17v3_recv.drain(..); + let hoff_13v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_13v3_send.give(Some(v)); + }); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_65v1 = hoff_17v3_recv.map(|(g, a): ((_,), _)| (g.0,)); + let op_65v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_65v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_65v1__map__loc_nopath_1_0_1_0(op_65v1) + }; + let op_30v1 = op_65v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_7v1_node_30v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_30v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_30v1__unique__loc_nopath_21_21_21_41< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_30v1__unique__loc_nopath_21_21_21_41(op_30v1) + }; + let op_30v1 = op_30v1.map(|k| (k, ())); + let mut sg_7v1_node_31v1_antijoindata_neg_borrow = context + .state_ref(sg_7v1_node_31v1_antijoindata_neg) + .borrow_mut(); + let mut sg_7v1_node_31v1_antijoindata_pos_borrow = context + .state_ref(sg_7v1_node_31v1_antijoindata_pos) + .borrow_mut(); + let op_31v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_16v3_recv, + op_30v1, + &mut *sg_7v1_node_31v1_antijoindata_neg_borrow, + &mut *sg_7v1_node_31v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_31v1 = op_31v1.map(|(k, ())| k); + let op_31v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_31v1__difference__loc_nopath_21_21_21_41< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_31v1__difference__loc_nopath_21_21_21_41(op_31v1) + }; + let op_40v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result4.send(v).unwrap() + }); + let op_40v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_40v1__for_each__loc_nopath_13_29_13_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_40v1__for_each__loc_nopath_13_29_13_67(op_40v1) + }; + let op_24v1 = hydroflow::pusherator::filter::Filter::new( + |item| { + let mut borrow = context + .state_ref(sg_7v1_node_24v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }, + op_40v1, + ); + let op_24v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_24v1__unique__loc_nopath_13_20_13_27< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_24v1__unique__loc_nopath_13_20_13_27(op_24v1) + }; + let mut sg_7v1_node_68v1_persistvec = context + .state_ref(singleton_op_68v1) + .borrow_mut(); + let op_68v1 = { + fn constrain_types<'ctx, Push, Item>( + vec: &'ctx mut Vec, + mut output: Push, + is_new_tick: bool, + ) -> impl 'ctx + hydroflow::pusherator::Pusherator + where + Push: 'ctx + hydroflow::pusherator::Pusherator, + Item: ::std::clone::Clone, + { + if is_new_tick { + vec.iter() + .cloned() + .for_each(|item| { + hydroflow::pusherator::Pusherator::give(&mut output, item); + }); + } + hydroflow::pusherator::map::Map::new( + |item| { + vec.push(item); + vec.last().unwrap().clone() + }, + output, + ) + } + constrain_types( + &mut *sg_7v1_node_68v1_persistvec, + op_24v1, + context.is_first_run_this_tick(), + ) + }; + let op_68v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_68v1__persist__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_68v1__persist__loc_nopath_1_0_1_0(op_68v1) + }; + let op_67v1 = hydroflow::pusherator::map::Map::new( + |(g, a): ((_,), _)| (g.0,), + op_68v1, + ); + let op_67v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_67v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_67v1__map__loc_nopath_1_0_1_0(op_67v1) + }; + let op_66v1 = hydroflow::pusherator::map::Map::new( + |row: (_,)| ((row.0,), ()), + op_67v1, + ); + let op_66v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_66v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_66v1__map__loc_nopath_1_0_1_0(op_66v1) + }; + let op_32v1 = hydroflow::pusherator::tee::Tee::new( + op_66v1, + hoff_13v3_send, + ); + let op_32v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_32v1__tee__loc_nopath_21_21_21_41< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_32v1__tee__loc_nopath_21_21_21_41(op_32v1) + }; + #[inline(always)] + fn pivot_run_sg_7v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_7v1(op_31v1, op_32v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(8v1)", + 1, + var_expr!(hoff_11v3_recv, hoff_22v3_recv), + var_expr!(hoff_19v3_send, hoff_20v3_send, hoff_26v3_send), + false, + move | + context, + var_args!(hoff_11v3_recv, hoff_22v3_recv), + var_args!(hoff_19v3_send, hoff_20v3_send, hoff_26v3_send)| + { + let mut hoff_11v3_recv = hoff_11v3_recv.borrow_mut_swap(); + let hoff_11v3_recv = hoff_11v3_recv.drain(..); + let mut hoff_22v3_recv = hoff_22v3_recv.borrow_mut_swap(); + let hoff_22v3_recv = hoff_22v3_recv.drain(..); + let hoff_19v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_19v3_send.give(Some(v)); + }); + let hoff_20v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_20v3_send.give(Some(v)); + }); + let hoff_26v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_26v3_send.give(Some(v)); + }); + let op_7v1 = hoff_11v3_recv + .filter(|item| { + let mut borrow = context + .state_ref(sg_8v1_node_7v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__unique__loc_nopath_5_19_5_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__unique__loc_nopath_5_19_5_24(op_7v1) + }; + let op_7v1 = op_7v1.map(|k| (k, ())); + let mut sg_8v1_node_8v1_antijoindata_neg_borrow = context + .state_ref(sg_8v1_node_8v1_antijoindata_neg) + .borrow_mut(); + let mut sg_8v1_node_8v1_antijoindata_pos_borrow = context + .state_ref(sg_8v1_node_8v1_antijoindata_pos) + .borrow_mut(); + let op_8v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_22v3_recv, + op_7v1, + &mut *sg_8v1_node_8v1_antijoindata_neg_borrow, + &mut *sg_8v1_node_8v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_8v1 = op_8v1.map(|(k, ())| k); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__difference__loc_nopath_5_19_5_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__difference__loc_nopath_5_19_5_24(op_8v1) + }; + let op_56v1 = hydroflow::pusherator::map::Map::new( + |_v: (_,)| (_v.0,), + hoff_20v3_send, + ); + let op_56v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_56v1__map__loc_nopath_16_37_16_45< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_56v1__map__loc_nopath_16_37_16_45(op_56v1) + }; + let mut sg_8v1_node_55v1_persistvec = context + .state_ref(singleton_op_55v1) + .borrow_mut(); + let op_55v1 = { + fn constrain_types<'ctx, Push, Item>( + vec: &'ctx mut Vec, + mut output: Push, + is_new_tick: bool, + ) -> impl 'ctx + hydroflow::pusherator::Pusherator + where + Push: 'ctx + hydroflow::pusherator::Pusherator, + Item: ::std::clone::Clone, + { + if is_new_tick { + vec.iter() + .cloned() + .for_each(|item| { + hydroflow::pusherator::Pusherator::give(&mut output, item); + }); + } + hydroflow::pusherator::map::Map::new( + |item| { + vec.push(item); + vec.last().unwrap().clone() + }, + output, + ) + } + constrain_types( + &mut *sg_8v1_node_55v1_persistvec, + op_56v1, + context.is_first_run_this_tick(), + ) + }; + let op_55v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_55v1__persist__loc_nopath_16_37_16_45< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_55v1__persist__loc_nopath_16_37_16_45(op_55v1) + }; + let op_9v1 = hydroflow::pusherator::tee::Tee::new( + hoff_26v3_send, + hydroflow::pusherator::tee::Tee::new(op_55v1, hoff_19v3_send), + ); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__tee__loc_nopath_5_19_5_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_9v1__tee__loc_nopath_5_19_5_24(op_9v1) + }; + #[inline(always)] + fn pivot_run_sg_8v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_8v1(op_8v1, op_9v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@surface_graph.snap new file mode 100644 index 000000000000..06c22e5ff80d --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist@surface_graph.snap @@ -0,0 +1,114 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = difference :: < 'tick , 'static > (); +4v1 = tee (); +5v1 = defer_tick (); +7v1 = unique :: < 'tick > (); +8v1 = difference :: < 'tick , 'static > (); +9v1 = tee (); +10v1 = defer_tick (); +12v1 = unique :: < 'tick > (); +15v1 = unique :: < 'tick > (); +18v1 = unique :: < 'tick > (); +21v1 = unique :: < 'tick > (); +24v1 = unique :: < 'tick > (); +27v1 = unique :: < 'tick > (); +30v1 = unique :: < 'tick > (); +31v1 = difference :: < 'tick , 'static > (); +32v1 = tee (); +33v1 = defer_tick (); +34v1 = source_stream (ints1); +35v1 = source_stream (ints2); +36v1 = source_stream (ints3); +37v1 = for_each (| v | result . send (v) . unwrap ()); +38v1 = for_each (| v | result2 . send (v) . unwrap ()); +39v1 = for_each (| v | result3 . send (v) . unwrap ()); +40v1 = for_each (| v | result4 . send (v) . unwrap ()); +41v1 = join :: < 'static , 'static , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +42v1 = map (| kv : (() , ((_ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,)); +43v1 = map (| _v : (_ ,) | (() , (_v . 0 ,))); +44v1 = map (| _v : (_ ,) | (() , (_v . 0 ,))); +45v1 = join :: < 'static , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +46v1 = map (| kv : (() , ((_ , _ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 0 . 1 , kv . 1 . 1 . 0 ,)); +47v1 = map (| _v : (_ , _ ,) | (() , (_v . 0 , _v . 1 ,))); +48v1 = map (| _v : (_ ,) | (() , (_v . 0 ,))); +49v1 = map (| row : (_ , _ , _ ,) | ((row . 0 , row . 1 , row . 2 ,) , ())); +50v1 = map (| (g , a) : ((_ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 ,)); +51v1 = anti_join (); +52v1 = map (| kv : ((_ ,) , ()) | (kv . 0 . 0 ,)); +53v1 = persist :: < 'static > (); +54v1 = map (| _v : (_ ,) | ((_v . 0 ,) , ())); +55v1 = persist :: < 'static > (); +56v1 = map (| _v : (_ ,) | (_v . 0 ,)); +57v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +58v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +59v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +60v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +61v1 = persist :: < 'static > (); +62v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +63v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +64v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +65v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +66v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +67v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +68v1 = persist :: < 'static > (); + +34v1 -> 2v1; +3v1 -> 4v1; +2v1 -> 3v1; +5v1 -> 3v1; +4v1 -> 5v1; +35v1 -> 7v1; +8v1 -> 9v1; +7v1 -> 8v1; +10v1 -> 8v1; +9v1 -> 10v1; +36v1 -> 12v1; +50v1 -> 15v1; +58v1 -> 18v1; +63v1 -> 21v1; +68v1 -> 24v1; +61v1 -> 27v1; +65v1 -> 30v1; +31v1 -> 32v1; +30v1 -> 31v1; +33v1 -> 31v1; +32v1 -> 33v1; +15v1 -> 37v1; +18v1 -> 38v1; +21v1 -> 39v1; +24v1 -> 40v1; +41v1 -> 42v1; +43v1 -> 41v1; +4v1 -> 43v1; +44v1 -> 41v1; +9v1 -> 44v1; +45v1 -> 46v1; +47v1 -> 45v1; +42v1 -> 47v1; +48v1 -> 45v1; +12v1 -> 48v1; +49v1 -> 50v1; +46v1 -> 49v1; +51v1 -> 52v1; +54v1 -> 51v1; +53v1 -> 54v1; +4v1 -> 53v1; +56v1 -> 51v1; +55v1 -> 56v1; +9v1 -> 55v1; +57v1 -> 58v1; +52v1 -> 57v1; +60v1 -> 61v1; +59v1 -> 60v1; +4v1 -> 59v1; +62v1 -> 63v1; +27v1 -> 62v1; +64v1 -> 65v1; +4v1 -> 64v1; +67v1 -> 68v1; +66v1 -> 67v1; +32v1 -> 66v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@datalog_program.snap new file mode 100644 index 000000000000..d8f3ed23268f --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@datalog_program.snap @@ -0,0 +1,824 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | (() , ((row . 0) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'static , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":11,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":8,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":8,\"version\":3},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":3},{\"idx\":3,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":7,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":2,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let (hoff_8v3_send, hoff_8v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(8v3)"); + let (hoff_9v3_send, hoff_9v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(9v3)"); + let (hoff_11v3_send, hoff_11v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(11v3)"); + let mut sg_4v1_node_12v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints2) + }; + let sg_2v1_node_17v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + ), + ); + let sg_2v1_node_10v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_7v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_3v1_antijoindata_neg = df + .add_state( + std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + ); + let sg_3v1_node_3v1_antijoindata_pos = df + .add_state( + std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(4v1)", + 0, + var_expr!(), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_6v3_send)| { + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_12v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_4v1_node_12v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__source_stream__loc_nopath_4_26_4_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__source_stream__loc_nopath_4_26_4_46(op_12v1) + }; + #[inline(always)] + fn pivot_run_sg_4v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_4v1(op_12v1, hoff_6v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(hoff_8v3_recv), + var_expr!(hoff_11v3_send), + false, + move |context, var_args!(hoff_8v3_recv), var_args!(hoff_11v3_send)| { + let mut hoff_8v3_recv = hoff_8v3_recv.borrow_mut_swap(); + let hoff_8v3_recv = hoff_8v3_recv.drain(..); + let hoff_11v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_11v3_send.give(Some(v)); + }); + let op_5v1 = { + fn check_input, Item>( + iter: Iter, + ) -> impl ::std::iter::Iterator { + iter + } + check_input::<_, _>(hoff_8v3_recv) + }; + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__defer_tick__loc_nopath_2_21_2_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__defer_tick__loc_nopath_2_21_2_26(op_5v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, hoff_11v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 2, + var_expr!(hoff_9v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_9v3_recv), var_args!()| { + let mut hoff_9v3_recv = hoff_9v3_recv.borrow_mut_swap(); + let hoff_9v3_recv = hoff_9v3_recv.drain(..); + let mut sg_2v1_node_17v1_hashtable = context + .state_ref(sg_2v1_node_17v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_9v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_2v1_node_17v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some({ + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; + if set.insert(val.0) { + (set, prev.1 + 1) + } else { + (set, prev.1) + } + }) + } else { + Some({ + let mut set = dfir_rs::rustc_hash::FxHashSet::< + _, + >::default(); + set.insert(val.0); + (set, 1) + }) + }; + }, + ); + } + } + let op_17v1 = context + .is_first_run_this_tick() + .then_some(sg_2v1_node_17v1_hashtable.iter()) + .into_iter() + .flatten() + .map( + #[allow( + unknown_lints, + suspicious_double_ref_op, + clippy::clone_on_copy + )] + |(k, v)| ( + ::std::clone::Clone::clone(k), + ::std::clone::Clone::clone(v), + ), + ); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__fold_keyed__loc_nopath_1_0_1_0(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1.map(|(g, a): ((), _)| (a.0.unwrap().1,)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_1_0_1_0(op_18v1) + }; + let op_10v1 = op_18v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_10v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__unique__loc_nopath_8_20_8_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__unique__loc_nopath_8_20_8_26(op_10v1) + }; + let op_13v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__for_each__loc_nopath_8_28_8_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_13v1__for_each__loc_nopath_8_28_8_65(op_13v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_10v1, op_13v1); + context.schedule_subgraph(context.current_subgraph(), false); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(3v1)", + 1, + var_expr!(hoff_6v3_recv, hoff_11v3_recv), + var_expr!(hoff_8v3_send, hoff_9v3_send), + false, + move | + context, + var_args!(hoff_6v3_recv, hoff_11v3_recv), + var_args!(hoff_8v3_send, hoff_9v3_send)| + { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let mut hoff_11v3_recv = hoff_11v3_recv.borrow_mut_swap(); + let hoff_11v3_recv = hoff_11v3_recv.drain(..); + let hoff_8v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_8v3_send.give(Some(v)); + }); + let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_9v3_send.give(Some(v)); + }); + let op_7v1 = hoff_6v3_recv + .filter(|item| { + let mut borrow = context + .state_ref(sg_3v1_node_7v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__unique__loc_nopath_4_19_4_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__unique__loc_nopath_4_19_4_24(op_7v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_7v1.map(|row: (_,)| ((row.0,), ())); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_14v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_1_0_1_0(op_15v1) + }; + let op_2v1 = op_15v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_3v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_21_2_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_21_2_26(op_2v1) + }; + let op_2v1 = op_2v1.map(|k| (k, ())); + let mut sg_3v1_node_3v1_antijoindata_neg_borrow = context + .state_ref(sg_3v1_node_3v1_antijoindata_neg) + .borrow_mut(); + let mut sg_3v1_node_3v1_antijoindata_pos_borrow = context + .state_ref(sg_3v1_node_3v1_antijoindata_pos) + .borrow_mut(); + let op_3v1 = { + /// Limit error propagation by bounding locally, erasing output iterator type. + #[inline(always)] + fn check_inputs<'a, K, I1, V, I2>( + input_neg: I1, + input_pos: I2, + neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, + pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + ::std::hash::Hash + Clone, + V: Eq + ::std::hash::Hash + Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + neg_state.extend(input_neg); + hydroflow::compiled::pull::anti_join_into_iter( + input_pos, + neg_state, + pos_state, + is_new_tick, + ) + } + check_inputs( + hoff_11v3_recv, + op_2v1, + &mut *sg_3v1_node_3v1_antijoindata_neg_borrow, + &mut *sg_3v1_node_3v1_antijoindata_pos_borrow + .get_mut_clear(context.current_tick()), + context.is_first_run_this_tick(), + ) + }; + let op_3v1 = op_3v1.map(|(k, ())| k); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__difference__loc_nopath_2_21_2_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_3v1__difference__loc_nopath_2_21_2_26(op_3v1) + }; + let op_16v1 = hydroflow::pusherator::map::Map::new( + |row: (_,)| ((), ((row.0),)), + hoff_9v3_send, + ); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_1_0_1_0< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_16v1__map__loc_nopath_1_0_1_0(op_16v1) + }; + let op_4v1 = hydroflow::pusherator::tee::Tee::new( + op_16v1, + hoff_8v3_send, + ); + let op_4v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_4v1__tee__loc_nopath_2_21_2_26< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_4v1__tee__loc_nopath_2_21_2_26(op_4v1) + }; + #[inline(always)] + fn pivot_run_sg_3v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_3v1(op_3v1, op_4v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@surface_graph.snap new file mode 100644 index 000000000000..b7c70c6bac7c --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__persist_uniqueness@surface_graph.snap @@ -0,0 +1,31 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = difference :: < 'tick , 'static > (); +4v1 = tee (); +5v1 = defer_tick (); +7v1 = unique :: < 'tick > (); +10v1 = unique :: < 'tick > (); +12v1 = source_stream (ints2); +13v1 = for_each (| v | result . send (v) . unwrap ()); +14v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +15v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +16v1 = map (| row : (_ ,) | (() , ((row . 0) ,))); +17v1 = fold_keyed :: < 'static , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; }); +18v1 = map (| (g , a) : (() , _) | (a . 0 . unwrap () . 1 ,)); + +15v1 -> 2v1; +3v1 -> 4v1; +2v1 -> 3v1; +5v1 -> 3v1; +4v1 -> 5v1; +12v1 -> 7v1; +18v1 -> 10v1; +10v1 -> 13v1; +14v1 -> 15v1; +7v1 -> 14v1; +17v1 -> 18v1; +16v1 -> 17v1; +4v1 -> 16v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@datalog_program.snap new file mode 100644 index 000000000000..bc5d98cf1a2b --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@datalog_program.snap @@ -0,0 +1,517 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| (node , data) | async_send_result (node , data))\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (async_receive_result)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| v : (_ , _ ,) | (v . 1 , (v . 0 ,)))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_async_send\",\"version\":1},{\"value\":\"result_async_send\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_12v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(async_receive_result) + }; + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_2v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints) + }; + let sg_2v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_2v1_node_10v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_12v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_12v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__source_stream__loc_nopath_4_84_4_119< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__source_stream__loc_nopath_4_84_4_119(op_12v1) + }; + let op_5v1 = op_12v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_28_3_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_28_3_65(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_25_2_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_25_2_44(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = op_2v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_14v1.map(|v: (_, _)| (v.1, (v.0,))); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_6_24_6_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_6_24_6_26(op_15v1) + }; + let op_10v1 = op_15v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_10v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__unique__loc_nopath_4_19_4_25< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__unique__loc_nopath_4_19_4_25(op_10v1) + }; + let op_11v1 = hydroflow::pusherator::for_each::ForEach::new(| + (node, data)| + async_send_result(node, data)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__for_each__loc_nopath_4_27_4_81< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_11v1__for_each__loc_nopath_4_27_4_81(op_11v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_10v1, op_11v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@surface_graph.snap new file mode 100644 index 000000000000..b87aaf28ebc6 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__send_to_node@surface_graph.snap @@ -0,0 +1,23 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (ints); +8v1 = for_each (| v | result . send (v) . unwrap ()); +10v1 = unique :: < 'tick > (); +11v1 = for_each (| (node , data) | async_send_result (node , data)); +12v1 = source_stream (async_receive_result); +13v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +14v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); +15v1 = map (| v : (_ , _ ,) | (v . 1 , (v . 0 ,))); + +7v1 -> 2v1; +12v1 -> 5v1; +5v1 -> 8v1; +10v1 -> 11v1; +15v1 -> 10v1; +14v1 -> 15v1; +13v1 -> 14v1; +2v1 -> 13v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@datalog_program.snap new file mode 100644 index 000000000000..2a3e9b6c7df4 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@datalog_program.snap @@ -0,0 +1,349 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ , _ ,) | row . 0 > row . 1 && row . 1 == row . 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_1_filter\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(input) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_9v1 = op_2v1 + .filter(|row: &(_, _)| row.0 > row.1 && row.1 == row.0); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__filter__loc_nopath_5_12_5_60< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__filter__loc_nopath_5_12_5_60(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0, row.1), ())); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_1_0_1_0(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_1_0_1_0(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_25_3_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_25_3_59(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@surface_graph.snap new file mode 100644 index 000000000000..6bdb3509821a --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__simple_filter@surface_graph.snap @@ -0,0 +1,18 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (input); +8v1 = for_each (| v | out . send (v) . unwrap ()); +9v1 = filter (| row : & (_ , _ ,) | row . 0 > row . 1 && row . 1 == row . 0); +10v1 = map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ())); +11v1 = map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,)); + +7v1 -> 2v1; +11v1 -> 5v1; +5v1 -> 8v1; +2v1 -> 9v1; +10v1 -> 11v1; +9v1 -> 10v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@datalog_program.snap new file mode 100644 index 000000000000..fd468dae3c7d --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@datalog_program.snap @@ -0,0 +1,638 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , (() , ())) | (kv . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_10v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_1v1_node_11v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in2) + }; + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_13v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_13v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_13v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_13v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_10v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__source_stream__loc_nopath_2_24_2_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__source_stream__loc_nopath_2_24_2_42(op_10v1) + }; + let op_2v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) + }; + let op_11v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__source_stream__loc_nopath_3_24_3_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__source_stream__loc_nopath_3_24_3_42(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_15v1 = op_2v1.map(|_v: (_,)| ((_v.0,), ())); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__map__loc_nopath_6_22_6_28< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__map__loc_nopath_6_22_6_28(op_15v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = op_5v1.map(|_v: (_,)| ((_v.0,), ())); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_6_30_6_36< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_6_30_6_36(op_16v1) + }; + let mut sg_1v1_node_13v1_joindata_lhs_borrow = context + .state_ref(sg_1v1_node_13v1_joindata_lhs) + .borrow_mut(); + let mut sg_1v1_node_13v1_joindata_rhs_borrow = context + .state_ref(sg_1v1_node_13v1_joindata_rhs) + .borrow_mut(); + let op_13v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_15v1, + op_16v1, + &mut *sg_1v1_node_13v1_joindata_lhs_borrow, + &mut *sg_1v1_node_13v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__join__loc_nopath_6_12_6_37< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__join__loc_nopath_6_12_6_37(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|kv: ((_,), ((), ()))| (kv.0.0,)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_6_12_6_37< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_6_12_6_37(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_17v1 = op_14v1.map(|row: (_,)| ((row.0,), ())); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__map__loc_nopath_1_0_1_0(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_1_0_1_0(op_18v1) + }; + let op_8v1 = op_18v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_4_20_4_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_4_20_4_23(op_8v1) + }; + let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__for_each__loc_nopath_4_25_4_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__for_each__loc_nopath_4_25_4_59(op_12v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_8v1, op_12v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@surface_graph.snap new file mode 100644 index 000000000000..0e3204520086 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__single_column_program@surface_graph.snap @@ -0,0 +1,28 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +10v1 = source_stream (in1); +11v1 = source_stream (in2); +12v1 = for_each (| v | out . send (v) . unwrap ()); +13v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +14v1 = map (| kv : ((_ ,) , (() , ())) | (kv . 0 . 0 ,)); +15v1 = map (| _v : (_ ,) | ((_v . 0 ,) , ())); +16v1 = map (| _v : (_ ,) | ((_v . 0 ,) , ())); +17v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +18v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); + +10v1 -> 2v1; +11v1 -> 5v1; +18v1 -> 8v1; +8v1 -> 12v1; +13v1 -> 14v1; +15v1 -> 13v1; +2v1 -> 15v1; +16v1 -> 13v1; +5v1 -> 16v1; +17v1 -> 18v1; +14v1 -> 17v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@datalog_program.snap new file mode 100644 index 000000000000..865c463c36f9 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@datalog_program.snap @@ -0,0 +1,803 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (edges)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (seed_reachable)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | reachable . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , (() , (_ ,))) | (kv . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"edges_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"seed_reachable_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"reachable_insert\",\"version\":1},{\"value\":\"reachable_insert\",\"version\":1},{\"value\":\"reachable\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_3\",\"version\":1},{\"value\":\"join_3\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let mut sg_1v1_node_10v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(edges) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_1v1_node_11v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(seed_reachable) + }; + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_15v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_15v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_15v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_15v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(hoff_6v3_recv), + var_expr!(hoff_6v3_send), + false, + move |context, var_args!(hoff_6v3_recv), var_args!(hoff_6v3_send)| { + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_10v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__source_stream__loc_nopath_2_26_2_46(op_10v1) + }; + let op_2v1 = op_10v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_11v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__source_stream__loc_nopath_3_35_3_64< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__source_stream__loc_nopath_3_35_3_64(op_11v1) + }; + let op_5v1 = op_11v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_33< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_33(op_5v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = op_5v1.map(|row: (_,)| ((row.0,), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_17v1 = hoff_6v3_recv.map(|_v: (_,)| ((_v.0,), ())); + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__map__loc_nopath_7_28_7_40< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__map__loc_nopath_7_28_7_40(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_2v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_7_42_7_53< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_7_42_7_53(op_18v1) + }; + let mut sg_1v1_node_15v1_joindata_lhs_borrow = context + .state_ref(sg_1v1_node_15v1_joindata_lhs) + .borrow_mut(); + let mut sg_1v1_node_15v1_joindata_rhs_borrow = context + .state_ref(sg_1v1_node_15v1_joindata_rhs) + .borrow_mut(); + let op_15v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_17v1, + op_18v1, + &mut *sg_1v1_node_15v1_joindata_lhs_borrow, + &mut *sg_1v1_node_15v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__join__loc_nopath_7_12_7_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__join__loc_nopath_7_12_7_54(op_15v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_16v1 = op_15v1 + .map(|kv: ((_,), ((), (_,)))| (kv.0.0, kv.1.1.0)); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__map__loc_nopath_7_12_7_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_16v1__map__loc_nopath_7_12_7_54(op_16v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = op_16v1.map(|row: (_, _)| ((row.1,), ())); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_1_0_1_0(op_19v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_20v1 = op_19v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__map__loc_nopath_1_0_1_0(op_20v1) + }; + let op_7v1 = { + #[allow(unused)] + #[inline(always)] + fn check_inputs< + A: ::std::iter::Iterator, + B: ::std::iter::Iterator, + Item, + >(a: A, b: B) -> impl ::std::iter::Iterator { + a.chain(b) + } + check_inputs(op_14v1, op_20v1) + }; + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__union__loc_nopath_4_20_4_29< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__union__loc_nopath_4_20_4_29(op_7v1) + }; + let op_8v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_4_20_4_29< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_4_20_4_29(op_8v1) + }; + let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + reachable.send(v).unwrap() + }); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__for_each__loc_nopath_4_31_4_71< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_12v1__for_each__loc_nopath_4_31_4_71(op_12v1) + }; + let op_9v1 = hydroflow::pusherator::tee::Tee::new( + op_12v1, + hoff_6v3_send, + ); + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__tee__loc_nopath_4_20_4_29< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_9v1__tee__loc_nopath_4_20_4_29(op_9v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_8v1, op_9v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@surface_graph.snap new file mode 100644 index 000000000000..676a78673c61 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__transitive_closure@surface_graph.snap @@ -0,0 +1,37 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +7v1 = union (); +8v1 = unique :: < 'tick > (); +9v1 = tee (); +10v1 = source_stream (edges); +11v1 = source_stream (seed_reachable); +12v1 = for_each (| v | reachable . send (v) . unwrap ()); +13v1 = map (| row : (_ ,) | ((row . 0 ,) , ())); +14v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); +15v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +16v1 = map (| kv : ((_ ,) , (() , (_ ,))) | (kv . 0 . 0 , kv . 1 . 1 . 0 ,)); +17v1 = map (| _v : (_ ,) | ((_v . 0 ,) , ())); +18v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +19v1 = map (| row : (_ , _ ,) | ((row . 1 ,) , ())); +20v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); + +10v1 -> 2v1; +11v1 -> 5v1; +7v1 -> 8v1; +8v1 -> 9v1; +9v1 -> 12v1; +14v1 -> 7v1; +13v1 -> 14v1; +5v1 -> 13v1; +15v1 -> 16v1; +17v1 -> 15v1; +9v1 -> 17v1; +18v1 -> 15v1; +2v1 -> 18v1; +20v1 -> 7v1; +19v1 -> 20v1; +16v1 -> 19v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@datalog_program.snap new file mode 100644 index 000000000000..2c940efb462d --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@datalog_program.snap @@ -0,0 +1,970 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in3)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ , _ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 0 . 1 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ , _ ,) | ((_v . 2 ,) , (_v . 1 , _v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ , _ ,) | ((row . 3 , row . 0 , row . 2 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_4\",\"version\":1},{\"value\":\"join_4\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let mut sg_1v1_node_13v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_1v1_node_14v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in2) + }; + let sg_1v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_1v1_node_15v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(in3) + }; + let sg_1v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_1v1_node_17v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_17v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_17v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_17v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_21v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_21v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_21v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_1v1_node_21v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_1v1_node_11v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(), + false, + move |context, var_args!(), var_args!()| { + let op_13v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_13v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__source_stream__loc_nopath_2_24_2_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__source_stream__loc_nopath_2_24_2_42(op_13v1) + }; + let op_2v1 = op_13v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) + }; + let op_14v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_14v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__source_stream__loc_nopath_3_24_3_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__source_stream__loc_nopath_3_24_3_42(op_14v1) + }; + let op_5v1 = op_14v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) + }; + let op_15v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_15v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__source_stream__loc_nopath_4_24_4_42< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_15v1__source_stream__loc_nopath_4_24_4_42(op_15v1) + }; + let op_8v1 = op_15v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_4_19_4_22< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_4_19_4_22(op_8v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = op_2v1.map(|_v: (_, _)| ((_v.1,), (_v.0,))); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_7_31_7_40< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_7_31_7_40(op_19v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_20v1 = op_5v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_7_42_7_51< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__map__loc_nopath_7_42_7_51(op_20v1) + }; + let mut sg_1v1_node_17v1_joindata_lhs_borrow = context + .state_ref(sg_1v1_node_17v1_joindata_lhs) + .borrow_mut(); + let mut sg_1v1_node_17v1_joindata_rhs_borrow = context + .state_ref(sg_1v1_node_17v1_joindata_rhs) + .borrow_mut(); + let op_17v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_19v1, + op_20v1, + &mut *sg_1v1_node_17v1_joindata_lhs_borrow, + &mut *sg_1v1_node_17v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__join__loc_nopath_7_12_7_63< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__join__loc_nopath_7_12_7_63(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1 + .map(|kv: ((_,), ((_,), (_,)))| (kv.0.0, kv.1.0.0, kv.1.1.0)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_7_12_7_63< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_7_12_7_63(op_18v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_23v1 = op_18v1.map(|_v: (_, _, _)| ((_v.2,), (_v.1, _v.0))); + let op_23v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_23v1__map__loc_nopath_7_31_7_51< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_23v1__map__loc_nopath_7_31_7_51(op_23v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_24v1 = op_8v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_24v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_24v1__map__loc_nopath_7_53_7_62< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_24v1__map__loc_nopath_7_53_7_62(op_24v1) + }; + let mut sg_1v1_node_21v1_joindata_lhs_borrow = context + .state_ref(sg_1v1_node_21v1_joindata_lhs) + .borrow_mut(); + let mut sg_1v1_node_21v1_joindata_rhs_borrow = context + .state_ref(sg_1v1_node_21v1_joindata_rhs) + .borrow_mut(); + let op_21v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_23v1, + op_24v1, + &mut *sg_1v1_node_21v1_joindata_lhs_borrow, + &mut *sg_1v1_node_21v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_21v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_21v1__join__loc_nopath_7_12_7_63< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_21v1__join__loc_nopath_7_12_7_63(op_21v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_22v1 = op_21v1 + .map(|kv: ((_,), ((_, _), (_,)))| ( + kv.0.0, + kv.1.0.0, + kv.1.0.1, + kv.1.1.0, + )); + let op_22v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_22v1__map__loc_nopath_7_12_7_63< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_22v1__map__loc_nopath_7_12_7_63(op_22v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_25v1 = op_22v1 + .map(|row: (_, _, _, _)| ((row.3, row.0, row.2, row.1), ())); + let op_25v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_25v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_25v1__map__loc_nopath_1_0_1_0(op_25v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_26v1 = op_25v1 + .map(|(g, a): ((_, _, _, _), _)| (g.0, g.1, g.2, g.3)); + let op_26v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_26v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_26v1__map__loc_nopath_1_0_1_0(op_26v1) + }; + let op_11v1 = op_26v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_11v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__unique__loc_nopath_5_20_5_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__unique__loc_nopath_5_20_5_23(op_11v1) + }; + let op_16v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__for_each__loc_nopath_5_25_5_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_16v1__for_each__loc_nopath_5_25_5_59(op_16v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_11v1, op_16v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@surface_graph.snap new file mode 100644 index 000000000000..a83e722e9ee4 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__triple_relation_join@surface_graph.snap @@ -0,0 +1,40 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +5v1 = unique :: < 'tick > (); +8v1 = unique :: < 'tick > (); +11v1 = unique :: < 'tick > (); +13v1 = source_stream (in1); +14v1 = source_stream (in2); +15v1 = source_stream (in3); +16v1 = for_each (| v | out . send (v) . unwrap ()); +17v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +18v1 = map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,)); +19v1 = map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,))); +20v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +21v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +22v1 = map (| kv : ((_ ,) , ((_ , _ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 0 . 1 , kv . 1 . 1 . 0 ,)); +23v1 = map (| _v : (_ , _ , _ ,) | ((_v . 2 ,) , (_v . 1 , _v . 0 ,))); +24v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +25v1 = map (| row : (_ , _ , _ , _ ,) | ((row . 3 , row . 0 , row . 2 , row . 1 ,) , ())); +26v1 = map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,)); + +13v1 -> 2v1; +14v1 -> 5v1; +15v1 -> 8v1; +26v1 -> 11v1; +11v1 -> 16v1; +17v1 -> 18v1; +19v1 -> 17v1; +2v1 -> 19v1; +20v1 -> 17v1; +5v1 -> 20v1; +21v1 -> 22v1; +23v1 -> 21v1; +18v1 -> 23v1; +24v1 -> 21v1; +8v1 -> 24v1; +25v1 -> 26v1; +22v1 -> 25v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@datalog_program.snap new file mode 100644 index 000000000000..52e622554c2b --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@datalog_program.snap @@ -0,0 +1,601 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":3},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":\"input\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_4v3_send, hoff_4v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(4v3)"); + let (hoff_6v3_send, hoff_6v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(6v3)"); + let mut sg_1v1_node_7v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(input) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_2v1_node_9v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_2v1_node_9v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_2v1_node_9v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_2v1_node_9v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_2v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(hoff_4v3_send, hoff_6v3_send), + false, + move |context, var_args!(), var_args!(hoff_4v3_send, hoff_6v3_send)| { + let hoff_4v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_4v3_send.give(Some(v)); + }); + let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_6v3_send.give(Some(v)); + }); + let op_7v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_7v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_7v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_7v1__source_stream__loc_nopath_2_26_2_46(op_7v1) + }; + let op_2v1 = op_7v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + hoff_6v3_send, + hoff_4v3_send, + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_2_19_2_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_2_19_2_24(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(hoff_4v3_recv, hoff_6v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_4v3_recv, hoff_6v3_recv), var_args!()| { + let mut hoff_4v3_recv = hoff_4v3_recv.borrow_mut_swap(); + let hoff_4v3_recv = hoff_4v3_recv.drain(..); + let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); + let hoff_6v3_recv = hoff_6v3_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_11v1 = hoff_6v3_recv.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__map__loc_nopath_5_22_5_33< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__map__loc_nopath_5_22_5_33(op_11v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_12v1 = hoff_4v3_recv.map(|_v: (_, _)| ((_v.1,), (_v.0,))); + let op_12v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_12v1__map__loc_nopath_5_35_5_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_12v1__map__loc_nopath_5_35_5_46(op_12v1) + }; + let mut sg_2v1_node_9v1_joindata_lhs_borrow = context + .state_ref(sg_2v1_node_9v1_joindata_lhs) + .borrow_mut(); + let mut sg_2v1_node_9v1_joindata_rhs_borrow = context + .state_ref(sg_2v1_node_9v1_joindata_rhs) + .borrow_mut(); + let op_9v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_11v1, + op_12v1, + &mut *sg_2v1_node_9v1_joindata_lhs_borrow, + &mut *sg_2v1_node_9v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_9v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_9v1__join__loc_nopath_5_12_5_47< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_9v1__join__loc_nopath_5_12_5_47(op_9v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_10v1 = op_9v1 + .map(|kv: ((_,), ((_,), (_,)))| (kv.0.0, kv.1.0.0, kv.1.1.0)); + let op_10v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_10v1__map__loc_nopath_5_12_5_47< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_10v1__map__loc_nopath_5_12_5_47(op_10v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_13v1 = op_10v1.map(|row: (_, _, _)| ((row.0,), ())); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__map__loc_nopath_1_0_1_0(op_13v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__map__loc_nopath_1_0_1_0(op_14v1) + }; + let op_5v1 = op_14v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_20_3_23< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) + }; + let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + out.send(v).unwrap() + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__for_each__loc_nopath_3_25_3_59< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_8v1__for_each__loc_nopath_3_25_3_59(op_8v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_5v1, op_8v1); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@surface_graph.snap new file mode 100644 index 000000000000..8046348f3509 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_fields@surface_graph.snap @@ -0,0 +1,27 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +5v1 = unique :: < 'tick > (); +7v1 = source_stream (input); +8v1 = for_each (| v | out . send (v) . unwrap ()); +9v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +10v1 = map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,)); +11v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +12v1 = map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,))); +13v1 = map (| row : (_ , _ , _ ,) | ((row . 0 ,) , ())); +14v1 = map (| (g , a) : ((_ ,) , _) | (g . 0 ,)); + +7v1 -> 2v1; +2v1 -> 3v1; +14v1 -> 5v1; +5v1 -> 8v1; +9v1 -> 10v1; +11v1 -> 9v1; +3v1 -> 11v1; +12v1 -> 9v1; +3v1 -> 12v1; +13v1 -> 14v1; +10v1 -> 13v1; diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@datalog_program.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@datalog_program.snap new file mode 100644 index 000000000000..59672f4d9531 --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@datalog_program.snap @@ -0,0 +1,1434 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: "prettyplease :: unparse(& wrapped)" +--- +fn main() { + { + #[allow(unused_qualifications)] + { + use hydroflow::{var_expr, var_args}; + let mut df = hydroflow::scheduled::graph::Dfir::new(); + df.__assign_meta_graph( + "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , ())) | (kv . 0 . 0 , kv . 1 . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , (() ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + 1) } else { Some (1) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () ,))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , ())) | (kv . 0 . 0 , kv . 1 . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , ((row . 0) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":6,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":30,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":3},{\"idx\":19,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":29,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":3},{\"idx\":27,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":12,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":7,\"version\":3},{\"idx\":26,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":10,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":7,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":27,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":1},{\"idx\":4,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":3},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":29,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":28,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":6,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":29,\"version\":1},{\"idx\":30,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":27,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":25,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":\"ints2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_5\",\"version\":1},{\"value\":\"join_5\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", + ); + df.__assign_diagnostics("[]"); + let (hoff_1v3_send, hoff_1v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(1v3)"); + let (hoff_4v3_send, hoff_4v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(4v3)"); + let (hoff_7v3_send, hoff_7v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(7v3)"); + let (hoff_9v3_send, hoff_9v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(9v3)"); + let (hoff_10v3_send, hoff_10v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(10v3)"); + let (hoff_12v3_send, hoff_12v3_recv) = df + .make_edge::< + _, + hydroflow::scheduled::handoff::VecHandoff<_>, + >("handoff GraphNodeId(12v3)"); + let mut sg_1v1_node_13v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints1) + }; + let sg_1v1_node_2v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let mut sg_2v1_node_14v1_stream = { + #[inline(always)] + fn check_stream< + Stream: hydroflow::futures::stream::Stream + + ::std::marker::Unpin, + Item, + >( + stream: Stream, + ) -> impl hydroflow::futures::stream::Stream< + Item = Item, + > + ::std::marker::Unpin { + stream + } + check_stream(ints2) + }; + let sg_2v1_node_5v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_3v1_node_22v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + ), + ); + let sg_3v1_node_8v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_4v1_node_29v1_groupbydata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + ), + ); + let sg_4v1_node_11v1_uniquedata = df + .add_state( + ::std::cell::RefCell::new( + hydroflow::util::monotonic_map::MonotonicMap::< + _, + hydroflow::rustc_hash::FxHashSet<_>, + >::default(), + ), + ); + let sg_5v1_node_17v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_5v1_node_17v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_5v1_node_17v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_5v1_node_17v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_6v1_node_24v1_joindata_lhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_6v1_node_24v1_joindata_lhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + let sg_6v1_node_24v1_joindata_rhs = df + .add_state( + ::std::cell::RefCell::new( + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), + ), + ); + df.set_state_tick_hook( + sg_6v1_node_24v1_joindata_rhs, + |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(1v1)", + 0, + var_expr!(), + var_expr!(hoff_7v3_send, hoff_12v3_send), + false, + move |context, var_args!(), var_args!(hoff_7v3_send, hoff_12v3_send)| { + let hoff_7v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_7v3_send.give(Some(v)); + }); + let hoff_12v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_12v3_send.give(Some(v)); + }); + let op_13v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_1v1_node_13v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_13v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_13v1__source_stream__loc_nopath_2_26_2_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_13v1__source_stream__loc_nopath_2_26_2_46(op_13v1) + }; + let op_2v1 = op_13v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_1v1_node_2v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_2v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_2v1__unique__loc_nopath_2_19_2_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) + }; + let op_3v1 = hydroflow::pusherator::tee::Tee::new( + hoff_12v3_send, + hoff_7v3_send, + ); + let op_3v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_3v1__tee__loc_nopath_2_19_2_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_3v1__tee__loc_nopath_2_19_2_24(op_3v1) + }; + #[inline(always)] + fn pivot_run_sg_1v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_1v1(op_2v1, op_3v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(2v1)", + 0, + var_expr!(), + var_expr!(hoff_4v3_send, hoff_9v3_send), + false, + move |context, var_args!(), var_args!(hoff_4v3_send, hoff_9v3_send)| { + let hoff_4v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_4v3_send.give(Some(v)); + }); + let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_9v3_send.give(Some(v)); + }); + let op_14v1 = std::iter::from_fn(|| { + match hydroflow::futures::stream::Stream::poll_next( + ::std::pin::Pin::new(&mut sg_2v1_node_14v1_stream), + &mut std::task::Context::from_waker(&context.waker()), + ) { + std::task::Poll::Ready(maybe) => maybe, + std::task::Poll::Pending => None, + } + }); + let op_14v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_14v1__source_stream__loc_nopath_3_26_3_46< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_14v1__source_stream__loc_nopath_3_26_3_46(op_14v1) + }; + let op_5v1 = op_14v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_2v1_node_5v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_5v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_5v1__unique__loc_nopath_3_19_3_24< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_5v1__unique__loc_nopath_3_19_3_24(op_5v1) + }; + let op_6v1 = hydroflow::pusherator::tee::Tee::new( + hoff_9v3_send, + hoff_4v3_send, + ); + let op_6v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_6v1__tee__loc_nopath_3_19_3_24< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_6v1__tee__loc_nopath_3_19_3_24(op_6v1) + }; + #[inline(always)] + fn pivot_run_sg_2v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_2v1(op_5v1, op_6v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(3v1)", + 1, + var_expr!(hoff_10v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_10v3_recv), var_args!()| { + let mut hoff_10v3_recv = hoff_10v3_recv.borrow_mut_swap(); + let hoff_10v3_recv = hoff_10v3_recv.drain(..); + let mut sg_3v1_node_22v1_hashtable = context + .state_ref(sg_3v1_node_22v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_10v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_3v1_node_22v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some(prev + 1) + } else { + Some(1) + }; + }, + ); + } + } + let op_22v1 = sg_3v1_node_22v1_hashtable.drain(); + let op_22v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_22v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_22v1__fold_keyed__loc_nopath_1_0_1_0(op_22v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_23v1 = op_22v1.map(|(g, a): ((), _)| (a.0.unwrap(),)); + let op_23v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_23v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_23v1__map__loc_nopath_1_0_1_0(op_23v1) + }; + let op_8v1 = op_23v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_3v1_node_8v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_8v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_8v1__unique__loc_nopath_5_20_5_26< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_8v1__unique__loc_nopath_5_20_5_26(op_8v1) + }; + let op_15v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result.send(v).unwrap() + }); + let op_15v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_15v1__for_each__loc_nopath_5_28_5_65< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_15v1__for_each__loc_nopath_5_28_5_65(op_15v1) + }; + #[inline(always)] + fn pivot_run_sg_3v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_3v1(op_8v1, op_15v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(4v1)", + 1, + var_expr!(hoff_1v3_recv), + var_expr!(), + false, + move |context, var_args!(hoff_1v3_recv), var_args!()| { + let mut hoff_1v3_recv = hoff_1v3_recv.borrow_mut_swap(); + let hoff_1v3_recv = hoff_1v3_recv.drain(..); + let mut sg_4v1_node_29v1_hashtable = context + .state_ref(sg_4v1_node_29v1_groupbydata) + .borrow_mut(); + { + #[inline(always)] + fn check_input( + iter: Iter, + ) -> impl ::std::iter::Iterator + where + Iter: std::iter::Iterator, + A: ::std::clone::Clone, + B: ::std::clone::Clone, + { + iter + } + /// A: accumulator type + /// T: iterator item type + /// O: output type + #[inline(always)] + fn call_comb_type( + a: &mut A, + t: T, + f: impl Fn(&mut A, T) -> O, + ) -> O { + (f)(a, t) + } + for kv in check_input(hoff_1v3_recv) { + #[allow(unknown_lints, clippy::unwrap_or_default)] + let entry = sg_4v1_node_29v1_hashtable + .entry(kv.0) + .or_insert_with(|| (None,)); + #[allow(clippy::redundant_closure_call)] + call_comb_type( + entry, + kv.1, + |old: &mut (Option<_>,), val: (_,)| { + old.0 = if let Some(prev) = old.0.take() { + Some({ + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; + if set.insert(val.0) { + (set, prev.1 + 1) + } else { + (set, prev.1) + } + }) + } else { + Some({ + let mut set = dfir_rs::rustc_hash::FxHashSet::< + _, + >::default(); + set.insert(val.0); + (set, 1) + }) + }; + }, + ); + } + } + let op_29v1 = sg_4v1_node_29v1_hashtable.drain(); + let op_29v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_29v1__fold_keyed__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_29v1__fold_keyed__loc_nopath_1_0_1_0(op_29v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_30v1 = op_29v1.map(|(g, a): ((), _)| (a.0.unwrap().1,)); + let op_30v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_30v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_30v1__map__loc_nopath_1_0_1_0(op_30v1) + }; + let op_11v1 = op_30v1 + .filter(|item| { + let mut borrow = context + .state_ref(sg_4v1_node_11v1_uniquedata) + .borrow_mut(); + let set = borrow + .get_mut_clear(( + context.current_tick(), + context.current_stratum(), + )); + if !set.contains(item) { + set.insert(::std::clone::Clone::clone(item)); + true + } else { + false + } + }); + let op_11v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_11v1__unique__loc_nopath_6_20_6_27< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_11v1__unique__loc_nopath_6_20_6_27(op_11v1) + }; + let op_16v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + result2.send(v).unwrap() + }); + let op_16v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_16v1__for_each__loc_nopath_6_29_6_67< + Item, + Input: hydroflow::pusherator::Pusherator, + >( + input: Input, + ) -> impl hydroflow::pusherator::Pusherator { + #[repr(transparent)] + struct Push< + Item, + Input: hydroflow::pusherator::Pusherator, + > { + inner: Input, + } + impl< + Item, + Input: hydroflow::pusherator::Pusherator, + > hydroflow::pusherator::Pusherator for Push { + type Item = Item; + #[inline(always)] + fn give(&mut self, item: Self::Item) { + self.inner.give(item) + } + } + Push { inner: input } + } + op_16v1__for_each__loc_nopath_6_29_6_67(op_16v1) + }; + #[inline(always)] + fn pivot_run_sg_4v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_4v1(op_11v1, op_16v1); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(5v1)", + 0, + var_expr!(hoff_9v3_recv, hoff_12v3_recv), + var_expr!(hoff_10v3_send), + false, + move | + context, + var_args!(hoff_9v3_recv, hoff_12v3_recv), + var_args!(hoff_10v3_send)| + { + let mut hoff_9v3_recv = hoff_9v3_recv.borrow_mut_swap(); + let hoff_9v3_recv = hoff_9v3_recv.drain(..); + let mut hoff_12v3_recv = hoff_12v3_recv.borrow_mut_swap(); + let hoff_12v3_recv = hoff_12v3_recv.drain(..); + let hoff_10v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_10v3_send.give(Some(v)); + }); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_19v1 = hoff_12v3_recv.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_19v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_19v1__map__loc_nopath_8_32_8_43< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_19v1__map__loc_nopath_8_32_8_43(op_19v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_20v1 = hoff_9v3_recv.map(|_v: (_,)| ((_v.0,), ())); + let op_20v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_20v1__map__loc_nopath_8_45_8_53< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_20v1__map__loc_nopath_8_45_8_53(op_20v1) + }; + let mut sg_5v1_node_17v1_joindata_lhs_borrow = context + .state_ref(sg_5v1_node_17v1_joindata_lhs) + .borrow_mut(); + let mut sg_5v1_node_17v1_joindata_rhs_borrow = context + .state_ref(sg_5v1_node_17v1_joindata_rhs) + .borrow_mut(); + let op_17v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_19v1, + op_20v1, + &mut *sg_5v1_node_17v1_joindata_lhs_borrow, + &mut *sg_5v1_node_17v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_17v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_17v1__join__loc_nopath_8_12_8_53< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_17v1__join__loc_nopath_8_12_8_53(op_17v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_18v1 = op_17v1 + .map(|kv: ((_,), ((_,), ()))| (kv.0.0, kv.1.0.0)); + let op_18v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_18v1__map__loc_nopath_8_12_8_53< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_18v1__map__loc_nopath_8_12_8_53(op_18v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_21v1 = op_18v1.map(|row: (_, _)| ((), ((),))); + let op_21v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_21v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_21v1__map__loc_nopath_1_0_1_0(op_21v1) + }; + #[inline(always)] + fn pivot_run_sg_5v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_5v1(op_21v1, hoff_10v3_send); + }, + ); + df.add_subgraph_stratified( + "Subgraph GraphSubgraphId(6v1)", + 0, + var_expr!(hoff_4v3_recv, hoff_7v3_recv), + var_expr!(hoff_1v3_send), + false, + move | + context, + var_args!(hoff_4v3_recv, hoff_7v3_recv), + var_args!(hoff_1v3_send)| + { + let mut hoff_4v3_recv = hoff_4v3_recv.borrow_mut_swap(); + let hoff_4v3_recv = hoff_4v3_recv.drain(..); + let mut hoff_7v3_recv = hoff_7v3_recv.borrow_mut_swap(); + let hoff_7v3_recv = hoff_7v3_recv.drain(..); + let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + v| + { + hoff_1v3_send.give(Some(v)); + }); + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_26v1 = hoff_7v3_recv.map(|_v: (_, _)| ((_v.0,), (_v.1,))); + let op_26v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_26v1__map__loc_nopath_9_33_9_44< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_26v1__map__loc_nopath_9_33_9_44(op_26v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_27v1 = hoff_4v3_recv.map(|_v: (_,)| ((_v.0,), ())); + let op_27v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_27v1__map__loc_nopath_9_46_9_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_27v1__map__loc_nopath_9_46_9_54(op_27v1) + }; + let mut sg_6v1_node_24v1_joindata_lhs_borrow = context + .state_ref(sg_6v1_node_24v1_joindata_lhs) + .borrow_mut(); + let mut sg_6v1_node_24v1_joindata_rhs_borrow = context + .state_ref(sg_6v1_node_24v1_joindata_rhs) + .borrow_mut(); + let op_24v1 = { + #[inline(always)] + fn check_inputs<'a, K, I1, V1, I2, V2>( + lhs: I1, + rhs: I2, + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V1, + V2, + >, + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< + K, + V2, + V1, + >, + is_new_tick: bool, + ) -> impl 'a + Iterator + where + K: Eq + std::hash::Hash + Clone, + V1: Clone, + V2: Clone, + I1: 'a + Iterator, + I2: 'a + Iterator, + { + hydroflow::compiled::pull::symmetric_hash_join_into_iter( + lhs, + rhs, + lhs_state, + rhs_state, + is_new_tick, + ) + } + check_inputs( + op_26v1, + op_27v1, + &mut *sg_6v1_node_24v1_joindata_lhs_borrow, + &mut *sg_6v1_node_24v1_joindata_rhs_borrow, + context.is_first_run_this_tick(), + ) + }; + let op_24v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_24v1__join__loc_nopath_9_12_9_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_24v1__join__loc_nopath_9_12_9_54(op_24v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_25v1 = op_24v1 + .map(|kv: ((_,), ((_,), ()))| (kv.0.0, kv.1.0.0)); + let op_25v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_25v1__map__loc_nopath_9_12_9_54< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_25v1__map__loc_nopath_9_12_9_54(op_25v1) + }; + #[allow( + clippy::map_clone, + reason = "dfir has no explicit `cloned`/`copied` operator" + )] + let op_28v1 = op_25v1.map(|row: (_, _)| ((), ((row.0),))); + let op_28v1 = { + #[allow(non_snake_case)] + #[inline(always)] + pub fn op_28v1__map__loc_nopath_1_0_1_0< + Item, + Input: ::std::iter::Iterator, + >(input: Input) -> impl ::std::iter::Iterator { + #[repr(transparent)] + struct Pull< + Item, + Input: ::std::iter::Iterator, + > { + inner: Input, + } + impl< + Item, + Input: ::std::iter::Iterator, + > Iterator for Pull { + type Item = Item; + #[inline(always)] + fn next(&mut self) -> Option { + self.inner.next() + } + #[inline(always)] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } + } + Pull { inner: input } + } + op_28v1__map__loc_nopath_1_0_1_0(op_28v1) + }; + #[inline(always)] + fn pivot_run_sg_6v1< + Pull: ::std::iter::Iterator, + Push: hydroflow::pusherator::Pusherator, + Item, + >(pull: Pull, push: Push) { + hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + } + pivot_run_sg_6v1(op_28v1, hoff_1v3_send); + }, + ); + df + } + } +} diff --git a/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@surface_graph.snap b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@surface_graph.snap new file mode 100644 index 000000000000..8db20edc77ab --- /dev/null +++ b/dfir_datalog_core/src/snapshots/dfir_datalog_core__tests__wildcard_join_count@surface_graph.snap @@ -0,0 +1,53 @@ +--- +source: dfir_datalog_core/src/lib.rs +expression: flat_graph_ref.surface_syntax_string() +--- +2v1 = unique :: < 'tick > (); +3v1 = tee (); +5v1 = unique :: < 'tick > (); +6v1 = tee (); +8v1 = unique :: < 'tick > (); +11v1 = unique :: < 'tick > (); +13v1 = source_stream (ints1); +14v1 = source_stream (ints2); +15v1 = for_each (| v | result . send (v) . unwrap ()); +16v1 = for_each (| v | result2 . send (v) . unwrap ()); +17v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +18v1 = map (| kv : ((_ ,) , ((_ ,) , ())) | (kv . 0 . 0 , kv . 1 . 0 . 0 ,)); +19v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +20v1 = map (| _v : (_ ,) | ((_v . 0 ,) , ())); +21v1 = map (| row : (_ , _ ,) | (() , (() ,))); +22v1 = fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + 1) } else { Some (1) } ; }); +23v1 = map (| (g , a) : (() , _) | (a . 0 . unwrap () ,)); +24v1 = join :: < 'tick , 'tick , dfir_rs :: compiled :: pull :: HalfMultisetJoinState > (); +25v1 = map (| kv : ((_ ,) , ((_ ,) , ())) | (kv . 0 . 0 , kv . 1 . 0 . 0 ,)); +26v1 = map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,))); +27v1 = map (| _v : (_ ,) | ((_v . 0 ,) , ())); +28v1 = map (| row : (_ , _ ,) | (() , ((row . 0) ,))); +29v1 = fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (dfir_rs :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : dfir_rs :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = dfir_rs :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; }); +30v1 = map (| (g , a) : (() , _) | (a . 0 . unwrap () . 1 ,)); + +13v1 -> 2v1; +2v1 -> 3v1; +14v1 -> 5v1; +5v1 -> 6v1; +23v1 -> 8v1; +30v1 -> 11v1; +8v1 -> 15v1; +11v1 -> 16v1; +17v1 -> 18v1; +19v1 -> 17v1; +3v1 -> 19v1; +20v1 -> 17v1; +6v1 -> 20v1; +22v1 -> 23v1; +21v1 -> 22v1; +18v1 -> 21v1; +24v1 -> 25v1; +26v1 -> 24v1; +3v1 -> 26v1; +27v1 -> 24v1; +6v1 -> 27v1; +29v1 -> 30v1; +28v1 -> 29v1; +25v1 -> 28v1; diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap similarity index 90% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap index 7cae1cac97e2..2b3c9204830a 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , ((row . 0) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (hydroflow :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : hydroflow :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = hydroflow :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () . 1 , g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + val . 0) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,))\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Operator\":\"identity ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":24,\"version\":1}],\"version\":5},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":14,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":7,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":3},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":2,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":false,\"version\":1}]}", ); @@ -15,42 +15,42 @@ fn main() { let (hoff_1v3_send, hoff_1v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(1v3)"); let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_7v3_send, hoff_7v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(7v3)"); let (hoff_9v3_send, hoff_9v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(9v3)"); let (hoff_23v1_send, hoff_23v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(23v1)"); let (hoff_25v1_send, hoff_25v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(25v1)"); let mut sg_5v1_node_10v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -60,46 +60,46 @@ fn main() { let sg_5v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_14v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_2v1_node_21v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); let sg_2v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_3v1_node_17v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); df.add_subgraph_stratified( @@ -113,23 +113,23 @@ fn main() { var_args!(), var_args!(hoff_1v3_send, hoff_9v3_send, hoff_23v1_send)| { - let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_1v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_1v3_send.give(Some(v)); }); - let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_9v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_9v3_send.give(Some(v)); }); - let hoff_23v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_23v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_23v1_send.give(Some(v)); }); let op_10v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_5v1_node_10v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -218,7 +218,7 @@ fn main() { } op_2v1__unique__loc_nopath_3_19_3_23(op_2v1) }; - let op_20v1 = hydroflow::pusherator::map::Map::new( + let op_20v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.1,), (row.0,)), hoff_23v1_send, ); @@ -227,21 +227,21 @@ fn main() { #[inline(always)] pub fn op_20v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -252,7 +252,7 @@ fn main() { } op_20v1__map__loc_nopath_1_0_1_0(op_20v1) }; - let op_16v1 = hydroflow::pusherator::map::Map::new( + let op_16v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.1,), (row.0,)), hoff_1v3_send, ); @@ -261,21 +261,21 @@ fn main() { #[inline(always)] pub fn op_16v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -286,7 +286,7 @@ fn main() { } op_16v1__map__loc_nopath_1_0_1_0(op_16v1) }; - let op_13v1 = hydroflow::pusherator::map::Map::new( + let op_13v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.1,), ((row.0),)), hoff_9v3_send, ); @@ -295,21 +295,21 @@ fn main() { #[inline(always)] pub fn op_13v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -320,30 +320,30 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( op_13v1, - hydroflow::pusherator::tee::Tee::new(op_16v1, op_20v1), + dfir_rs::pusherator::tee::Tee::new(op_16v1, op_20v1), ); let op_3v1 = { #[allow(non_snake_case)] #[inline(always)] pub fn op_3v1__tee__loc_nopath_3_19_3_23< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -357,10 +357,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_5v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_5v1(op_2v1, op_3v1); }, @@ -414,8 +414,8 @@ fn main() { |old: &mut (Option<_>,), val: (_,)| { old.0 = if let Some(prev) = old.0.take() { Some({ - let prev: (hydroflow::rustc_hash::FxHashSet<_>, _) = prev; - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev.0; + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; if set.insert(val.0) { (set, prev.1 + 1) } else { @@ -424,7 +424,7 @@ fn main() { }) } else { Some({ - let mut set = hydroflow::rustc_hash::FxHashSet::< + let mut set = dfir_rs::rustc_hash::FxHashSet::< _, >::default(); set.insert(val.0); @@ -638,7 +638,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_11v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_11v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_11v1 = { @@ -646,21 +646,21 @@ fn main() { #[inline(always)] pub fn op_11v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -674,10 +674,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_11v1); }, @@ -855,7 +855,7 @@ fn main() { } op_8v1__unique__loc_nopath_5_20_5_27(op_8v1) }; - let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_12v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result2.send(v).unwrap() }); let op_12v1 = { @@ -863,21 +863,21 @@ fn main() { #[inline(always)] pub fn op_12v1__for_each__loc_nopath_5_29_5_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -891,10 +891,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_8v1, op_12v1); }, @@ -908,7 +908,7 @@ fn main() { move |context, var_args!(hoff_1v3_recv), var_args!(hoff_7v3_send)| { let mut hoff_1v3_recv = hoff_1v3_recv.borrow_mut_swap(); let hoff_1v3_recv = hoff_1v3_recv.drain(..); - let hoff_7v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_7v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_7v3_send.give(Some(v)); @@ -994,10 +994,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_3v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_3v1(op_17v1, hoff_7v3_send); }, @@ -1011,7 +1011,7 @@ fn main() { move |context, var_args!(hoff_7v3_recv), var_args!(hoff_6v3_send)| { let mut hoff_7v3_recv = hoff_7v3_recv.borrow_mut_swap(); let hoff_7v3_recv = hoff_7v3_recv.drain(..); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); @@ -1057,10 +1057,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_4v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_4v1(op_18v1, hoff_6v3_send); }, @@ -1074,7 +1074,7 @@ fn main() { move |context, var_args!(hoff_6v3_recv), var_args!(hoff_25v1_send)| { let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); let hoff_6v3_recv = hoff_6v3_recv.drain(..); - let hoff_25v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_25v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_25v1_send.give(Some(v)); @@ -1122,10 +1122,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_6v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_6v1(op_24v1, hoff_25v1_send); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap similarity index 97% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap index 4cf2329abb9c..552fa38015a1 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap similarity index 92% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap index 244fe6fcb3b6..c02c6004342c 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 % 2 ,) , (row . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + val . 0) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 , a . 0 . unwrap () ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,17 +15,17 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let mut sg_2v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -35,24 +35,24 @@ fn main() { let sg_2v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_10v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -63,13 +63,13 @@ fn main() { var_expr!(hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_6v3_send)| { - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -198,10 +198,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_9v1, hoff_6v3_send); }, @@ -379,7 +379,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -387,21 +387,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -415,10 +415,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap index a3c6b06e30cd..b98a7c2a52ed 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap index 5c182bc0857a..54f115e94c25 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints_1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints_2)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints_3)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"anti_join ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , (_ , _ ,)) | (kv . 0 . 0 , kv . 1 . 0 , kv . 1 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ , _ ,) | ((_v . 0 ,) , (_v . 1 , _v . 2 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (_v . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ ,) | ((row . 1 , row . 2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":5},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":3},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":12,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_4\",\"version\":1},{\"value\":\"join_4\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,27 +15,27 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_9v3_send, hoff_9v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(9v3)"); let (hoff_12v3_send, hoff_12v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(12v3)"); let mut sg_2v1_node_15v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -45,21 +45,21 @@ fn main() { let sg_2v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_3v1_node_13v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -69,12 +69,12 @@ fn main() { let mut sg_4v1_node_14v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -84,65 +84,65 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_17v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_17v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_17v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_17v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_21v1_antijoindata_neg = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_21v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_11v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -153,13 +153,13 @@ fn main() { var_expr!(hoff_12v3_send), false, move |context, var_args!(), var_args!(hoff_12v3_send)| { - let hoff_12v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_12v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_12v3_send.give(Some(v)); }); let op_15v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_15v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -288,10 +288,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_24v1, hoff_12v3_send); }, @@ -303,13 +303,13 @@ fn main() { var_expr!(hoff_9v3_send), false, move |context, var_args!(), var_args!(hoff_9v3_send)| { - let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_9v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_9v3_send.give(Some(v)); }); let op_13v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_3v1_node_13v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -352,10 +352,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_3v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_3v1(op_13v1, hoff_9v3_send); }, @@ -367,13 +367,13 @@ fn main() { var_expr!(hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_6v3_send)| { - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_14v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_4v1_node_14v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -416,10 +416,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_4v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_4v1(op_14v1, hoff_6v3_send); }, @@ -624,12 +624,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -643,7 +643,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -778,8 +778,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -789,7 +789,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -999,7 +999,7 @@ fn main() { } op_11v1__unique__loc_nopath_5_20_5_26(op_11v1) }; - let op_16v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_16v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_16v1 = { @@ -1007,21 +1007,21 @@ fn main() { #[inline(always)] pub fn op_16v1__for_each__loc_nopath_5_28_5_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1035,10 +1035,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_11v1, op_16v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap similarity index 96% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap index d28cc2d80452..e689194d8f9b 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap index 90dae240e971..fac2d144ef30 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : (() , ((_ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , ((row . 0 , row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let mut set : hydroflow :: rustc_hash :: FxHashSet < _ > = prev ; set . insert (val . 0) ; set }) } else { Some ({ let mut set = hydroflow :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; set }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () . into_iter () . collect :: < Vec < _ > > () ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,17 +15,17 @@ fn main() { let (hoff_9v3_send, hoff_9v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(9v3)"); let mut sg_2v1_node_10v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -35,21 +35,21 @@ fn main() { let sg_2v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_2v1_node_11v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -59,44 +59,44 @@ fn main() { let sg_2v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_2v1_node_13v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_2v1_node_13v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_2v1_node_13v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_2v1_node_13v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_18v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), ), ); let sg_1v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -107,13 +107,13 @@ fn main() { var_expr!(hoff_9v3_send), false, move |context, var_args!(), var_args!(hoff_9v3_send)| { - let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_9v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_9v3_send.give(Some(v)); }); let op_10v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_10v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -203,7 +203,7 @@ fn main() { op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; let op_11v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_11v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -377,12 +377,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -396,7 +396,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -522,10 +522,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_17v1, hoff_9v3_send); }, @@ -577,13 +577,13 @@ fn main() { |old: &mut (Option<_>,), val: (_,)| { old.0 = if let Some(prev) = old.0.take() { Some({ - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev; set.insert(val.0); set }) } else { Some({ - let mut set = hydroflow::rustc_hash::FxHashSet::< + let mut set = dfir_rs::rustc_hash::FxHashSet::< _, >::default(); set.insert(val.0); @@ -716,7 +716,7 @@ fn main() { } op_8v1__unique__loc_nopath_5_20_5_26(op_8v1) }; - let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_12v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_12v1 = { @@ -724,21 +724,21 @@ fn main() { #[inline(always)] pub fn op_12v1__for_each__loc_nopath_5_28_5_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -752,10 +752,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_8v1, op_12v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap similarity index 96% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap index 67ca0633179c..2d97f21c1369 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap index a7191e5f2d54..3d6a1f5c7d1d 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -303,7 +303,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -311,21 +311,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -339,10 +339,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap similarity index 92% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap index ee9656ed1099..63f7aeef3bfb 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap index 6689588a52fa..7b60943d3223 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ , _ ,) | row . 0 . into_iter () . map (move | __flattened_element | (__flattened_element , :: std :: clone :: Clone :: clone (& row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ , _ ,) | row . 1 . into_iter () . map (move | __flattened_element | (:: std :: clone :: Clone :: clone (& row . 0) , __flattened_element ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -387,7 +387,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -395,21 +395,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -423,10 +423,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap similarity index 95% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap index d6e0a64106fc..46d445f2f28a 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap index cb69eb657cf6..4936922037d5 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((123 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 + 123 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 . clone () + row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((123 - row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((123 % (row . 0 + 5) ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 * 5 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"2\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"3\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"3\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"4\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"4\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"5\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"5\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,42 +15,42 @@ fn main() { let (hoff_1v3_send, hoff_1v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(1v3)"); let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_21v1_send, hoff_21v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(21v1)"); let (hoff_22v1_send, hoff_22v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(22v1)"); let (hoff_23v1_send, hoff_23v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(23v1)"); let (hoff_24v1_send, hoff_24v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(24v1)"); let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -60,18 +60,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_2v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -92,38 +92,38 @@ fn main() { hoff_23v1_send, hoff_24v1_send )| { - let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_1v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_1v3_send.give(Some(v)); }); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); - let hoff_21v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_21v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_21v1_send.give(Some(v)); }); - let hoff_22v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_22v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_22v1_send.give(Some(v)); }); - let hoff_23v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_23v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_23v1_send.give(Some(v)); }); - let hoff_24v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_24v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_24v1_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -212,15 +212,15 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( hoff_6v3_send, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( hoff_1v3_send, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( hoff_21v1_send, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( hoff_22v1_send, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( hoff_23v1_send, hoff_24v1_send, ), @@ -233,21 +233,21 @@ fn main() { #[inline(always)] pub fn op_3v1__tee__loc_nopath_2_19_2_23< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -261,10 +261,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_2v1, op_3v1); }, @@ -846,7 +846,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -854,21 +854,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -882,10 +882,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap similarity index 96% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap index 7d0b988791a5..11a87767309c 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap similarity index 90% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap index 88dec76ae23f..309ce7303e3d 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 == 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 != 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 - 1 == 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((3 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ ,) | row . 0 - 1 == 1 - 1)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((4 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"2\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"3\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"3\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_1_filter\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_3_filter\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_5_filter\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_7_filter\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,32 +15,32 @@ fn main() { let (hoff_1v3_send, hoff_1v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(1v3)"); let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_21v1_send, hoff_21v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(21v1)"); let (hoff_22v1_send, hoff_22v1_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(22v1)"); let mut sg_2v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -50,18 +50,18 @@ fn main() { let sg_2v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -78,28 +78,28 @@ fn main() { hoff_1v3_send, hoff_6v3_send, hoff_21v1_send, hoff_22v1_send )| { - let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_1v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_1v3_send.give(Some(v)); }); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); - let hoff_21v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_21v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_21v1_send.give(Some(v)); }); - let hoff_22v1_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_22v1_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_22v1_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -188,7 +188,7 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; - let op_18v1 = hydroflow::pusherator::filter::Filter::new( + let op_18v1 = dfir_rs::pusherator::filter::Filter::new( |row: &(_,)| row.0 - 1 == 1 - 1, hoff_22v1_send, ); @@ -197,21 +197,21 @@ fn main() { #[inline(always)] pub fn op_18v1__filter__loc_nopath_8_12_8_50< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -222,7 +222,7 @@ fn main() { } op_18v1__filter__loc_nopath_8_12_8_50(op_18v1) }; - let op_15v1 = hydroflow::pusherator::filter::Filter::new( + let op_15v1 = dfir_rs::pusherator::filter::Filter::new( |row: &(_,)| row.0 - 1 == 0, hoff_21v1_send, ); @@ -231,21 +231,21 @@ fn main() { #[inline(always)] pub fn op_15v1__filter__loc_nopath_7_12_7_46< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -256,7 +256,7 @@ fn main() { } op_15v1__filter__loc_nopath_7_12_7_46(op_15v1) }; - let op_12v1 = hydroflow::pusherator::filter::Filter::new( + let op_12v1 = dfir_rs::pusherator::filter::Filter::new( |row: &(_,)| row.0 != 0, hoff_1v3_send, ); @@ -265,21 +265,21 @@ fn main() { #[inline(always)] pub fn op_12v1__filter__loc_nopath_6_12_6_42< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -290,7 +290,7 @@ fn main() { } op_12v1__filter__loc_nopath_6_12_6_42(op_12v1) }; - let op_9v1 = hydroflow::pusherator::filter::Filter::new( + let op_9v1 = dfir_rs::pusherator::filter::Filter::new( |row: &(_,)| row.0 == 0, hoff_6v3_send, ); @@ -299,21 +299,21 @@ fn main() { #[inline(always)] pub fn op_9v1__filter__loc_nopath_5_12_5_42< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -324,11 +324,11 @@ fn main() { } op_9v1__filter__loc_nopath_5_12_5_42(op_9v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( op_9v1, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( op_12v1, - hydroflow::pusherator::tee::Tee::new(op_15v1, op_18v1), + dfir_rs::pusherator::tee::Tee::new(op_15v1, op_18v1), ), ); let op_3v1 = { @@ -336,21 +336,21 @@ fn main() { #[inline(always)] pub fn op_3v1__tee__loc_nopath_2_19_2_23< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -364,10 +364,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_2v1, op_3v1); }, @@ -785,7 +785,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -793,21 +793,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -821,10 +821,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap similarity index 96% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap index 5a4d6342dde9..2c1dea237399 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap index e4af75fc146c..f5c17ffb8073 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ ,) | row . 0 . into_iter () . map (move | __flattened_element | (__flattened_element ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -342,7 +342,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -350,21 +350,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -378,10 +378,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap index 3fd1db96c50a..3d0b425bc2d2 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap index 9ca19090821f..1db76684e8dd 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"flat_map (| row : (_ , _ ,) | row . 1 . into_iter () . map (move | __flattened_element | (:: std :: clone :: Clone :: clone (& row . 0) , __flattened_element ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -307,7 +307,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -315,21 +315,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -343,10 +343,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap index 22f0e69de7d2..9bf39aabba06 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap similarity index 86% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap index 4fba2d1f01a3..ca64cd58b257 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result3 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result4 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result5 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 ,) , ((row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (hydroflow :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : hydroflow :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = hydroflow :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ ,) , _)) | (g . 0 , a . 0 . unwrap () . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 ,) , ((row . 1) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'static , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (hydroflow :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : hydroflow :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = hydroflow :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ ,) , _)) | (g . 0 , a . 0 . unwrap () . 1 , __enumerate_index ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"enumerate :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (__enumerate_index , (g , a)) : (_ , ((_ , _ ,) , _)) | (g . 0 , g . 1 , __enumerate_index ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":35,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":25,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":39,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":23,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":45,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":3},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":49,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":3},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":52,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":15,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":12,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":41,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":27,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":29,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":31,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":34,\"version\":1},{\"idx\":35,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":33,\"version\":1},{\"idx\":34,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":33,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":38,\"version\":1},{\"idx\":39,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":37,\"version\":1},{\"idx\":38,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":36,\"version\":1},{\"idx\":21,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":36,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":21,\"version\":3},{\"idx\":37,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":40,\"version\":1},{\"idx\":16,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":3},{\"idx\":51,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":44,\"version\":1},{\"idx\":45,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":43,\"version\":1},{\"idx\":44,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":42,\"version\":1},{\"idx\":43,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":42,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":3},{\"idx\":47,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":48,\"version\":1},{\"idx\":49,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":47,\"version\":1},{\"idx\":48,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":46,\"version\":1},{\"idx\":13,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":46,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":3},{\"idx\":41,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":50,\"version\":1},{\"idx\":10,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":50,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":25,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":33,\"version\":1},{\"idx\":34,\"version\":1},{\"idx\":35,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":27,\"version\":1},{\"idx\":36,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":37,\"version\":1},{\"idx\":38,\"version\":1},{\"idx\":39,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":41,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":42,\"version\":1},{\"idx\":43,\"version\":1},{\"idx\":44,\"version\":1},{\"idx\":45,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":29,\"version\":1},{\"idx\":46,\"version\":1},{\"idx\":50,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":47,\"version\":1},{\"idx\":48,\"version\":1},{\"idx\":49,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":2,\"version\":1},{\"value\":1,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":\"ints\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result4_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result5_insert\",\"version\":1},{\"value\":\"result5\",\"version\":1},{\"value\":\"result5\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_persisted_insert\",\"version\":1},{\"value\":\"ints_persisted\",\"version\":1},{\"value\":\"ints_persisted\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,52 +15,52 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_9v3_send, hoff_9v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(9v3)"); let (hoff_10v3_send, hoff_10v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(10v3)"); let (hoff_12v3_send, hoff_12v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(12v3)"); let (hoff_13v3_send, hoff_13v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(13v3)"); let (hoff_15v3_send, hoff_15v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(15v3)"); let (hoff_16v3_send, hoff_16v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(16v3)"); let (hoff_21v3_send, hoff_21v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(21v3)"); let mut sg_3v1_node_26v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -70,18 +70,18 @@ fn main() { let sg_3v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_3v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -96,7 +96,7 @@ fn main() { let sg_4v1_node_37v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); let sg_4v1_node_38v1_counterdata = df @@ -110,40 +110,40 @@ fn main() { let sg_4v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_5v1_node_22v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_5v1_node_23v1_antijoindata_neg = df .add_state( - std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + std::cell::RefCell::new(dfir_rs::rustc_hash::FxHashSet::default()), ); let sg_5v1_node_23v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_5v1_node_11v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -154,7 +154,7 @@ fn main() { let sg_6v1_node_47v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); let sg_6v1_node_48v1_counterdata = df @@ -168,9 +168,9 @@ fn main() { let sg_6v1_node_14v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -179,22 +179,22 @@ fn main() { let sg_7v1_node_17v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_7v1_node_18v1_antijoindata_neg = df .add_state( - std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + std::cell::RefCell::new(dfir_rs::rustc_hash::FxHashSet::default()), ); let sg_7v1_node_18v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -207,18 +207,18 @@ fn main() { var_expr!(hoff_16v3_send, hoff_21v3_send), false, move |context, var_args!(), var_args!(hoff_16v3_send, hoff_21v3_send)| { - let hoff_16v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_16v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_16v3_send.give(Some(v)); }); - let hoff_21v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_21v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_21v3_send.give(Some(v)); }); let op_26v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_3v1_node_26v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -307,7 +307,7 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; - let op_40v1 = hydroflow::pusherator::map::Map::new( + let op_40v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.0, row.1), ()), hoff_16v3_send, ); @@ -316,21 +316,21 @@ fn main() { #[inline(always)] pub fn op_40v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -341,7 +341,7 @@ fn main() { } op_40v1__map__loc_nopath_1_0_1_0(op_40v1) }; - let op_36v1 = hydroflow::pusherator::map::Map::new( + let op_36v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.0,), ((row.1),)), hoff_21v3_send, ); @@ -350,21 +350,21 @@ fn main() { #[inline(always)] pub fn op_36v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -375,7 +375,7 @@ fn main() { } op_36v1__map__loc_nopath_1_0_1_0(op_36v1) }; - let op_27v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_27v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_27v1 = { @@ -383,21 +383,21 @@ fn main() { #[inline(always)] pub fn op_27v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -408,7 +408,7 @@ fn main() { } op_27v1__for_each__loc_nopath_4_28_4_65(op_27v1) }; - let op_5v1 = hydroflow::pusherator::filter::Filter::new( + let op_5v1 = dfir_rs::pusherator::filter::Filter::new( |item| { let mut borrow = context .state_ref(sg_3v1_node_5v1_uniquedata) @@ -432,21 +432,21 @@ fn main() { #[inline(always)] pub fn op_5v1__unique__loc_nopath_4_20_4_26< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -457,7 +457,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_35v1 = hydroflow::pusherator::map::Map::new( + let op_35v1 = dfir_rs::pusherator::map::Map::new( |(__enumerate_index, (g, a)): (_, ((_, _), _))| ( g.0, g.1, @@ -470,21 +470,21 @@ fn main() { #[inline(always)] pub fn op_35v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -495,7 +495,7 @@ fn main() { } op_35v1__map__loc_nopath_1_0_1_0(op_35v1) }; - let op_34v1 = hydroflow::pusherator::map::Map::new( + let op_34v1 = dfir_rs::pusherator::map::Map::new( |item| { let mut counter = context .state_ref(sg_3v1_node_34v1_counterdata) @@ -509,21 +509,21 @@ fn main() { #[inline(always)] pub fn op_34v1__enumerate__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -534,7 +534,7 @@ fn main() { } op_34v1__enumerate__loc_nopath_1_0_1_0(op_34v1) }; - let op_33v1 = hydroflow::pusherator::map::Map::new( + let op_33v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.0, row.1), ()), op_34v1, ); @@ -543,21 +543,21 @@ fn main() { #[inline(always)] pub fn op_33v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -568,30 +568,30 @@ fn main() { } op_33v1__map__loc_nopath_1_0_1_0(op_33v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( op_33v1, - hydroflow::pusherator::tee::Tee::new(op_36v1, op_40v1), + dfir_rs::pusherator::tee::Tee::new(op_36v1, op_40v1), ); let op_3v1 = { #[allow(non_snake_case)] #[inline(always)] pub fn op_3v1__tee__loc_nopath_2_19_2_23< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -605,10 +605,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_3v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_3v1(op_2v1, op_3v1); }, @@ -622,7 +622,7 @@ fn main() { move |context, var_args!(hoff_12v3_recv), var_args!(hoff_15v3_send)| { let mut hoff_12v3_recv = hoff_12v3_recv.borrow_mut_swap(); let hoff_12v3_recv = hoff_12v3_recv.drain(..); - let hoff_15v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_15v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_15v3_send.give(Some(v)); @@ -670,10 +670,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_20v1, hoff_15v3_send); }, @@ -687,7 +687,7 @@ fn main() { move |context, var_args!(hoff_6v3_recv), var_args!(hoff_9v3_send)| { let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); let hoff_6v3_recv = hoff_6v3_recv.drain(..); - let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_9v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_9v3_send.give(Some(v)); @@ -735,10 +735,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_25v1, hoff_9v3_send); }, @@ -790,8 +790,8 @@ fn main() { |old: &mut (Option<_>,), val: (_,)| { old.0 = if let Some(prev) = old.0.take() { Some({ - let prev: (hydroflow::rustc_hash::FxHashSet<_>, _) = prev; - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev.0; + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; if set.insert(val.0) { (set, prev.1 + 1) } else { @@ -800,7 +800,7 @@ fn main() { }) } else { Some({ - let mut set = hydroflow::rustc_hash::FxHashSet::< + let mut set = dfir_rs::rustc_hash::FxHashSet::< _, >::default(); set.insert(val.0); @@ -976,7 +976,7 @@ fn main() { } op_8v1__unique__loc_nopath_5_20_5_27(op_8v1) }; - let op_28v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_28v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result2.send(v).unwrap() }); let op_28v1 = { @@ -984,21 +984,21 @@ fn main() { #[inline(always)] pub fn op_28v1__for_each__loc_nopath_5_29_5_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1012,10 +1012,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_4v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_4v1(op_8v1, op_28v1); }, @@ -1035,17 +1035,17 @@ fn main() { let hoff_9v3_recv = hoff_9v3_recv.drain(..); let mut hoff_16v3_recv = hoff_16v3_recv.borrow_mut_swap(); let hoff_16v3_recv = hoff_16v3_recv.drain(..); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); - let hoff_10v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_10v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_10v3_send.give(Some(v)); }); - let hoff_13v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_13v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_13v3_send.give(Some(v)); @@ -1149,8 +1149,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -1160,7 +1160,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -1209,7 +1209,7 @@ fn main() { } op_23v1__difference__loc_nopath_15_21_15_35(op_23v1) }; - let op_50v1 = hydroflow::pusherator::map::Map::new( + let op_50v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.0, row.1), ()), hoff_10v3_send, ); @@ -1218,21 +1218,21 @@ fn main() { #[inline(always)] pub fn op_50v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1243,7 +1243,7 @@ fn main() { } op_50v1__map__loc_nopath_1_0_1_0(op_50v1) }; - let op_46v1 = hydroflow::pusherator::map::Map::new( + let op_46v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.0,), ((row.1),)), hoff_13v3_send, ); @@ -1252,21 +1252,21 @@ fn main() { #[inline(always)] pub fn op_46v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1277,7 +1277,7 @@ fn main() { } op_46v1__map__loc_nopath_1_0_1_0(op_46v1) }; - let op_29v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_29v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result3.send(v).unwrap() }); let op_29v1 = { @@ -1285,21 +1285,21 @@ fn main() { #[inline(always)] pub fn op_29v1__for_each__loc_nopath_6_29_6_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1310,7 +1310,7 @@ fn main() { } op_29v1__for_each__loc_nopath_6_29_6_67(op_29v1) }; - let op_11v1 = hydroflow::pusherator::filter::Filter::new( + let op_11v1 = dfir_rs::pusherator::filter::Filter::new( |item| { let mut borrow = context .state_ref(sg_5v1_node_11v1_uniquedata) @@ -1334,21 +1334,21 @@ fn main() { #[inline(always)] pub fn op_11v1__unique__loc_nopath_6_20_6_27< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1367,19 +1367,19 @@ fn main() { vec: &'ctx mut Vec, mut output: Push, is_new_tick: bool, - ) -> impl 'ctx + hydroflow::pusherator::Pusherator + ) -> impl 'ctx + dfir_rs::pusherator::Pusherator where - Push: 'ctx + hydroflow::pusherator::Pusherator, + Push: 'ctx + dfir_rs::pusherator::Pusherator, Item: ::std::clone::Clone, { if is_new_tick { vec.iter() .cloned() .for_each(|item| { - hydroflow::pusherator::Pusherator::give(&mut output, item); + dfir_rs::pusherator::Pusherator::give(&mut output, item); }); } - hydroflow::pusherator::map::Map::new( + dfir_rs::pusherator::map::Map::new( |item| { vec.push(item); vec.last().unwrap().clone() @@ -1398,21 +1398,21 @@ fn main() { #[inline(always)] pub fn op_45v1__persist__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1423,7 +1423,7 @@ fn main() { } op_45v1__persist__loc_nopath_1_0_1_0(op_45v1) }; - let op_44v1 = hydroflow::pusherator::map::Map::new( + let op_44v1 = dfir_rs::pusherator::map::Map::new( |(__enumerate_index, (g, a)): (_, ((_, _), _))| ( g.0, g.1, @@ -1436,21 +1436,21 @@ fn main() { #[inline(always)] pub fn op_44v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1461,7 +1461,7 @@ fn main() { } op_44v1__map__loc_nopath_1_0_1_0(op_44v1) }; - let op_43v1 = hydroflow::pusherator::map::Map::new( + let op_43v1 = dfir_rs::pusherator::map::Map::new( |item| { let mut counter = context .state_ref(sg_5v1_node_43v1_counterdata) @@ -1475,21 +1475,21 @@ fn main() { #[inline(always)] pub fn op_43v1__enumerate__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1500,7 +1500,7 @@ fn main() { } op_43v1__enumerate__loc_nopath_1_0_1_0(op_43v1) }; - let op_42v1 = hydroflow::pusherator::map::Map::new( + let op_42v1 = dfir_rs::pusherator::map::Map::new( |row: (_, _)| ((row.0, row.1), ()), op_43v1, ); @@ -1509,21 +1509,21 @@ fn main() { #[inline(always)] pub fn op_42v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1534,11 +1534,11 @@ fn main() { } op_42v1__map__loc_nopath_1_0_1_0(op_42v1) }; - let op_24v1 = hydroflow::pusherator::tee::Tee::new( + let op_24v1 = dfir_rs::pusherator::tee::Tee::new( op_42v1, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( op_46v1, - hydroflow::pusherator::tee::Tee::new(op_50v1, hoff_6v3_send), + dfir_rs::pusherator::tee::Tee::new(op_50v1, hoff_6v3_send), ), ); let op_24v1 = { @@ -1546,21 +1546,21 @@ fn main() { #[inline(always)] pub fn op_24v1__tee__loc_nopath_15_21_15_35< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1574,10 +1574,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_5v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_5v1(op_23v1, op_24v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -1630,8 +1630,8 @@ fn main() { |old: &mut (Option<_>,), val: (_,)| { old.0 = if let Some(prev) = old.0.take() { Some({ - let prev: (hydroflow::rustc_hash::FxHashSet<_>, _) = prev; - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev.0; + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; if set.insert(val.0) { (set, prev.1 + 1) } else { @@ -1640,7 +1640,7 @@ fn main() { }) } else { Some({ - let mut set = hydroflow::rustc_hash::FxHashSet::< + let mut set = dfir_rs::rustc_hash::FxHashSet::< _, >::default(); set.insert(val.0); @@ -1831,7 +1831,7 @@ fn main() { } op_14v1__unique__loc_nopath_7_20_7_27(op_14v1) }; - let op_30v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_30v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result4.send(v).unwrap() }); let op_30v1 = { @@ -1839,21 +1839,21 @@ fn main() { #[inline(always)] pub fn op_30v1__for_each__loc_nopath_7_29_7_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1867,10 +1867,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_6v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_6v1(op_14v1, op_30v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -1891,7 +1891,7 @@ fn main() { let hoff_10v3_recv = hoff_10v3_recv.drain(..); let mut hoff_15v3_recv = hoff_15v3_recv.borrow_mut_swap(); let hoff_15v3_recv = hoff_15v3_recv.drain(..); - let hoff_12v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_12v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_12v3_send.give(Some(v)); @@ -2041,8 +2041,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -2052,7 +2052,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -2101,7 +2101,7 @@ fn main() { } op_18v1__difference__loc_nopath_9_21_9_28(op_18v1) }; - let op_32v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_32v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result5.send(v).unwrap() }); let op_32v1 = { @@ -2109,21 +2109,21 @@ fn main() { #[inline(always)] pub fn op_32v1__for_each__loc_nopath_10_29_10_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2142,19 +2142,19 @@ fn main() { vec: &'ctx mut Vec, mut output: Push, is_new_tick: bool, - ) -> impl 'ctx + hydroflow::pusherator::Pusherator + ) -> impl 'ctx + dfir_rs::pusherator::Pusherator where - Push: 'ctx + hydroflow::pusherator::Pusherator, + Push: 'ctx + dfir_rs::pusherator::Pusherator, Item: ::std::clone::Clone, { if is_new_tick { vec.iter() .cloned() .for_each(|item| { - hydroflow::pusherator::Pusherator::give(&mut output, item); + dfir_rs::pusherator::Pusherator::give(&mut output, item); }); } - hydroflow::pusherator::map::Map::new( + dfir_rs::pusherator::map::Map::new( |item| { vec.push(item); vec.last().unwrap().clone() @@ -2173,21 +2173,21 @@ fn main() { #[inline(always)] pub fn op_31v1__persist__loc_nopath_10_20_10_27< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2198,7 +2198,7 @@ fn main() { } op_31v1__persist__loc_nopath_10_20_10_27(op_31v1) }; - let op_19v1 = hydroflow::pusherator::tee::Tee::new( + let op_19v1 = dfir_rs::pusherator::tee::Tee::new( op_31v1, hoff_12v3_send, ); @@ -2207,21 +2207,21 @@ fn main() { #[inline(always)] pub fn op_19v1__tee__loc_nopath_9_21_9_28< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2235,10 +2235,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_7v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_7v1(op_18v1, op_19v1); context.schedule_subgraph(context.current_subgraph(), false); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap similarity index 98% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap index 005e4f50f0e7..dac17fb2677c 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap index 99a2e6d0dd0b..18f2b04e3108 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ , _ ,) , (() , ())) | (kv . 0 . 0 , kv . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 , _v . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 , _v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_10v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,21 +30,21 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_1v1_node_11v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -54,38 +54,38 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_13v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_13v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_13v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_13v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -97,7 +97,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_10v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -187,7 +187,7 @@ fn main() { op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) }; let op_11v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -361,12 +361,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -380,7 +380,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -588,7 +588,7 @@ fn main() { } op_8v1__unique__loc_nopath_4_20_4_23(op_8v1) }; - let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_12v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_12v1 = { @@ -596,21 +596,21 @@ fn main() { #[inline(always)] pub fn op_12v1__for_each__loc_nopath_4_25_4_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -624,10 +624,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_8v1, op_12v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap similarity index 95% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap index 4c1dc600dd17..8c1af6c72029 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap similarity index 91% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap index cb8e9d725099..bdcefc91d593 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ , _ ,) , (() , ())) | (kv . 0 . 0 , kv . 0 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 , _v . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 , _v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":3},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":\"input\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,22 +15,22 @@ fn main() { let (hoff_4v3_send, hoff_4v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(4v3)"); let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -40,38 +40,38 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_2v1_node_9v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_2v1_node_9v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_2v1_node_9v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_2v1_node_9v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_2v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -82,18 +82,18 @@ fn main() { var_expr!(hoff_4v3_send, hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_4v3_send, hoff_6v3_send)| { - let hoff_4v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_4v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_4v3_send.give(Some(v)); }); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -182,7 +182,7 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( hoff_6v3_send, hoff_4v3_send, ); @@ -191,21 +191,21 @@ fn main() { #[inline(always)] pub fn op_3v1__tee__loc_nopath_2_19_2_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -219,10 +219,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_2v1, op_3v1); }, @@ -323,12 +323,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -342,7 +342,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -550,7 +550,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_8v1 = { @@ -558,21 +558,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_25_3_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -586,10 +586,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap index 3e5971b6aa8c..3f161afffefc 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap index 1bf96f5b575f..4e16f36c88a5 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ , _ , _ , _ ,) | row . 0 == row . 1 && row . 2 == row . 3)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ , _ ,) | ((row . 0 . clone () , row . 0 , row . 2 . clone () , row . 2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -304,7 +304,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_8v1 = { @@ -312,21 +312,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_25_3_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -340,10 +340,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap index c6c17b45f5db..abf4f7ebfba9 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ , _ ,) | row . 0 == row . 1)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 . clone () , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -298,7 +298,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_8v1 = { @@ -306,21 +306,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_25_3_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -334,10 +334,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap index bb7f7b97821a..4384ceaf7355 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph-2.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap similarity index 91% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap index 019d81c4c02b..20b02c1ed8ce 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap similarity index 92% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap index 7db7f024c77a..572e747c8eb8 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , (row . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , (_ ,) , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (std :: cmp :: max (prev , val . 0)) } else { Some (val . 0) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (a . 0 . unwrap () , g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,17 +15,17 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let mut sg_2v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -35,24 +35,24 @@ fn main() { let sg_2v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_10v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(_,), (Option<_>,)>::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -63,13 +63,13 @@ fn main() { var_expr!(hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_6v3_send)| { - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -198,10 +198,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_9v1, hoff_6v3_send); }, @@ -379,7 +379,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -387,21 +387,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -415,10 +415,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap index 4436abb687f5..c6d94c9e2ac5 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap index a0bfbfe795ce..9a8198f3bba7 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , (row . 0 , row . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > , Option < _ > ,) > (| | (None , None ,) , | old : & mut (Option < _ > , Option < _ > ,) , val : (_ , _ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (std :: cmp :: max (prev , val . 0)) } else { Some (val . 0) } ; old . 1 = if let Some (prev) = old . 1 . take () { Some (std :: cmp :: max (prev , val . 1)) } else { Some (val . 1) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () , a . 1 . unwrap () ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,17 +15,17 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let mut sg_2v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -35,16 +35,16 @@ fn main() { let sg_2v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_10v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::< + dfir_rs::rustc_hash::FxHashMap::< (), (Option<_>, Option<_>), >::default(), @@ -53,9 +53,9 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -66,13 +66,13 @@ fn main() { var_expr!(hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_6v3_send)| { - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -201,10 +201,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_9v1, hoff_6v3_send); }, @@ -388,7 +388,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -396,21 +396,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -424,10 +424,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap similarity index 95% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap index c952ec029b93..8ef1e2e7c6eb 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap similarity index 92% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap index 7693f926774f..d639be85c0ec 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -265,7 +265,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_8v1 = { @@ -273,21 +273,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_25_3_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -301,10 +301,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap similarity index 90% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap index 1a0e5a987920..63f2736efaab 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap index 21e2d593d126..aa314c9d99f3 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ , _ ,) | (row_untuple . 0 . 0 , row_untuple . 0 . 1 , row_untuple . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row_untuple : (_ , _ , _ ,) | (row_untuple . 0 , row_untuple . 1 , row_untuple . 2 . 0 , row_untuple . 2 . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ , _ ,) | ((row . 0 , row . 1 , row . 2 , row . 3 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"source_reader_0\",\"version\":1},{\"value\":\"source_reader_0\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -352,7 +352,7 @@ fn main() { } op_5v1__unique__loc_nopath_4_20_4_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -360,21 +360,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_4_28_4_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -388,10 +388,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap index bf8fe38aadd8..d19d8f1dd48e 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap index 30706f984277..9d4b717ba183 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":\"out_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_10v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,21 +30,21 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_1v1_node_11v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -54,18 +54,18 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -77,7 +77,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_10v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -167,7 +167,7 @@ fn main() { op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) }; let op_11v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -497,7 +497,7 @@ fn main() { } op_8v1__unique__loc_nopath_4_20_4_23(op_8v1) }; - let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_12v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_12v1 = { @@ -505,21 +505,21 @@ fn main() { #[inline(always)] pub fn op_12v1__for_each__loc_nopath_4_25_4_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -533,10 +533,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_8v1, op_12v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap index b5bdfb38e788..a342d31d186a 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap similarity index 92% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap index b3c4c5b04bc7..a43723cfe12a 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (strings)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 . clone () , row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"strings_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -265,7 +265,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -273,21 +273,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -301,10 +301,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap similarity index 90% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap index aea661d66758..466a1c39edd9 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap similarity index 87% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap index c1a1a5851b0f..d7ae8237c1ef 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints3)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result3 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result4 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'static , 'static , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : (() , ((_ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'static , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : (() , ((_ , _ ,) , (_ ,))) | (kv . 1 . 0 . 0 , kv . 1 . 0 . 1 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | (() , (_v . 0 , _v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (() , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ ,) | ((row . 0 , row . 1 , row . 2 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"anti_join ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ()) | (kv . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | (_v . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"persist :: < 'static > ()\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":34,\"version\":1},{\"idx\":14,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":28,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":25,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":35,\"version\":1},{\"idx\":11,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":22,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":19,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":36,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":13,\"version\":3},{\"idx\":33,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":50,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":3},{\"idx\":31,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":58,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":19,\"version\":3},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":63,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":22,\"version\":3},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":68,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":25,\"version\":3},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":61,\"version\":1},{\"idx\":27,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":28,\"version\":3},{\"idx\":3,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":65,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":30,\"version\":1},{\"idx\":31,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":33,\"version\":1},{\"idx\":16,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":32,\"version\":1},{\"idx\":13,\"version\":3}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":3},{\"idx\":7,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":37,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":38,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":39,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":41,\"version\":1},{\"idx\":42,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":43,\"version\":1},{\"idx\":41,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":29,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":44,\"version\":1},{\"idx\":41,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":26,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":45,\"version\":1},{\"idx\":46,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":47,\"version\":1},{\"idx\":45,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":42,\"version\":1},{\"idx\":47,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":48,\"version\":1},{\"idx\":45,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":48,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":14,\"version\":3},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":49,\"version\":1},{\"idx\":50,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":46,\"version\":1},{\"idx\":49,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":54,\"version\":1},{\"idx\":51,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":53,\"version\":1},{\"idx\":54,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":23,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":56,\"version\":1},{\"idx\":20,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":55,\"version\":1},{\"idx\":56,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":55,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":3},{\"idx\":65,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":57,\"version\":1},{\"idx\":58,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":52,\"version\":1},{\"idx\":57,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":3},{\"idx\":44,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":60,\"version\":1},{\"idx\":61,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":59,\"version\":1},{\"idx\":60,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":59,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":20,\"version\":3},{\"idx\":51,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":62,\"version\":1},{\"idx\":63,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":27,\"version\":1},{\"idx\":62,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":29,\"version\":3},{\"idx\":43,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":64,\"version\":1},{\"idx\":17,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":64,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":3},{\"idx\":53,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":67,\"version\":1},{\"idx\":68,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":66,\"version\":1},{\"idx\":67,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":32,\"version\":1},{\"idx\":66,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"2\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"3\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":9,\"version\":1},\"version\":1},{\"value\":{\"idx\":10,\"version\":1},\"version\":1},{\"value\":{\"idx\":11,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":8,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1},{\"value\":{\"idx\":7,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":33,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":43,\"version\":1},{\"idx\":44,\"version\":1},{\"idx\":41,\"version\":1},{\"idx\":42,\"version\":1},{\"idx\":47,\"version\":1},{\"idx\":48,\"version\":1},{\"idx\":45,\"version\":1},{\"idx\":46,\"version\":1},{\"idx\":49,\"version\":1},{\"idx\":50,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":37,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":53,\"version\":1},{\"idx\":54,\"version\":1},{\"idx\":51,\"version\":1},{\"idx\":52,\"version\":1},{\"idx\":57,\"version\":1},{\"idx\":58,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":38,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":59,\"version\":1},{\"idx\":60,\"version\":1},{\"idx\":61,\"version\":1},{\"idx\":27,\"version\":1},{\"idx\":62,\"version\":1},{\"idx\":63,\"version\":1},{\"idx\":21,\"version\":1},{\"idx\":39,\"version\":1},{\"idx\":64,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":65,\"version\":1},{\"idx\":30,\"version\":1},{\"idx\":31,\"version\":1},{\"idx\":32,\"version\":1},{\"idx\":66,\"version\":1},{\"idx\":67,\"version\":1},{\"idx\":68,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":40,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":55,\"version\":1},{\"idx\":56,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":34,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":35,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":36,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":1,\"version\":1},{\"value\":2,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":\"ints2\",\"version\":1},{\"value\":\"ints2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result4_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"intermediate_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"intermediate_persist_insert\",\"version\":1},{\"value\":\"intermediate_persist\",\"version\":1},{\"value\":\"intermediate_persist\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_4\",\"version\":1},{\"value\":\"join_4\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_7\",\"version\":1},{\"value\":\"join_7\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,82 +15,82 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_11v3_send, hoff_11v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(11v3)"); let (hoff_13v3_send, hoff_13v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(13v3)"); let (hoff_14v3_send, hoff_14v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(14v3)"); let (hoff_16v3_send, hoff_16v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(16v3)"); let (hoff_17v3_send, hoff_17v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(17v3)"); let (hoff_19v3_send, hoff_19v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(19v3)"); let (hoff_20v3_send, hoff_20v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(20v3)"); let (hoff_22v3_send, hoff_22v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(22v3)"); let (hoff_23v3_send, hoff_23v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(23v3)"); let (hoff_25v3_send, hoff_25v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(25v3)"); let (hoff_26v3_send, hoff_26v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(26v3)"); let (hoff_28v3_send, hoff_28v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(28v3)"); let (hoff_29v3_send, hoff_29v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(29v3)"); let mut sg_9v1_node_34v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -100,12 +100,12 @@ fn main() { let mut sg_10v1_node_35v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -115,12 +115,12 @@ fn main() { let mut sg_11v1_node_36v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -130,46 +130,46 @@ fn main() { let sg_4v1_node_12v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_4v1_node_41v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); let sg_4v1_node_41v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); let sg_4v1_node_45v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); let sg_4v1_node_45v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_4v1_node_45v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_4v1_node_15v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -178,67 +178,67 @@ fn main() { let sg_5v1_node_51v1_antijoindata_neg = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_5v1_node_51v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_5v1_node_18v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_6v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_6v1_node_3v1_antijoindata_neg = df .add_state( - std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + std::cell::RefCell::new(dfir_rs::rustc_hash::FxHashSet::default()), ); let sg_6v1_node_3v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_6v1_node_21v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_6v1_node_27v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -247,31 +247,31 @@ fn main() { let sg_7v1_node_30v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_7v1_node_31v1_antijoindata_neg = df .add_state( - std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + std::cell::RefCell::new(dfir_rs::rustc_hash::FxHashSet::default()), ); let sg_7v1_node_31v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_7v1_node_24v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -280,22 +280,22 @@ fn main() { let sg_8v1_node_7v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_8v1_node_8v1_antijoindata_neg = df .add_state( - std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + std::cell::RefCell::new(dfir_rs::rustc_hash::FxHashSet::default()), ); let sg_8v1_node_8v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -308,13 +308,13 @@ fn main() { var_expr!(hoff_14v3_send), false, move |context, var_args!(), var_args!(hoff_14v3_send)| { - let hoff_14v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_14v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_14v3_send.give(Some(v)); }); let op_34v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_9v1_node_34v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -357,10 +357,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_9v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_9v1(op_34v1, hoff_14v3_send); }, @@ -372,13 +372,13 @@ fn main() { var_expr!(hoff_11v3_send), false, move |context, var_args!(), var_args!(hoff_11v3_send)| { - let hoff_11v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_11v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_11v3_send.give(Some(v)); }); let op_35v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_10v1_node_35v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -421,10 +421,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_10v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_10v1(op_35v1, hoff_11v3_send); }, @@ -436,13 +436,13 @@ fn main() { var_expr!(hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_6v3_send)| { - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_36v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_11v1_node_36v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -485,10 +485,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_11v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_11v1(op_36v1, hoff_6v3_send); }, @@ -502,7 +502,7 @@ fn main() { move |context, var_args!(hoff_25v3_recv), var_args!(hoff_28v3_send)| { let mut hoff_25v3_recv = hoff_25v3_recv.borrow_mut_swap(); let hoff_25v3_recv = hoff_25v3_recv.drain(..); - let hoff_28v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_28v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_28v3_send.give(Some(v)); @@ -550,10 +550,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, hoff_28v3_send); }, @@ -567,7 +567,7 @@ fn main() { move |context, var_args!(hoff_19v3_recv), var_args!(hoff_22v3_send)| { let mut hoff_19v3_recv = hoff_19v3_recv.borrow_mut_swap(); let hoff_19v3_recv = hoff_19v3_recv.drain(..); - let hoff_22v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_22v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_22v3_send.give(Some(v)); @@ -615,10 +615,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_10v1, hoff_22v3_send); }, @@ -632,7 +632,7 @@ fn main() { move |context, var_args!(hoff_13v3_recv), var_args!(hoff_16v3_send)| { let mut hoff_13v3_recv = hoff_13v3_recv.borrow_mut_swap(); let hoff_13v3_recv = hoff_13v3_recv.drain(..); - let hoff_16v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_16v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_16v3_send.give(Some(v)); @@ -680,10 +680,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_3v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_3v1(op_33v1, hoff_16v3_send); }, @@ -839,12 +839,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -858,7 +858,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -1029,12 +1029,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -1048,7 +1048,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -1258,7 +1258,7 @@ fn main() { } op_15v1__unique__loc_nopath_10_20_10_26(op_15v1) }; - let op_37v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_37v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_37v1 = { @@ -1266,21 +1266,21 @@ fn main() { #[inline(always)] pub fn op_37v1__for_each__loc_nopath_10_28_10_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1294,10 +1294,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_4v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_4v1(op_15v1, op_37v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -1409,8 +1409,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -1420,7 +1420,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -1629,7 +1629,7 @@ fn main() { } op_18v1__unique__loc_nopath_11_20_11_27(op_18v1) }; - let op_38v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_38v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result2.send(v).unwrap() }); let op_38v1 = { @@ -1637,21 +1637,21 @@ fn main() { #[inline(always)] pub fn op_38v1__for_each__loc_nopath_11_29_11_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1665,10 +1665,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_5v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_5v1(op_18v1, op_38v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -1693,22 +1693,22 @@ fn main() { let hoff_14v3_recv = hoff_14v3_recv.drain(..); let mut hoff_28v3_recv = hoff_28v3_recv.borrow_mut_swap(); let hoff_28v3_recv = hoff_28v3_recv.drain(..); - let hoff_17v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_17v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_17v3_send.give(Some(v)); }); - let hoff_23v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_23v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_23v3_send.give(Some(v)); }); - let hoff_25v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_25v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_25v3_send.give(Some(v)); }); - let hoff_29v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_29v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_29v3_send.give(Some(v)); @@ -1775,8 +1775,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -1786,7 +1786,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -1835,7 +1835,7 @@ fn main() { } op_3v1__difference__loc_nopath_2_19_2_24(op_3v1) }; - let op_64v1 = hydroflow::pusherator::map::Map::new( + let op_64v1 = dfir_rs::pusherator::map::Map::new( |row: (_,)| ((row.0,), ()), hoff_17v3_send, ); @@ -1844,21 +1844,21 @@ fn main() { #[inline(always)] pub fn op_64v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1869,7 +1869,7 @@ fn main() { } op_64v1__map__loc_nopath_1_0_1_0(op_64v1) }; - let op_39v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_39v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result3.send(v).unwrap() }); let op_39v1 = { @@ -1877,21 +1877,21 @@ fn main() { #[inline(always)] pub fn op_39v1__for_each__loc_nopath_12_29_12_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1902,7 +1902,7 @@ fn main() { } op_39v1__for_each__loc_nopath_12_29_12_67(op_39v1) }; - let op_21v1 = hydroflow::pusherator::filter::Filter::new( + let op_21v1 = dfir_rs::pusherator::filter::Filter::new( |item| { let mut borrow = context .state_ref(sg_6v1_node_21v1_uniquedata) @@ -1926,21 +1926,21 @@ fn main() { #[inline(always)] pub fn op_21v1__unique__loc_nopath_12_20_12_27< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1951,7 +1951,7 @@ fn main() { } op_21v1__unique__loc_nopath_12_20_12_27(op_21v1) }; - let op_63v1 = hydroflow::pusherator::map::Map::new( + let op_63v1 = dfir_rs::pusherator::map::Map::new( |(g, a): ((_,), _)| (g.0,), op_21v1, ); @@ -1960,21 +1960,21 @@ fn main() { #[inline(always)] pub fn op_63v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -1985,7 +1985,7 @@ fn main() { } op_63v1__map__loc_nopath_1_0_1_0(op_63v1) }; - let op_62v1 = hydroflow::pusherator::map::Map::new( + let op_62v1 = dfir_rs::pusherator::map::Map::new( |row: (_,)| ((row.0,), ()), op_63v1, ); @@ -1994,21 +1994,21 @@ fn main() { #[inline(always)] pub fn op_62v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2019,7 +2019,7 @@ fn main() { } op_62v1__map__loc_nopath_1_0_1_0(op_62v1) }; - let op_27v1 = hydroflow::pusherator::filter::Filter::new( + let op_27v1 = dfir_rs::pusherator::filter::Filter::new( |item| { let mut borrow = context .state_ref(sg_6v1_node_27v1_uniquedata) @@ -2043,21 +2043,21 @@ fn main() { #[inline(always)] pub fn op_27v1__unique__loc_nopath_18_12_18_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2076,19 +2076,19 @@ fn main() { vec: &'ctx mut Vec, mut output: Push, is_new_tick: bool, - ) -> impl 'ctx + hydroflow::pusherator::Pusherator + ) -> impl 'ctx + dfir_rs::pusherator::Pusherator where - Push: 'ctx + hydroflow::pusherator::Pusherator, + Push: 'ctx + dfir_rs::pusherator::Pusherator, Item: ::std::clone::Clone, { if is_new_tick { vec.iter() .cloned() .for_each(|item| { - hydroflow::pusherator::Pusherator::give(&mut output, item); + dfir_rs::pusherator::Pusherator::give(&mut output, item); }); } - hydroflow::pusherator::map::Map::new( + dfir_rs::pusherator::map::Map::new( |item| { vec.push(item); vec.last().unwrap().clone() @@ -2107,21 +2107,21 @@ fn main() { #[inline(always)] pub fn op_61v1__persist__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2132,7 +2132,7 @@ fn main() { } op_61v1__persist__loc_nopath_1_0_1_0(op_61v1) }; - let op_60v1 = hydroflow::pusherator::map::Map::new( + let op_60v1 = dfir_rs::pusherator::map::Map::new( |(g, a): ((_,), _)| (g.0,), op_61v1, ); @@ -2141,21 +2141,21 @@ fn main() { #[inline(always)] pub fn op_60v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2166,7 +2166,7 @@ fn main() { } op_60v1__map__loc_nopath_1_0_1_0(op_60v1) }; - let op_59v1 = hydroflow::pusherator::map::Map::new( + let op_59v1 = dfir_rs::pusherator::map::Map::new( |row: (_,)| ((row.0,), ()), op_60v1, ); @@ -2175,21 +2175,21 @@ fn main() { #[inline(always)] pub fn op_59v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2200,13 +2200,13 @@ fn main() { } op_59v1__map__loc_nopath_1_0_1_0(op_59v1) }; - let op_4v1 = hydroflow::pusherator::tee::Tee::new( + let op_4v1 = dfir_rs::pusherator::tee::Tee::new( hoff_29v3_send, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( hoff_23v3_send, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( op_59v1, - hydroflow::pusherator::tee::Tee::new( + dfir_rs::pusherator::tee::Tee::new( op_64v1, hoff_25v3_send, ), @@ -2218,21 +2218,21 @@ fn main() { #[inline(always)] pub fn op_4v1__tee__loc_nopath_2_19_2_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2246,10 +2246,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_6v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_6v1(op_3v1, op_4v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -2270,7 +2270,7 @@ fn main() { let hoff_16v3_recv = hoff_16v3_recv.drain(..); let mut hoff_17v3_recv = hoff_17v3_recv.borrow_mut_swap(); let hoff_17v3_recv = hoff_17v3_recv.drain(..); - let hoff_13v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_13v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_13v3_send.give(Some(v)); @@ -2374,8 +2374,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -2385,7 +2385,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -2434,7 +2434,7 @@ fn main() { } op_31v1__difference__loc_nopath_21_21_21_41(op_31v1) }; - let op_40v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_40v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result4.send(v).unwrap() }); let op_40v1 = { @@ -2442,21 +2442,21 @@ fn main() { #[inline(always)] pub fn op_40v1__for_each__loc_nopath_13_29_13_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2467,7 +2467,7 @@ fn main() { } op_40v1__for_each__loc_nopath_13_29_13_67(op_40v1) }; - let op_24v1 = hydroflow::pusherator::filter::Filter::new( + let op_24v1 = dfir_rs::pusherator::filter::Filter::new( |item| { let mut borrow = context .state_ref(sg_7v1_node_24v1_uniquedata) @@ -2491,21 +2491,21 @@ fn main() { #[inline(always)] pub fn op_24v1__unique__loc_nopath_13_20_13_27< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2524,19 +2524,19 @@ fn main() { vec: &'ctx mut Vec, mut output: Push, is_new_tick: bool, - ) -> impl 'ctx + hydroflow::pusherator::Pusherator + ) -> impl 'ctx + dfir_rs::pusherator::Pusherator where - Push: 'ctx + hydroflow::pusherator::Pusherator, + Push: 'ctx + dfir_rs::pusherator::Pusherator, Item: ::std::clone::Clone, { if is_new_tick { vec.iter() .cloned() .for_each(|item| { - hydroflow::pusherator::Pusherator::give(&mut output, item); + dfir_rs::pusherator::Pusherator::give(&mut output, item); }); } - hydroflow::pusherator::map::Map::new( + dfir_rs::pusherator::map::Map::new( |item| { vec.push(item); vec.last().unwrap().clone() @@ -2555,21 +2555,21 @@ fn main() { #[inline(always)] pub fn op_68v1__persist__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2580,7 +2580,7 @@ fn main() { } op_68v1__persist__loc_nopath_1_0_1_0(op_68v1) }; - let op_67v1 = hydroflow::pusherator::map::Map::new( + let op_67v1 = dfir_rs::pusherator::map::Map::new( |(g, a): ((_,), _)| (g.0,), op_68v1, ); @@ -2589,21 +2589,21 @@ fn main() { #[inline(always)] pub fn op_67v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2614,7 +2614,7 @@ fn main() { } op_67v1__map__loc_nopath_1_0_1_0(op_67v1) }; - let op_66v1 = hydroflow::pusherator::map::Map::new( + let op_66v1 = dfir_rs::pusherator::map::Map::new( |row: (_,)| ((row.0,), ()), op_67v1, ); @@ -2623,21 +2623,21 @@ fn main() { #[inline(always)] pub fn op_66v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2648,7 +2648,7 @@ fn main() { } op_66v1__map__loc_nopath_1_0_1_0(op_66v1) }; - let op_32v1 = hydroflow::pusherator::tee::Tee::new( + let op_32v1 = dfir_rs::pusherator::tee::Tee::new( op_66v1, hoff_13v3_send, ); @@ -2657,21 +2657,21 @@ fn main() { #[inline(always)] pub fn op_32v1__tee__loc_nopath_21_21_21_41< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2685,10 +2685,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_7v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_7v1(op_31v1, op_32v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -2709,17 +2709,17 @@ fn main() { let hoff_11v3_recv = hoff_11v3_recv.drain(..); let mut hoff_22v3_recv = hoff_22v3_recv.borrow_mut_swap(); let hoff_22v3_recv = hoff_22v3_recv.drain(..); - let hoff_19v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_19v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_19v3_send.give(Some(v)); }); - let hoff_20v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_20v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_20v3_send.give(Some(v)); }); - let hoff_26v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_26v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_26v3_send.give(Some(v)); @@ -2786,8 +2786,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -2797,7 +2797,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -2846,7 +2846,7 @@ fn main() { } op_8v1__difference__loc_nopath_5_19_5_24(op_8v1) }; - let op_56v1 = hydroflow::pusherator::map::Map::new( + let op_56v1 = dfir_rs::pusherator::map::Map::new( |_v: (_,)| (_v.0,), hoff_20v3_send, ); @@ -2855,21 +2855,21 @@ fn main() { #[inline(always)] pub fn op_56v1__map__loc_nopath_16_37_16_45< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2888,19 +2888,19 @@ fn main() { vec: &'ctx mut Vec, mut output: Push, is_new_tick: bool, - ) -> impl 'ctx + hydroflow::pusherator::Pusherator + ) -> impl 'ctx + dfir_rs::pusherator::Pusherator where - Push: 'ctx + hydroflow::pusherator::Pusherator, + Push: 'ctx + dfir_rs::pusherator::Pusherator, Item: ::std::clone::Clone, { if is_new_tick { vec.iter() .cloned() .for_each(|item| { - hydroflow::pusherator::Pusherator::give(&mut output, item); + dfir_rs::pusherator::Pusherator::give(&mut output, item); }); } - hydroflow::pusherator::map::Map::new( + dfir_rs::pusherator::map::Map::new( |item| { vec.push(item); vec.last().unwrap().clone() @@ -2919,21 +2919,21 @@ fn main() { #[inline(always)] pub fn op_55v1__persist__loc_nopath_16_37_16_45< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2944,30 +2944,30 @@ fn main() { } op_55v1__persist__loc_nopath_16_37_16_45(op_55v1) }; - let op_9v1 = hydroflow::pusherator::tee::Tee::new( + let op_9v1 = dfir_rs::pusherator::tee::Tee::new( hoff_26v3_send, - hydroflow::pusherator::tee::Tee::new(op_55v1, hoff_19v3_send), + dfir_rs::pusherator::tee::Tee::new(op_55v1, hoff_19v3_send), ); let op_9v1 = { #[allow(non_snake_case)] #[inline(always)] pub fn op_9v1__tee__loc_nopath_5_19_5_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -2981,10 +2981,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_8v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_8v1(op_8v1, op_9v1); context.schedule_subgraph(context.current_subgraph(), false); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap similarity index 98% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap index 42f96b8bccd4..a6f0af900944 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap similarity index 90% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap index 6ded593c5ed3..460d6b454ece 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"difference :: < 'tick , 'static > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"defer_tick ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | (() , ((row . 0) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'static , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (hydroflow :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : hydroflow :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = hydroflow :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":11,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":8,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":5},{\"value\":[{\"idx\":8,\"version\":3},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":3},{\"idx\":3,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":7,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Path\":\"pos\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":5},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Path\":\"neg\"}],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":5,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":2,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,32 +15,32 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let (hoff_8v3_send, hoff_8v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(8v3)"); let (hoff_9v3_send, hoff_9v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(9v3)"); let (hoff_11v3_send, hoff_11v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(11v3)"); let mut sg_4v1_node_12v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -50,46 +50,46 @@ fn main() { let sg_2v1_node_17v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), ), ); let sg_2v1_node_10v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_3v1_node_7v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_3v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_3v1_node_3v1_antijoindata_neg = df .add_state( - std::cell::RefCell::new(hydroflow::rustc_hash::FxHashSet::default()), + std::cell::RefCell::new(dfir_rs::rustc_hash::FxHashSet::default()), ); let sg_3v1_node_3v1_antijoindata_pos = df .add_state( std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -100,13 +100,13 @@ fn main() { var_expr!(hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_6v3_send)| { - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_12v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_4v1_node_12v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -149,10 +149,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_4v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_4v1(op_12v1, hoff_6v3_send); }, @@ -166,7 +166,7 @@ fn main() { move |context, var_args!(hoff_8v3_recv), var_args!(hoff_11v3_send)| { let mut hoff_8v3_recv = hoff_8v3_recv.borrow_mut_swap(); let hoff_8v3_recv = hoff_8v3_recv.drain(..); - let hoff_11v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_11v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_11v3_send.give(Some(v)); @@ -214,10 +214,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, hoff_11v3_send); }, @@ -269,8 +269,8 @@ fn main() { |old: &mut (Option<_>,), val: (_,)| { old.0 = if let Some(prev) = old.0.take() { Some({ - let prev: (hydroflow::rustc_hash::FxHashSet<_>, _) = prev; - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev.0; + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; if set.insert(val.0) { (set, prev.1 + 1) } else { @@ -279,7 +279,7 @@ fn main() { }) } else { Some({ - let mut set = hydroflow::rustc_hash::FxHashSet::< + let mut set = dfir_rs::rustc_hash::FxHashSet::< _, >::default(); set.insert(val.0); @@ -424,7 +424,7 @@ fn main() { } op_10v1__unique__loc_nopath_8_20_8_26(op_10v1) }; - let op_13v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_13v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_13v1 = { @@ -432,21 +432,21 @@ fn main() { #[inline(always)] pub fn op_13v1__for_each__loc_nopath_8_28_8_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -460,10 +460,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_10v1, op_13v1); context.schedule_subgraph(context.current_subgraph(), false); @@ -484,12 +484,12 @@ fn main() { let hoff_6v3_recv = hoff_6v3_recv.drain(..); let mut hoff_11v3_recv = hoff_11v3_recv.borrow_mut_swap(); let hoff_11v3_recv = hoff_11v3_recv.drain(..); - let hoff_8v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_8v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_8v3_send.give(Some(v)); }); - let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_9v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_9v3_send.give(Some(v)); @@ -679,8 +679,8 @@ fn main() { fn check_inputs<'a, K, I1, V, I2>( input_neg: I1, input_pos: I2, - neg_state: &'a mut hydroflow::rustc_hash::FxHashSet, - pos_state: &'a mut hydroflow::rustc_hash::FxHashSet<(K, V)>, + neg_state: &'a mut dfir_rs::rustc_hash::FxHashSet, + pos_state: &'a mut dfir_rs::rustc_hash::FxHashSet<(K, V)>, is_new_tick: bool, ) -> impl 'a + Iterator where @@ -690,7 +690,7 @@ fn main() { I2: 'a + Iterator, { neg_state.extend(input_neg); - hydroflow::compiled::pull::anti_join_into_iter( + dfir_rs::compiled::pull::anti_join_into_iter( input_pos, neg_state, pos_state, @@ -739,7 +739,7 @@ fn main() { } op_3v1__difference__loc_nopath_2_21_2_26(op_3v1) }; - let op_16v1 = hydroflow::pusherator::map::Map::new( + let op_16v1 = dfir_rs::pusherator::map::Map::new( |row: (_,)| ((), ((row.0),)), hoff_9v3_send, ); @@ -748,21 +748,21 @@ fn main() { #[inline(always)] pub fn op_16v1__map__loc_nopath_1_0_1_0< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -773,7 +773,7 @@ fn main() { } op_16v1__map__loc_nopath_1_0_1_0(op_16v1) }; - let op_4v1 = hydroflow::pusherator::tee::Tee::new( + let op_4v1 = dfir_rs::pusherator::tee::Tee::new( op_16v1, hoff_8v3_send, ); @@ -782,21 +782,21 @@ fn main() { #[inline(always)] pub fn op_4v1__tee__loc_nopath_2_21_2_26< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -810,10 +810,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_3v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_3v1(op_3v1, op_4v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap similarity index 96% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap index 2f3c967b2a4b..555aa40bf10c 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap similarity index 91% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap index d8e50a5296d1..c2233e2cc7c2 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (ints)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| (node , data) | async_send_result (node , data))\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (async_receive_result)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| v : (_ , _ ,) | (v . 1 , (v . 0 ,)))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result_async_send\",\"version\":1},{\"value\":\"result_async_send\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_12v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,21 +30,21 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_2v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -54,18 +54,18 @@ fn main() { let sg_2v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_2v1_node_10v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -77,7 +77,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_12v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_12v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -166,7 +166,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_26(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_8v1 = { @@ -174,21 +174,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_28_3_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -202,10 +202,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, @@ -218,7 +218,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -467,7 +467,7 @@ fn main() { } op_10v1__unique__loc_nopath_4_19_4_25(op_10v1) }; - let op_11v1 = hydroflow::pusherator::for_each::ForEach::new(| + let op_11v1 = dfir_rs::pusherator::for_each::ForEach::new(| (node, data)| async_send_result(node, data)); let op_11v1 = { @@ -475,21 +475,21 @@ fn main() { #[inline(always)] pub fn op_11v1__for_each__loc_nopath_4_27_4_81< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -503,10 +503,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_10v1, op_11v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap index 0349fd8fc091..c1f9a70c3f15 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap index 70f57da4ff37..3f816dc3cfc9 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"filter (| row : & (_ , _ ,) | row . 0 > row . 1 && row . 1 == row . 0)\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 0 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ ,) , _) | (g . 0 , g . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"predicate_1_filter\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,18 +30,18 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -53,7 +53,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -299,7 +299,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_8v1 = { @@ -307,21 +307,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_25_3_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -335,10 +335,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap similarity index 91% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap index 60dcd1e9f274..9add77080e85 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap index ded1b15e735e..e10df0d379d9 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , (() , ())) | (kv . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_10v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,21 +30,21 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_1v1_node_11v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -54,38 +54,38 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_13v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_13v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_13v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_13v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -97,7 +97,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_10v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -187,7 +187,7 @@ fn main() { op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) }; let op_11v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -361,12 +361,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -380,7 +380,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -588,7 +588,7 @@ fn main() { } op_8v1__unique__loc_nopath_4_20_4_23(op_8v1) }; - let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_12v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_12v1 = { @@ -596,21 +596,21 @@ fn main() { #[inline(always)] pub fn op_12v1__for_each__loc_nopath_4_25_4_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -624,10 +624,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_8v1, op_12v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap index 04c77e803972..53db5afa6aaf 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap similarity index 93% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap index 53702adc0a27..80e4033ca267 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"union ()\"},\"version\":1},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (edges)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (seed_reachable)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | reachable . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , (() , (_ ,))) | (kv . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | ((row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":17,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":7,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":16,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":16,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":7,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":12,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"edges_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"seed_reachable_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"reachable_insert\",\"version\":1},{\"value\":\"reachable_insert\",\"version\":1},{\"value\":\"reachable\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_3\",\"version\":1},{\"value\":\"join_3\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,17 +15,17 @@ fn main() { let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let mut sg_1v1_node_10v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -35,21 +35,21 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_1v1_node_11v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -59,38 +59,38 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_15v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_15v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_15v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_15v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -103,13 +103,13 @@ fn main() { move |context, var_args!(hoff_6v3_recv), var_args!(hoff_6v3_send)| { let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); let hoff_6v3_recv = hoff_6v3_recv.drain(..); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_10v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_10v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -199,7 +199,7 @@ fn main() { op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; let op_11v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_11v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -447,12 +447,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -466,7 +466,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -719,7 +719,7 @@ fn main() { } op_8v1__unique__loc_nopath_4_20_4_29(op_8v1) }; - let op_12v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_12v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { reachable.send(v).unwrap() }); let op_12v1 = { @@ -727,21 +727,21 @@ fn main() { #[inline(always)] pub fn op_12v1__for_each__loc_nopath_4_31_4_71< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -752,7 +752,7 @@ fn main() { } op_12v1__for_each__loc_nopath_4_31_4_71(op_12v1) }; - let op_9v1 = hydroflow::pusherator::tee::Tee::new( + let op_9v1 = dfir_rs::pusherator::tee::Tee::new( op_12v1, hoff_6v3_send, ); @@ -761,21 +761,21 @@ fn main() { #[inline(always)] pub fn op_9v1__tee__loc_nopath_4_20_4_29< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -789,10 +789,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_8v1, op_9v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap similarity index 95% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap index a62b89a0f975..4d8520cc7ccd 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap index 4257e5e0d620..b7ff018e7d7f 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"source_stream (in1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in2)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (in3)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ , _ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 0 . 1 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ , _ ,) | ((_v . 2 ,) , (_v . 1 , _v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ , _ ,) | ((row . 3 , row . 0 , row . 2 , row . 1 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ , _ , _ , _ ,) , _) | (g . 0 , g . 1 , g . 2 , g . 3 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":19,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":15,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":21,\"version\":1},{\"idx\":22,\"version\":1},{\"idx\":25,\"version\":1},{\"idx\":26,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in1_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"in3_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_4\",\"version\":1},{\"value\":\"join_4\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,12 +15,12 @@ fn main() { let mut sg_1v1_node_13v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -30,21 +30,21 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_1v1_node_14v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -54,21 +54,21 @@ fn main() { let sg_1v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_1v1_node_15v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -78,58 +78,58 @@ fn main() { let sg_1v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_1v1_node_17v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_17v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_17v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_17v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_21v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_21v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_21v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_1v1_node_21v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_1v1_node_11v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -141,7 +141,7 @@ fn main() { false, move |context, var_args!(), var_args!()| { let op_13v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_13v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -231,7 +231,7 @@ fn main() { op_2v1__unique__loc_nopath_2_19_2_22(op_2v1) }; let op_14v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_14v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -321,7 +321,7 @@ fn main() { op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) }; let op_15v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_15v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -495,12 +495,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -514,7 +514,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -685,12 +685,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -704,7 +704,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -920,7 +920,7 @@ fn main() { } op_11v1__unique__loc_nopath_5_20_5_23(op_11v1) }; - let op_16v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_16v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_16v1 = { @@ -928,21 +928,21 @@ fn main() { #[inline(always)] pub fn op_16v1__for_each__loc_nopath_5_25_5_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -956,10 +956,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_11v1, op_16v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap similarity index 97% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap index b2105e2b4005..a7a477608edb 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap similarity index 91% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap index 7b2cbee6fe7c..3c497bdea542 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":2},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (input)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | out . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , (_ ,))) | (kv . 0 . 0 , kv . 1 . 0 . 0 , kv . 1 . 1 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 1 ,) , (_v . 0 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ , _ ,) | ((row . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : ((_ ,) , _) | (g . 0 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":6,\"version\":3},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":null,\"version\":2},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":6,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":4,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":3},{\"idx\":12,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":7,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":12,\"version\":1},{\"idx\":9,\"version\":1},{\"idx\":10,\"version\":1},{\"idx\":13,\"version\":1},{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"input_insert\",\"version\":1},{\"value\":\"input\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"out_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,22 +15,22 @@ fn main() { let (hoff_4v3_send, hoff_4v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(4v3)"); let (hoff_6v3_send, hoff_6v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(6v3)"); let mut sg_1v1_node_7v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -40,38 +40,38 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_2v1_node_9v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_2v1_node_9v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_2v1_node_9v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_2v1_node_9v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_2v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); @@ -82,18 +82,18 @@ fn main() { var_expr!(hoff_4v3_send, hoff_6v3_send), false, move |context, var_args!(), var_args!(hoff_4v3_send, hoff_6v3_send)| { - let hoff_4v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_4v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_4v3_send.give(Some(v)); }); - let hoff_6v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_6v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_6v3_send.give(Some(v)); }); let op_7v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_7v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -182,7 +182,7 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( hoff_6v3_send, hoff_4v3_send, ); @@ -191,21 +191,21 @@ fn main() { #[inline(always)] pub fn op_3v1__tee__loc_nopath_2_19_2_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -219,10 +219,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_2v1, op_3v1); }, @@ -323,12 +323,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -342,7 +342,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -551,7 +551,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_20_3_23(op_5v1) }; - let op_8v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_8v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { out.send(v).unwrap() }); let op_8v1 = { @@ -559,21 +559,21 @@ fn main() { #[inline(always)] pub fn op_8v1__for_each__loc_nopath_3_25_3_59< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -587,10 +587,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_5v1, op_8v1); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap similarity index 94% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap index 458d4876d092..c0d8eba2120a 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap similarity index 91% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap index 505939142a53..4446535d46d7 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap @@ -1,13 +1,13 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: "prettyplease :: unparse(& wrapped)" --- fn main() { { #[allow(unused_qualifications)] { - use hydroflow::{var_expr, var_args}; - let mut df = hydroflow::scheduled::graph::Hydroflow::new(); + use dfir_rs::{var_expr, var_args}; + let mut df = dfir_rs::scheduled::graph::dfir_rs::new(); df.__assign_meta_graph( "{\"nodes\":[{\"value\":null,\"version\":0},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Operator\":\"tee ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"unique :: < 'tick > ()\"},\"version\":1},{\"value\":{\"Handoff\":{}},\"version\":3},{\"value\":{\"Operator\":\"source_stream (ints1)\"},\"version\":1},{\"value\":{\"Operator\":\"source_stream (ints2)\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"for_each (| v | result2 . send (v) . unwrap ())\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , ())) | (kv . 0 . 0 , kv . 1 . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , (() ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some (prev + 1) } else { Some (1) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () ,))\"},\"version\":1},{\"value\":{\"Operator\":\"join :: < 'tick , 'tick , hydroflow :: compiled :: pull :: HalfMultisetJoinState > ()\"},\"version\":1},{\"value\":{\"Operator\":\"map (| kv : ((_ ,) , ((_ ,) , ())) | (kv . 0 . 0 , kv . 1 . 0 . 0 ,))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ , _ ,) | ((_v . 0 ,) , (_v . 1 ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| _v : (_ ,) | ((_v . 0 ,) , ()))\"},\"version\":1},{\"value\":{\"Operator\":\"map (| row : (_ , _ ,) | (() , ((row . 0) ,)))\"},\"version\":1},{\"value\":{\"Operator\":\"fold_keyed :: < 'tick , () , (Option < _ > ,) > (| | (None ,) , | old : & mut (Option < _ > ,) , val : (_ ,) | { old . 0 = if let Some (prev) = old . 0 . take () { Some ({ let prev : (hydroflow :: rustc_hash :: FxHashSet < _ > , _) = prev ; let mut set : hydroflow :: rustc_hash :: FxHashSet < _ > = prev . 0 ; if set . insert (val . 0) { (set , prev . 1 + 1) } else { (set , prev . 1) } }) } else { Some ({ let mut set = hydroflow :: rustc_hash :: FxHashSet :: < _ > :: default () ; set . insert (val . 0) ; (set , 1) }) } ; })\"},\"version\":1},{\"value\":{\"Operator\":\"map (| (g , a) : (() , _) | (a . 0 . unwrap () . 1 ,))\"},\"version\":1}],\"graph\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":5,\"version\":1},{\"idx\":6,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":23,\"version\":1},{\"idx\":8,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":9,\"version\":3},{\"idx\":20,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":30,\"version\":1},{\"idx\":11,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":12,\"version\":3},{\"idx\":19,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":1,\"version\":3},{\"idx\":29,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":4,\"version\":3},{\"idx\":27,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":8,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":12,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":1},{\"idx\":9,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":7,\"version\":3},{\"idx\":26,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":21,\"version\":1},{\"idx\":10,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":18,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":24,\"version\":1},{\"idx\":25,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":3,\"version\":1},{\"idx\":7,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":27,\"version\":1},{\"idx\":24,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":6,\"version\":1},{\"idx\":4,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":10,\"version\":3},{\"idx\":22,\"version\":1}],\"version\":3},{\"value\":[{\"idx\":29,\"version\":1},{\"idx\":30,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":28,\"version\":1},{\"idx\":1,\"version\":3}],\"version\":3},{\"value\":[{\"idx\":25,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":1}],\"ports\":[{\"value\":null,\"version\":0},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"0\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",{\"Int\":\"0\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",{\"Int\":\"1\"}],\"version\":1},{\"value\":[{\"Int\":\"1\"},\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1},{\"value\":[\"Elided\",\"Elided\"],\"version\":3},{\"value\":[\"Elided\",\"Elided\"],\"version\":1}],\"node_loops\":[{\"value\":null,\"version\":0}],\"loop_nodes\":[{\"value\":null,\"version\":0}],\"loop_parent\":[{\"value\":null,\"version\":0}],\"loop_children\":[{\"value\":null,\"version\":0}],\"node_subgraph\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":null,\"version\":0},{\"value\":{\"idx\":1,\"version\":1},\"version\":1},{\"value\":{\"idx\":2,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":5,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":3,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":6,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1},{\"value\":{\"idx\":4,\"version\":1},\"version\":1}],\"subgraph_nodes\":[{\"value\":null,\"version\":0},{\"value\":[{\"idx\":13,\"version\":1},{\"idx\":2,\"version\":1},{\"idx\":3,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":14,\"version\":1},{\"idx\":5,\"version\":1},{\"idx\":6,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":22,\"version\":1},{\"idx\":23,\"version\":1},{\"idx\":8,\"version\":1},{\"idx\":15,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":29,\"version\":1},{\"idx\":30,\"version\":1},{\"idx\":11,\"version\":1},{\"idx\":16,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":19,\"version\":1},{\"idx\":20,\"version\":1},{\"idx\":17,\"version\":1},{\"idx\":18,\"version\":1},{\"idx\":21,\"version\":1}],\"version\":1},{\"value\":[{\"idx\":26,\"version\":1},{\"idx\":27,\"version\":1},{\"idx\":24,\"version\":1},{\"idx\":25,\"version\":1},{\"idx\":28,\"version\":1}],\"version\":1}],\"subgraph_stratum\":[{\"value\":null,\"version\":0},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1},{\"value\":1,\"version\":1},{\"value\":1,\"version\":1},{\"value\":0,\"version\":1},{\"value\":0,\"version\":1}],\"node_singleton_references\":[{\"value\":null,\"version\":0},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1},{\"value\":[],\"version\":1}],\"node_varnames\":[{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"ints1_insert\",\"version\":1},{\"value\":\"ints1\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"ints2_insert\",\"version\":1},{\"value\":\"ints2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":\"result_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"result2_insert\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_2\",\"version\":1},{\"value\":\"join_2\",\"version\":1},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":null,\"version\":0},{\"value\":\"join_5\",\"version\":1},{\"value\":\"join_5\",\"version\":1}],\"subgraph_laziness\":[{\"value\":null,\"version\":0}]}", ); @@ -15,42 +15,42 @@ fn main() { let (hoff_1v3_send, hoff_1v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(1v3)"); let (hoff_4v3_send, hoff_4v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(4v3)"); let (hoff_7v3_send, hoff_7v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(7v3)"); let (hoff_9v3_send, hoff_9v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(9v3)"); let (hoff_10v3_send, hoff_10v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(10v3)"); let (hoff_12v3_send, hoff_12v3_recv) = df .make_edge::< _, - hydroflow::scheduled::handoff::VecHandoff<_>, + dfir_rs::scheduled::handoff::VecHandoff<_>, >("handoff GraphNodeId(12v3)"); let mut sg_1v1_node_13v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -60,21 +60,21 @@ fn main() { let sg_1v1_node_2v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let mut sg_2v1_node_14v1_stream = { #[inline(always)] fn check_stream< - Stream: hydroflow::futures::stream::Stream + Stream: dfir_rs::futures::stream::Stream + ::std::marker::Unpin, Item, >( stream: Stream, - ) -> impl hydroflow::futures::stream::Stream< + ) -> impl dfir_rs::futures::stream::Stream< Item = Item, > + ::std::marker::Unpin { stream @@ -84,81 +84,81 @@ fn main() { let sg_2v1_node_5v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_3v1_node_22v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), ), ); let sg_3v1_node_8v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_4v1_node_29v1_groupbydata = df .add_state( ::std::cell::RefCell::new( - hydroflow::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), + dfir_rs::rustc_hash::FxHashMap::<(), (Option<_>,)>::default(), ), ); let sg_4v1_node_11v1_uniquedata = df .add_state( ::std::cell::RefCell::new( - hydroflow::util::monotonic_map::MonotonicMap::< + dfir_rs::util::monotonic_map::MonotonicMap::< _, - hydroflow::rustc_hash::FxHashSet<_>, + dfir_rs::rustc_hash::FxHashSet<_>, >::default(), ), ); let sg_5v1_node_17v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_5v1_node_17v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_5v1_node_17v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_5v1_node_17v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_6v1_node_24v1_joindata_lhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_6v1_node_24v1_joindata_lhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); let sg_6v1_node_24v1_joindata_rhs = df .add_state( ::std::cell::RefCell::new( - hydroflow::compiled::pull::HalfMultisetJoinState::default(), + dfir_rs::compiled::pull::HalfMultisetJoinState::default(), ), ); df.set_state_tick_hook( sg_6v1_node_24v1_joindata_rhs, - |rcell| hydroflow::util::clear::Clear::clear(rcell.get_mut()), + |rcell| dfir_rs::util::clear::Clear::clear(rcell.get_mut()), ); df.add_subgraph_stratified( "Subgraph GraphSubgraphId(1v1)", @@ -167,18 +167,18 @@ fn main() { var_expr!(hoff_7v3_send, hoff_12v3_send), false, move |context, var_args!(), var_args!(hoff_7v3_send, hoff_12v3_send)| { - let hoff_7v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_7v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_7v3_send.give(Some(v)); }); - let hoff_12v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_12v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_12v3_send.give(Some(v)); }); let op_13v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_1v1_node_13v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -267,7 +267,7 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; - let op_3v1 = hydroflow::pusherator::tee::Tee::new( + let op_3v1 = dfir_rs::pusherator::tee::Tee::new( hoff_12v3_send, hoff_7v3_send, ); @@ -276,21 +276,21 @@ fn main() { #[inline(always)] pub fn op_3v1__tee__loc_nopath_2_19_2_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -304,10 +304,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_1v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_1v1(op_2v1, op_3v1); }, @@ -319,18 +319,18 @@ fn main() { var_expr!(hoff_4v3_send, hoff_9v3_send), false, move |context, var_args!(), var_args!(hoff_4v3_send, hoff_9v3_send)| { - let hoff_4v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_4v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_4v3_send.give(Some(v)); }); - let hoff_9v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_9v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_9v3_send.give(Some(v)); }); let op_14v1 = std::iter::from_fn(|| { - match hydroflow::futures::stream::Stream::poll_next( + match dfir_rs::futures::stream::Stream::poll_next( ::std::pin::Pin::new(&mut sg_2v1_node_14v1_stream), &mut std::task::Context::from_waker(&context.waker()), ) { @@ -419,7 +419,7 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_24(op_5v1) }; - let op_6v1 = hydroflow::pusherator::tee::Tee::new( + let op_6v1 = dfir_rs::pusherator::tee::Tee::new( hoff_9v3_send, hoff_4v3_send, ); @@ -428,21 +428,21 @@ fn main() { #[inline(always)] pub fn op_6v1__tee__loc_nopath_3_19_3_24< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -456,10 +456,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_2v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_2v1(op_5v1, op_6v1); }, @@ -637,7 +637,7 @@ fn main() { } op_8v1__unique__loc_nopath_5_20_5_26(op_8v1) }; - let op_15v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_15v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result.send(v).unwrap() }); let op_15v1 = { @@ -645,21 +645,21 @@ fn main() { #[inline(always)] pub fn op_15v1__for_each__loc_nopath_5_28_5_65< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -673,10 +673,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_3v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_3v1(op_8v1, op_15v1); }, @@ -728,8 +728,8 @@ fn main() { |old: &mut (Option<_>,), val: (_,)| { old.0 = if let Some(prev) = old.0.take() { Some({ - let prev: (hydroflow::rustc_hash::FxHashSet<_>, _) = prev; - let mut set: hydroflow::rustc_hash::FxHashSet<_> = prev.0; + let prev: (dfir_rs::rustc_hash::FxHashSet<_>, _) = prev; + let mut set: dfir_rs::rustc_hash::FxHashSet<_> = prev.0; if set.insert(val.0) { (set, prev.1 + 1) } else { @@ -738,7 +738,7 @@ fn main() { }) } else { Some({ - let mut set = hydroflow::rustc_hash::FxHashSet::< + let mut set = dfir_rs::rustc_hash::FxHashSet::< _, >::default(); set.insert(val.0); @@ -868,7 +868,7 @@ fn main() { } op_11v1__unique__loc_nopath_6_20_6_27(op_11v1) }; - let op_16v1 = hydroflow::pusherator::for_each::ForEach::new(|v| { + let op_16v1 = dfir_rs::pusherator::for_each::ForEach::new(|v| { result2.send(v).unwrap() }); let op_16v1 = { @@ -876,21 +876,21 @@ fn main() { #[inline(always)] pub fn op_16v1__for_each__loc_nopath_6_29_6_67< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, >( input: Input, - ) -> impl hydroflow::pusherator::Pusherator { + ) -> impl dfir_rs::pusherator::Pusherator { #[repr(transparent)] struct Push< Item, - Input: hydroflow::pusherator::Pusherator, + Input: dfir_rs::pusherator::Pusherator, > { inner: Input, } impl< Item, - Input: hydroflow::pusherator::Pusherator, - > hydroflow::pusherator::Pusherator for Push { + Input: dfir_rs::pusherator::Pusherator, + > dfir_rs::pusherator::Pusherator for Push { type Item = Item; #[inline(always)] fn give(&mut self, item: Self::Item) { @@ -904,10 +904,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_4v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_4v1(op_11v1, op_16v1); }, @@ -927,7 +927,7 @@ fn main() { let hoff_9v3_recv = hoff_9v3_recv.drain(..); let mut hoff_12v3_recv = hoff_12v3_recv.borrow_mut_swap(); let hoff_12v3_recv = hoff_12v3_recv.drain(..); - let hoff_10v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_10v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_10v3_send.give(Some(v)); @@ -1017,12 +1017,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -1036,7 +1036,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -1162,10 +1162,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_5v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_5v1(op_21v1, hoff_10v3_send); }, @@ -1185,7 +1185,7 @@ fn main() { let hoff_4v3_recv = hoff_4v3_recv.drain(..); let mut hoff_7v3_recv = hoff_7v3_recv.borrow_mut_swap(); let hoff_7v3_recv = hoff_7v3_recv.drain(..); - let hoff_1v3_send = hydroflow::pusherator::for_each::ForEach::new(| + let hoff_1v3_send = dfir_rs::pusherator::for_each::ForEach::new(| v| { hoff_1v3_send.give(Some(v)); @@ -1275,12 +1275,12 @@ fn main() { fn check_inputs<'a, K, I1, V1, I2, V2>( lhs: I1, rhs: I2, - lhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + lhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V1, V2, >, - rhs_state: &'a mut hydroflow::compiled::pull::HalfMultisetJoinState< + rhs_state: &'a mut dfir_rs::compiled::pull::HalfMultisetJoinState< K, V2, V1, @@ -1294,7 +1294,7 @@ fn main() { I1: 'a + Iterator, I2: 'a + Iterator, { - hydroflow::compiled::pull::symmetric_hash_join_into_iter( + dfir_rs::compiled::pull::symmetric_hash_join_into_iter( lhs, rhs, lhs_state, @@ -1420,10 +1420,10 @@ fn main() { #[inline(always)] fn pivot_run_sg_6v1< Pull: ::std::iter::Iterator, - Push: hydroflow::pusherator::Pusherator, + Push: dfir_rs::pusherator::Pusherator, Item, >(pull: Pull, push: Push) { - hydroflow::pusherator::pivot::Pivot::new(pull, push).run(); + dfir_rs::pusherator::pivot::Pivot::new(pull, push).run(); } pivot_run_sg_6v1(op_28v1, hoff_1v3_send); }, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap similarity index 98% rename from hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap rename to dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap index 1a863c44c0c4..d3cbc73a8aa8 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap +++ b/dfir_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@surface_graph.snap @@ -1,5 +1,5 @@ --- -source: hydroflow_datalog_core/src/lib.rs +source: dfir_datalog_core/src/lib.rs expression: flat_graph_ref.surface_syntax_string() --- 2v1 = unique :: < 'tick > (); diff --git a/hydroflow_datalog_core/src/util.rs b/dfir_datalog_core/src/util.rs similarity index 100% rename from hydroflow_datalog_core/src/util.rs rename to dfir_datalog_core/src/util.rs diff --git a/hydroflow_lang/CHANGELOG.md b/dfir_lang/CHANGELOG.md similarity index 100% rename from hydroflow_lang/CHANGELOG.md rename to dfir_lang/CHANGELOG.md diff --git a/hydroflow_lang/Cargo.toml b/dfir_lang/Cargo.toml similarity index 87% rename from hydroflow_lang/Cargo.toml rename to dfir_lang/Cargo.toml index 256d2b9269bb..3f7b2d7daaa6 100644 --- a/hydroflow_lang/Cargo.toml +++ b/dfir_lang/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "hydroflow_lang" +name = "dfir_lang" publish = true version = "0.10.0" edition = "2021" license = "Apache-2.0" -documentation = "https://docs.rs/hydroflow_lang/" -description = "Hydroflow's Surface Syntax implementation" +documentation = "https://docs.rs/dfir_lang/" +description = "Hydro's Data Flow Intermediate Representation (DFIR) implementation" [lints] workspace = true diff --git a/hydroflow_lang/build.rs b/dfir_lang/build.rs similarity index 91% rename from hydroflow_lang/build.rs rename to dfir_lang/build.rs index fe39425917ac..898e63525c59 100644 --- a/hydroflow_lang/build.rs +++ b/dfir_lang/build.rs @@ -24,7 +24,7 @@ fn main() { if Err(VarError::NotPresent) != var("CARGO_CFG_HYDROFLOW_GENERATE_DOCS") { if let Err(err) = generate_op_docs() { - eprintln!("hydroflow_lang/build.rs error: {:?}", err); + eprintln!("dfir_lang/build.rs error: {:?}", err); } } } @@ -74,7 +74,7 @@ fn generate_op_docs() -> Result<()> { ]); eprintln!("{:?}", docgen_path); let mut docgen_write = BufWriter::new(File::create(docgen_path)?); - writeln!(docgen_write, "")?; + writeln!(docgen_write, "")?; let mut in_hf_doctest = false; for attr in item_const.attrs.iter() { @@ -106,7 +106,7 @@ fn generate_op_docs() -> Result<()> { in_hf_doctest = false; writeln!(docgen_write, "{}", DOCTEST_HYDROFLOW_SUFFIX)?; // Output `doc_str` below. - } else if doc_str.trim() == "```hydroflow" { + } else if doc_str.trim() == "```dfir" { in_hf_doctest = true; writeln!(docgen_write, "```rust")?; @@ -132,9 +132,9 @@ fn generate_op_docs() -> Result<()> { 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 __rt = ::dfir_rs::tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap(); +# __rt.block_on(async { ::dfir_rs::tokio::task::LocalSet::new().run_until(async { +# let mut __hf = ::dfir_rs::dfir_syntax! {"; const DOCTEST_HYDROFLOW_SUFFIX: &str = "\ # }; # __hf.run_available(); diff --git a/hydroflow_lang/src/diagnostic.rs b/dfir_lang/src/diagnostic.rs similarity index 100% rename from hydroflow_lang/src/diagnostic.rs rename to dfir_lang/src/diagnostic.rs diff --git a/hydroflow_lang/src/graph/di_mul_graph.rs b/dfir_lang/src/graph/di_mul_graph.rs similarity index 100% rename from hydroflow_lang/src/graph/di_mul_graph.rs rename to dfir_lang/src/graph/di_mul_graph.rs diff --git a/hydroflow_lang/src/graph/eliminate_extra_unions_tees.rs b/dfir_lang/src/graph/eliminate_extra_unions_tees.rs similarity index 86% rename from hydroflow_lang/src/graph/eliminate_extra_unions_tees.rs rename to dfir_lang/src/graph/eliminate_extra_unions_tees.rs index 7fc5acc68ddf..400d120041c5 100644 --- a/hydroflow_lang/src/graph/eliminate_extra_unions_tees.rs +++ b/dfir_lang/src/graph/eliminate_extra_unions_tees.rs @@ -2,10 +2,10 @@ use super::ops::tee::TEE; use super::ops::union::UNION; -use super::{GraphNodeId, HydroflowGraph}; +use super::{DfirGraph, GraphNodeId}; fn find_unary_ops<'a>( - graph: &'a HydroflowGraph, + graph: &'a DfirGraph, op_name: &'static str, ) -> impl 'a + Iterator { graph @@ -22,7 +22,7 @@ fn find_unary_ops<'a>( /// Removes missing unions and tees. Must be applied BEFORE subgraph partitioning, i.e. on a flat /// graph. -pub fn eliminate_extra_unions_tees(graph: &mut HydroflowGraph) { +pub fn eliminate_extra_unions_tees(graph: &mut DfirGraph) { let extra_ops = find_unary_ops(graph, UNION.name) .chain(find_unary_ops(graph, TEE.name)) .collect::>(); diff --git a/hydroflow_lang/src/graph/flat_graph_builder.rs b/dfir_lang/src/graph/flat_graph_builder.rs similarity index 98% rename from hydroflow_lang/src/graph/flat_graph_builder.rs rename to dfir_lang/src/graph/flat_graph_builder.rs index 8c01818c3142..6e82cb5f0dff 100644 --- a/hydroflow_lang/src/graph/flat_graph_builder.rs +++ b/dfir_lang/src/graph/flat_graph_builder.rs @@ -12,7 +12,7 @@ use syn::{Error, Ident, ItemUse}; use super::ops::defer_tick::DEFER_TICK; use super::ops::FloType; -use super::{GraphEdgeId, GraphLoopId, GraphNode, GraphNodeId, HydroflowGraph, PortIndexValue}; +use super::{DfirGraph, GraphEdgeId, GraphLoopId, GraphNode, GraphNodeId, PortIndexValue}; use crate::diagnostic::{Diagnostic, Level}; use crate::graph::graph_algorithms; use crate::graph::ops::{PortListSpec, RangeTrait}; @@ -54,14 +54,14 @@ impl VarnameInfo { } } -/// Wraper around [`HydroflowGraph`] to build a flat graph from AST code. +/// Wraper around [`DfirGraph`] to build a flat graph from AST code. #[derive(Debug, Default)] pub struct FlatGraphBuilder { /// Spanned error/warning/etc diagnostics to emit. diagnostics: Vec, /// HydroflowGraph being built. - flat_graph: HydroflowGraph, + flat_graph: DfirGraph, /// Variable names, used as [`HfStatement::Named`] are added. varname_ends: BTreeMap, /// Each (out -> inn) link inputted. @@ -94,12 +94,12 @@ impl FlatGraphBuilder { } } - /// Build into an unpartitioned [`HydroflowGraph`], returning a tuple of a `HydroflowGraph` and + /// Build into an unpartitioned [`DfirGraph`], returning a tuple of a `HydroflowGraph` and /// any diagnostics. /// /// Even if there are errors, the `HydroflowGraph` will be returned (potentially in a invalid /// state). Does not call `emit` on any diagnostics. - pub fn build(mut self) -> (HydroflowGraph, Vec, Vec) { + pub fn build(mut self) -> (DfirGraph, Vec, Vec) { self.connect_operator_links(); self.process_operator_errors(); @@ -370,7 +370,7 @@ impl FlatGraphBuilder { Span::call_site(), Level::Error, format!( - "Reached the recursion limit {} while resolving names. This is either a hydroflow bug or you have an absurdly long chain of names: `{}`.", + "Reached the recursion limit {} while resolving names. This is either a dfir bug or you have an absurdly long chain of names: `{}`.", BACKUP_RECURSION_LIMIT, names.iter().map(ToString::to_string).collect::>().join("` -> `"), ) diff --git a/hydroflow_lang/src/graph/flat_to_partitioned.rs b/dfir_lang/src/graph/flat_to_partitioned.rs similarity index 97% rename from hydroflow_lang/src/graph/flat_to_partitioned.rs rename to dfir_lang/src/graph/flat_to_partitioned.rs index 418c6b4b0300..7d6954b8eeb2 100644 --- a/hydroflow_lang/src/graph/flat_to_partitioned.rs +++ b/dfir_lang/src/graph/flat_to_partitioned.rs @@ -6,7 +6,7 @@ use proc_macro2::Span; use slotmap::{SecondaryMap, SparseSecondaryMap}; use syn::parse_quote; -use super::hydroflow_graph::HydroflowGraph; +use super::hydroflow_graph::DfirGraph; use super::ops::{find_node_op_constraints, DelayType}; use super::{graph_algorithms, Color, GraphEdgeId, GraphNode, GraphNodeId, GraphSubgraphId}; use crate::diagnostic::{Diagnostic, Level}; @@ -23,7 +23,7 @@ impl BarrierCrossers { /// Iterate pairs of nodes that are across a barrier. fn iter_node_pairs<'a>( &'a self, - partitioned_graph: &'a HydroflowGraph, + partitioned_graph: &'a DfirGraph, ) -> impl 'a + Iterator { let edge_pairs_iter = self .edge_barrier_crossers @@ -48,7 +48,7 @@ impl BarrierCrossers { } /// Find all the barrier crossers. -fn find_barrier_crossers(partitioned_graph: &HydroflowGraph) -> BarrierCrossers { +fn find_barrier_crossers(partitioned_graph: &DfirGraph) -> BarrierCrossers { let edge_barrier_crossers = partitioned_graph .edges() .filter_map(|(edge_id, (_src, dst))| { @@ -75,7 +75,7 @@ fn find_barrier_crossers(partitioned_graph: &HydroflowGraph) -> BarrierCrossers } fn find_subgraph_unionfind( - partitioned_graph: &HydroflowGraph, + partitioned_graph: &DfirGraph, barrier_crossers: &BarrierCrossers, ) -> (UnionFind, BTreeSet) { // Modality (color) of nodes, push or pull. @@ -151,7 +151,7 @@ fn find_subgraph_unionfind( /// after handoffs have already been inserted to partition subgraphs. /// This list of nodes in each subgraph are returned in topological sort order. fn make_subgraph_collect( - partitioned_graph: &HydroflowGraph, + partitioned_graph: &DfirGraph, mut subgraph_unionfind: UnionFind, ) -> SecondaryMap> { // We want the nodes of each subgraph to be listed in topo-sort order. @@ -187,7 +187,7 @@ fn make_subgraph_collect( /// Find subgraph and insert handoffs. /// Modifies barrier_crossers so that the edge OUT of an inserted handoff has /// the DelayType data. -fn make_subgraphs(partitioned_graph: &mut HydroflowGraph, barrier_crossers: &mut BarrierCrossers) { +fn make_subgraphs(partitioned_graph: &mut DfirGraph, barrier_crossers: &mut BarrierCrossers) { // Algorithm: // 1. Each node begins as its own subgraph. // 2. Collect edges. (Future optimization: sort so edges which should not be split across a handoff come first). @@ -294,7 +294,7 @@ fn can_connect_colorize( /// /// Returns an error if there is a cycle thru negation. fn find_subgraph_strata( - partitioned_graph: &mut HydroflowGraph, + partitioned_graph: &mut DfirGraph, barrier_crossers: &BarrierCrossers, ) -> Result<(), Diagnostic> { // Determine subgraphs's stratum number. @@ -466,7 +466,7 @@ fn find_subgraph_strata( /// Put `is_external_input: true` operators in separate stratum 0 subgraphs if they are not in stratum 0. /// By ripping them out of their subgraph/stratum if they're not already in statum 0. -fn separate_external_inputs(partitioned_graph: &mut HydroflowGraph) { +fn separate_external_inputs(partitioned_graph: &mut DfirGraph) { let external_input_nodes: Vec<_> = partitioned_graph .nodes() // Ensure node is an operator (not a handoff), get constraints spec. @@ -510,10 +510,10 @@ fn separate_external_inputs(partitioned_graph: &mut HydroflowGraph) { } } -/// Main method for this module. Partions a flat [`HydroflowGraph`] into one with subgraphs. +/// Main method for this module. Partions a flat [`DfirGraph`] into one with subgraphs. /// /// Returns an error if a negative cycle exists in the graph. Negative cycles prevent partioning. -pub fn partition_graph(flat_graph: HydroflowGraph) -> Result { +pub fn partition_graph(flat_graph: DfirGraph) -> Result { // Pre-find barrier crossers (input edges with a `DelayType`). let mut barrier_crossers = find_barrier_crossers(&flat_graph); let mut partitioned_graph = flat_graph; diff --git a/hydroflow_lang/src/graph/graph_algorithms.rs b/dfir_lang/src/graph/graph_algorithms.rs similarity index 100% rename from hydroflow_lang/src/graph/graph_algorithms.rs rename to dfir_lang/src/graph/graph_algorithms.rs diff --git a/hydroflow_lang/src/graph/graph_write.rs b/dfir_lang/src/graph/graph_write.rs similarity index 100% rename from hydroflow_lang/src/graph/graph_write.rs rename to dfir_lang/src/graph/graph_write.rs diff --git a/hydroflow_lang/src/graph/hydroflow_graph.rs b/dfir_lang/src/graph/hydroflow_graph.rs similarity index 99% rename from hydroflow_lang/src/graph/hydroflow_graph.rs rename to dfir_lang/src/graph/hydroflow_graph.rs index 13af7adb8e6e..b3cb5c91e21c 100644 --- a/hydroflow_lang/src/graph/hydroflow_graph.rs +++ b/dfir_lang/src/graph/hydroflow_graph.rs @@ -37,7 +37,7 @@ use crate::process_singletons; /// in here--those are just what was needed for the compilation algorithms. If you need another /// method then add it. #[derive(Default, Debug, Serialize, Deserialize)] -pub struct HydroflowGraph { +pub struct DfirGraph { /// Each node type (operator or handoff). nodes: SlotMap, @@ -78,7 +78,7 @@ pub struct HydroflowGraph { } /// Basic methods. -impl HydroflowGraph { +impl DfirGraph { /// Create a new empty `HydroflowGraph`. pub fn new() -> Self { Default::default() @@ -86,7 +86,7 @@ impl HydroflowGraph { } /// Node methods. -impl HydroflowGraph { +impl DfirGraph { /// Get a node with its operator instance (if applicable). pub fn node(&self, node_id: GraphNodeId) -> &GraphNode { self.nodes.get(node_id).expect("Node not found.") @@ -466,7 +466,7 @@ impl HydroflowGraph { } /// Singleton references. -impl HydroflowGraph { +impl DfirGraph { /// Set the singletons referenced for the `node_id` operator. Each reference corresponds to the /// same index in the [`crate::parse::Operator::singletons_referenced`] vec. pub fn set_node_singleton_references( @@ -489,7 +489,7 @@ impl HydroflowGraph { } /// Module methods. -impl HydroflowGraph { +impl DfirGraph { /// When modules are imported into a flat graph, they come with an input and output ModuleBoundary node. /// The partitioner doesn't understand these nodes and will panic if it encounters them. /// merge_modules removes them from the graph, stitching the input and ouput sides of the ModuleBondaries based on their ports @@ -584,7 +584,7 @@ impl HydroflowGraph { } /// Edge methods. -impl HydroflowGraph { +impl DfirGraph { /// Get the `src` and `dst` for an edge: `(src GraphNodeId, dst GraphNodeId)`. pub fn edge(&self, edge_id: GraphEdgeId) -> (GraphNodeId, GraphNodeId) { let (src, dst) = self.graph.edge(edge_id).expect("Edge not found."); @@ -634,7 +634,7 @@ impl HydroflowGraph { } /// Subgraph methods. -impl HydroflowGraph { +impl DfirGraph { /// Nodes belonging to the given subgraph. pub fn subgraph(&self, subgraph_id: GraphSubgraphId) -> &Vec { self.subgraph_nodes @@ -725,7 +725,7 @@ impl HydroflowGraph { } /// Display/output methods. -impl HydroflowGraph { +impl DfirGraph { /// Helper to generate a deterministic `Ident` for the given node. fn node_as_ident(&self, node_id: GraphNodeId, is_pred: bool) -> Ident { let name = match &self.nodes[node_id] { @@ -952,7 +952,7 @@ impl HydroflowGraph { // has the (unhygienic) resolution we want, an ident is just solely determined by its string name, // which is what you'd expect out of unhygienic proc macros like this. Meanwhile, declarative macros // use `Span::mixed_site()` which is weird and I don't understand it. It turns out that if you call - // the hydroflow syntax proc macro from _within_ a declarative macro then `op_span` will have the + // the dfir syntax proc macro from _within_ a declarative macro then `op_span` will have the // bad `Span::mixed_site()` name resolution and cause "Cannot find value `df/context`" errors. So // we call `.resolved_at()` to fix resolution back to `Span::call_site()`. -Mingwei let hydroflow = &Ident::new(HYDROFLOW, op_span.resolved_at(hf.span())); @@ -1204,7 +1204,7 @@ impl HydroflowGraph { use #root::{var_expr, var_args}; - let mut #hf = #root::scheduled::graph::Hydroflow::new(); + let mut #hf = #root::scheduled::graph::Dfir::new(); #hf.__assign_meta_graph(#meta_graph_json); #hf.__assign_diagnostics(#diagnostics_json); @@ -1535,7 +1535,7 @@ impl HydroflowGraph { } /// Loops -impl HydroflowGraph { +impl DfirGraph { /// Iterator over all loop IDs. pub fn loop_ids(&self) -> slotmap::basic::Keys<'_, GraphLoopId, Vec> { self.loop_nodes.keys() diff --git a/hydroflow_lang/src/graph/hydroflow_graph_debugging.rs b/dfir_lang/src/graph/hydroflow_graph_debugging.rs similarity index 96% rename from hydroflow_lang/src/graph/hydroflow_graph_debugging.rs rename to dfir_lang/src/graph/hydroflow_graph_debugging.rs index 368760380442..052f4030ff8d 100644 --- a/hydroflow_lang/src/graph/hydroflow_graph_debugging.rs +++ b/dfir_lang/src/graph/hydroflow_graph_debugging.rs @@ -4,9 +4,9 @@ use std::fmt::Write; use std::io::Result; use super::hydroflow_graph::WriteConfig; -use super::{HydroflowGraph, WriteGraphType}; +use super::{DfirGraph, WriteGraphType}; -impl HydroflowGraph { +impl DfirGraph { /// Opens this as a mermaid graph in the [mermaid.live](https://mermaid.live) browser editor. pub fn open_mermaid(&self, write_config: &WriteConfig) -> Result<()> { let mermaid_src = self.to_mermaid(write_config); diff --git a/hydroflow_lang/src/graph/mod.rs b/dfir_lang/src/graph/mod.rs similarity index 97% rename from hydroflow_lang/src/graph/mod.rs rename to dfir_lang/src/graph/mod.rs index d06ba21e8b31..7f5a144df33a 100644 --- a/hydroflow_lang/src/graph/mod.rs +++ b/dfir_lang/src/graph/mod.rs @@ -30,22 +30,22 @@ pub use di_mul_graph::DiMulGraph; pub use eliminate_extra_unions_tees::eliminate_extra_unions_tees; pub use flat_graph_builder::FlatGraphBuilder; pub use flat_to_partitioned::partition_graph; -pub use hydroflow_graph::{HydroflowGraph, WriteConfig, WriteGraphType}; +pub use hydroflow_graph::{DfirGraph, WriteConfig, WriteGraphType}; pub mod graph_algorithms; pub mod ops; new_key_type! { - /// ID to identify a node (operator or handoff) in [`HydroflowGraph`]. + /// ID to identify a node (operator or handoff) in [`DfirGraph`]. pub struct GraphNodeId; /// ID to identify an edge. pub struct GraphEdgeId; - /// ID to identify a subgraph in [`HydroflowGraph`]. + /// ID to identify a subgraph in [`DfirGraph`]. pub struct GraphSubgraphId; - /// ID to identify a loop block in [`HydroflowGraph`]. + /// ID to identify a loop block in [`DfirGraph`]. pub struct GraphLoopId; } @@ -370,12 +370,12 @@ impl Display for PortIndexValue { } } -/// The main function of this module. Compiles a [`HfCode`] AST into a [`HydroflowGraph`] and +/// The main function of this module. Compiles a [`HfCode`] AST into a [`DfirGraph`] and /// source code, or [`Diagnostic`] errors. pub fn build_hfcode( hf_code: HfCode, root: &TokenStream, -) -> (Option<(HydroflowGraph, TokenStream)>, Vec) { +) -> (Option<(DfirGraph, TokenStream)>, Vec) { let flat_graph_builder = FlatGraphBuilder::from_hfcode(hf_code); let (mut flat_graph, uses, mut diagnostics) = flat_graph_builder.build(); if !diagnostics.iter().any(Diagnostic::is_error) { diff --git a/hydroflow_lang/src/graph/ops/_lattice_fold_batch.rs b/dfir_lang/src/graph/ops/_lattice_fold_batch.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/_lattice_fold_batch.rs rename to dfir_lang/src/graph/ops/_lattice_fold_batch.rs index 4bdecb0c7858..9c50ad2c92ed 100644 --- a/hydroflow_lang/src/graph/ops/_lattice_fold_batch.rs +++ b/dfir_lang/src/graph/ops/_lattice_fold_batch.rs @@ -16,7 +16,7 @@ use super::{ /// `input` is the input data flow. Data that is delivered on this input is collected in order inside of the `_lattice_fold_batch` operator. /// When anything is sent to `signal` the collected data is released downstream. The entire `signal` input is consumed each tick, so sending 5 things on `signal` will not release inputs on the next 5 consecutive ticks. /// -/// ```hydroflow +/// ```dfir /// use lattices::set_union::SetUnionHashSet; /// use lattices::set_union::SetUnionSingletonSet; /// diff --git a/hydroflow_lang/src/graph/ops/_lattice_join_fused_join.rs b/dfir_lang/src/graph/ops/_lattice_join_fused_join.rs similarity index 95% rename from hydroflow_lang/src/graph/ops/_lattice_join_fused_join.rs rename to dfir_lang/src/graph/ops/_lattice_join_fused_join.rs index f777acef489b..66c21e03ba0a 100644 --- a/hydroflow_lang/src/graph/ops/_lattice_join_fused_join.rs +++ b/dfir_lang/src/graph/ops/_lattice_join_fused_join.rs @@ -15,7 +15,7 @@ use super::{ /// lattices. You can (non-monotonically) "reveal" these as tuples if desired via [`map`](#map); see the examples below. /// /// You must specify the the accumulating lattice types, they cannot be inferred. The first type argument corresponds to the `[0]` input of the join, and the second to the `[1]` input. -/// Type arguments are specified in hydroflow using the rust turbofish syntax `::<>`, for example `_lattice_join_fused_join::, Max<_>>()` +/// Type arguments are specified in dfir using the rust turbofish syntax `::<>`, for example `_lattice_join_fused_join::, Max<_>>()` /// The accumulating lattice type is not necessarily the same type as the input, see the below example involving SetUnion for such a case. /// /// Like [`join`](#join), `_lattice_join_fused_join` can also be provided with one or two generic lifetime persistence arguments, either @@ -31,7 +31,7 @@ use super::{ /// It is important to specify all persistence arguments before any type arguments, otherwise the persistence arguments will be ignored. /// /// The syntax is as follows: -/// ```hydroflow,ignore +/// ```dfir,ignore /// _lattice_join_fused_join::, MaxRepr>(); // Or /// _lattice_join_fused_join::<'static, MaxRepr, MaxRepr>(); /// @@ -45,9 +45,9 @@ use super::{ /// /// ### Examples /// -/// ```hydroflow -/// use hydroflow::lattices::Min; -/// use hydroflow::lattices::Max; +/// ```dfir +/// use dfir_rs::lattices::Min; +/// use dfir_rs::lattices::Max; /// /// source_iter([("key", Min::new(1)), ("key", Min::new(2))]) -> [0]my_join; /// source_iter([("key", Max::new(1)), ("key", Max::new(2))]) -> [1]my_join; @@ -60,9 +60,9 @@ use super::{ /// -> assert_eq([("key", (Min::new(1), Max::new(2)))]); /// ``` /// -/// ```hydroflow -/// use hydroflow::lattices::set_union::SetUnionSingletonSet; -/// use hydroflow::lattices::set_union::SetUnionHashSet; +/// ```dfir +/// use dfir_rs::lattices::set_union::SetUnionSingletonSet; +/// use dfir_rs::lattices::set_union::SetUnionHashSet; /// /// source_iter([("key", SetUnionSingletonSet::new_from(0)), ("key", SetUnionSingletonSet::new_from(1))]) -> [0]my_join; /// source_iter([("key", SetUnionHashSet::new_from([0])), ("key", SetUnionHashSet::new_from([1]))]) -> [1]my_join; diff --git a/hydroflow_lang/src/graph/ops/all_once.rs b/dfir_lang/src/graph/ops/all_once.rs similarity index 100% rename from hydroflow_lang/src/graph/ops/all_once.rs rename to dfir_lang/src/graph/ops/all_once.rs diff --git a/hydroflow_lang/src/graph/ops/anti_join.rs b/dfir_lang/src/graph/ops/anti_join.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/anti_join.rs rename to dfir_lang/src/graph/ops/anti_join.rs index c80f6384fd45..2285c5fb643f 100644 --- a/hydroflow_lang/src/graph/ops/anti_join.rs +++ b/dfir_lang/src/graph/ops/anti_join.rs @@ -17,7 +17,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// is preserved for new elements in a given tick, but not for elements processed /// in a previous tick with `'static`. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("dog", 1), ("cat", 2), ("elephant", 3)]) -> [pos]diff; /// source_iter(vec!["dog", "cat", "gorilla"]) -> [neg]diff; /// diff = anti_join() -> assert_eq([("elephant", 3)]); diff --git a/hydroflow_lang/src/graph/ops/anti_join_multiset.rs b/dfir_lang/src/graph/ops/anti_join_multiset.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/anti_join_multiset.rs rename to dfir_lang/src/graph/ops/anti_join_multiset.rs index 0c37c202d48a..c9c749f5a133 100644 --- a/hydroflow_lang/src/graph/ops/anti_join_multiset.rs +++ b/dfir_lang/src/graph/ops/anti_join_multiset.rs @@ -17,7 +17,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// so duplicated positive inputs will appear in the output either 0 times (if matched in `neg`) /// or as many times as they appear in the input (if not matched in `neg`) /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("cat", 2), ("cat", 2), ("elephant", 3), ("elephant", 3)]) -> [pos]diff; /// source_iter(vec!["dog", "cat", "gorilla"]) -> [neg]diff; /// diff = anti_join_multiset() -> assert_eq([("elephant", 3), ("elephant", 3)]); diff --git a/hydroflow_lang/src/graph/ops/assert.rs b/dfir_lang/src/graph/ops/assert.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/assert.rs rename to dfir_lang/src/graph/ops/assert.rs index de859d5dddd7..4c67618b1f86 100644 --- a/hydroflow_lang/src/graph/ops/assert.rs +++ b/dfir_lang/src/graph/ops/assert.rs @@ -9,7 +9,7 @@ use super::{ /// /// If the predicate returns false for any input item then the operator will panic at runtime. /// -/// ```hydroflow +/// ```dfir /// source_iter([1, 2, 3]) /// -> assert(|x| *x > 0) /// -> assert_eq([1, 2, 3]); diff --git a/hydroflow_lang/src/graph/ops/assert_eq.rs b/dfir_lang/src/graph/ops/assert_eq.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/assert_eq.rs rename to dfir_lang/src/graph/ops/assert_eq.rs index 2d08e58fcc70..14b0a153834b 100644 --- a/hydroflow_lang/src/graph/ops/assert_eq.rs +++ b/dfir_lang/src/graph/ops/assert_eq.rs @@ -13,11 +13,11 @@ use super::{ /// /// The input stream is passed through `assert_eq` unchanged to the output stream. /// -/// `assert_eq` is mainly useful for testing and documenting the behavior of hydroflow code inline. +/// `assert_eq` is mainly useful for testing and documenting the behavior of dfir code inline. /// /// `assert_eq` will remember the stream position across ticks, see example. /// -/// ```hydroflow +/// ```dfir /// unioned = union(); /// /// source_iter([1]) -> assert_eq([1]) -> unioned; diff --git a/hydroflow_lang/src/graph/ops/batch.rs b/dfir_lang/src/graph/ops/batch.rs similarity index 100% rename from hydroflow_lang/src/graph/ops/batch.rs rename to dfir_lang/src/graph/ops/batch.rs diff --git a/hydroflow_lang/src/graph/ops/chain.rs b/dfir_lang/src/graph/ops/chain.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/chain.rs rename to dfir_lang/src/graph/ops/chain.rs index 3ff9c90fdec4..bc5d41d7f34b 100644 --- a/hydroflow_lang/src/graph/ops/chain.rs +++ b/dfir_lang/src/graph/ops/chain.rs @@ -11,7 +11,7 @@ use super::{ /// Since `chain` has multiple input streams, it needs to be assigned to /// a variable to reference its multiple input ports across statements. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["hello", "world"]) -> [0]my_chain; /// source_iter(vec!["stay", "gold"]) -> [1]my_chain; /// my_chain = chain() diff --git a/hydroflow_lang/src/graph/ops/cross_join.rs b/dfir_lang/src/graph/ops/cross_join.rs similarity index 94% rename from hydroflow_lang/src/graph/ops/cross_join.rs rename to dfir_lang/src/graph/ops/cross_join.rs index c22d0225bc7a..1cd40f4ebc48 100644 --- a/hydroflow_lang/src/graph/ops/cross_join.rs +++ b/dfir_lang/src/graph/ops/cross_join.rs @@ -8,7 +8,7 @@ use super::{OperatorCategory, OperatorConstraints, WriteContextArgs, RANGE_1}; /// Forms the cross-join (Cartesian product) of the items in the input streams, returning all /// tupled pairs. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["happy", "sad"]) -> [0]my_join; /// source_iter(vec!["dog", "cat"]) -> [1]my_join; /// my_join = cross_join() -> assert_eq([("happy", "dog"), ("sad", "dog"), ("happy", "cat"), ("sad", "cat")]); @@ -18,8 +18,8 @@ use super::{OperatorCategory, OperatorConstraints, WriteContextArgs, RANGE_1}; /// in the same way as [`join`](#join), see [`join`'s documentation](#join) for more info. /// /// ```rustbook -/// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<&str>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<&str>(); +/// let mut flow = dfir_rs::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/cross_join_multiset.rs b/dfir_lang/src/graph/ops/cross_join_multiset.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/cross_join_multiset.rs rename to dfir_lang/src/graph/ops/cross_join_multiset.rs index 5708800bcb28..d44811875974 100644 --- a/hydroflow_lang/src/graph/ops/cross_join_multiset.rs +++ b/dfir_lang/src/graph/ops/cross_join_multiset.rs @@ -8,7 +8,7 @@ use super::{OperatorCategory, OperatorConstraints, WriteContextArgs, RANGE_1}; /// Forms the multiset cross-join (Cartesian product) of the (possibly duplicated) items in the input streams, returning all /// tupled pairs regardless of duplicates. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["happy", "happy", "sad"]) -> [0]my_join; /// source_iter(vec!["dog", "cat", "cat"]) -> [1]my_join; /// my_join = cross_join_multiset() -> sort() -> assert_eq([ diff --git a/hydroflow_lang/src/graph/ops/cross_singleton.rs b/dfir_lang/src/graph/ops/cross_singleton.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/cross_singleton.rs rename to dfir_lang/src/graph/ops/cross_singleton.rs index 6d4b3757e667..ab6479321e21 100644 --- a/hydroflow_lang/src/graph/ops/cross_singleton.rs +++ b/dfir_lang/src/graph/ops/cross_singleton.rs @@ -19,7 +19,7 @@ use crate::graph::PortIndexValue; /// There are two inputs to `cross_singleton`, they are `input` and `single`. /// `input` is the input data flow, and `single` is the singleton input. /// -/// ```hydroflow +/// ```dfir /// join = cross_singleton(); /// /// source_iter([1, 2, 3]) -> [input]join; diff --git a/hydroflow_lang/src/graph/ops/defer_signal.rs b/dfir_lang/src/graph/ops/defer_signal.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/defer_signal.rs rename to dfir_lang/src/graph/ops/defer_signal.rs index 2adb2b4a993d..b00ed11be98c 100644 --- a/hydroflow_lang/src/graph/ops/defer_signal.rs +++ b/dfir_lang/src/graph/ops/defer_signal.rs @@ -14,7 +14,7 @@ use super::{ /// `input` is the input data flow. Data that is delivered on this input is collected in order inside of the `defer_signal` operator. /// When anything is sent to `signal` the collected data is released downstream. The entire `signal` input is consumed each tick, so sending 5 things on `signal` will not release inputs on the next 5 consecutive ticks. /// -/// ```hydroflow +/// ```dfir /// gate = defer_signal(); /// /// source_iter([1, 2, 3]) -> [input]gate; diff --git a/hydroflow_lang/src/graph/ops/defer_tick.rs b/dfir_lang/src/graph/ops/defer_tick.rs similarity index 93% rename from hydroflow_lang/src/graph/ops/defer_tick.rs rename to dfir_lang/src/graph/ops/defer_tick.rs index 42c3d92ba8d8..01b32583988d 100644 --- a/hydroflow_lang/src/graph/ops/defer_tick.rs +++ b/dfir_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 = dfir_rs::dfir_syntax! { /// source_iter(vec!(true)) /// -> state; /// state = union() @@ -39,8 +39,8 @@ use super::{ /// tick. /// ```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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); +/// let mut flow = dfir_rs::dfir_syntax! { /// inp = source_stream(input_recv) -> tee(); /// inp -> [pos]diff; /// inp -> defer_tick() -> [neg]diff; diff --git a/hydroflow_lang/src/graph/ops/defer_tick_lazy.rs b/dfir_lang/src/graph/ops/defer_tick_lazy.rs similarity index 100% rename from hydroflow_lang/src/graph/ops/defer_tick_lazy.rs rename to dfir_lang/src/graph/ops/defer_tick_lazy.rs diff --git a/hydroflow_lang/src/graph/ops/demux.rs b/dfir_lang/src/graph/ops/demux.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/demux.rs rename to dfir_lang/src/graph/ops/demux.rs index bfedf7a9b8cc..f76412851470 100644 --- a/hydroflow_lang/src/graph/ops/demux.rs +++ b/dfir_lang/src/graph/ops/demux.rs @@ -27,7 +27,7 @@ use crate::pretty_span::PrettySpan; /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// my_demux = source_iter(1..=100) -> demux(|v, var_args!(fzbz, fizz, buzz, rest)| /// match (v % 3, v % 5) { /// (0, 0) => fzbz.give(v), diff --git a/hydroflow_lang/src/graph/ops/demux_enum.rs b/dfir_lang/src/graph/ops/demux_enum.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/demux_enum.rs rename to dfir_lang/src/graph/ops/demux_enum.rs index 8b612c243539..06c53927e2ca 100644 --- a/hydroflow_lang/src/graph/ops/demux_enum.rs +++ b/dfir_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_file.rs b/dfir_lang/src/graph/ops/dest_file.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/dest_file.rs rename to dfir_lang/src/graph/ops/dest_file.rs index 0067cd53242d..a76c74a66625 100644 --- a/hydroflow_lang/src/graph/ops/dest_file.rs +++ b/dfir_lang/src/graph/ops/dest_file.rs @@ -17,7 +17,7 @@ use super::{ /// /// Note this operator must be used within a Tokio runtime. /// -/// ```hydroflow +/// ```dfir /// source_iter(1..=10) -> map(|n| format!("Line {}", n)) -> dest_file("dest.txt", false); /// ``` pub const DEST_FILE: OperatorConstraints = OperatorConstraints { diff --git a/hydroflow_lang/src/graph/ops/dest_sink.rs b/dfir_lang/src/graph/ops/dest_sink.rs similarity index 95% rename from hydroflow_lang/src/graph/ops/dest_sink.rs rename to dfir_lang/src/graph/ops/dest_sink.rs index ee2f5b38d610..05a1428f6c33 100644 --- a/hydroflow_lang/src/graph/ops/dest_sink.rs +++ b/dfir_lang/src/graph/ops/dest_sink.rs @@ -14,10 +14,10 @@ use super::{ /// Note this operator must be used within a Tokio runtime, and the Hydroflow program must be launched with `run_async`. /// /// ```rustbook -/// # #[hydroflow::main] +/// # #[dfir_rs::main] /// # async fn main() { /// // In this example we use a _bounded_ channel for our `Sink`. This is for demonstration only, -/// // instead you should use [`hydroflow::util::unbounded_channel`]. A bounded channel results in +/// // instead you should use [`dfir_rs::util::unbounded_channel`]. A bounded channel results in /// // `Hydroflow` buffering items internally instead of within the channel. (We can't use /// // unbounded here since unbounded channels are synchonous to write to and therefore not /// // `Sink`s.) @@ -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 = dfir_rs::dfir_syntax! { /// source_iter(0..10) -> dest_sink(send); /// }; /// // Call `run_async()` to allow async events to propagate, run for one second. @@ -37,7 +37,7 @@ use super::{ /// // Only 5 elements received due to buffer size. /// // (Note that if we were using a multi-threaded executor instead of `current_thread` it would /// // be possible for more items to be added as they're removed, resulting in >5 collected.) -/// let out: Vec<_> = hydroflow::util::ready_iter(&mut recv).collect(); +/// let out: Vec<_> = dfir_rs::util::ready_iter(&mut recv).collect(); /// assert_eq!(&[0, 1, 2, 3, 4], &*out); /// # } /// ``` @@ -56,7 +56,7 @@ use super::{ /// `BytesCodec`. /// /// ```rustbook -/// # #[hydroflow::main] +/// # #[dfir_rs::main] /// # async fn main() { /// use bytes::Bytes; /// use tokio::io::AsyncReadExt; @@ -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 = dfir_rs::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/dfir_lang/src/graph/ops/dest_sink_serde.rs similarity index 89% rename from hydroflow_lang/src/graph/ops/dest_sink_serde.rs rename to dfir_lang/src/graph/ops/dest_sink_serde.rs index 78b8a7ceb5fb..b320f8e850e4 100644 --- a/hydroflow_lang/src/graph/ops/dest_sink_serde.rs +++ b/dfir_lang/src/graph/ops/dest_sink_serde.rs @@ -13,10 +13,10 @@ use super::{ /// Note this operator must be used within a Tokio runtime. /// ```rustbook /// async fn serde_out() { -/// 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 addr = dfir_rs::util::ipv4_resolve("localhost:9000".into()).unwrap(); +/// let (outbound, inbound, _) = dfir_rs::util::bind_udp_bytes(addr).await; +/// let remote = dfir_rs::util::ipv4_resolve("localhost:9001".into()).unwrap(); +/// let mut flow = dfir_rs::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/difference.rs b/dfir_lang/src/graph/ops/difference.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/difference.rs rename to dfir_lang/src/graph/ops/difference.rs index e2e8e83d2176..ead70920ff39 100644 --- a/hydroflow_lang/src/graph/ops/difference.rs +++ b/dfir_lang/src/graph/ops/difference.rs @@ -17,7 +17,7 @@ use super::{ /// /// Note set semantics only for the `neg` input. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["dog", "cat", "elephant"]) -> [pos]diff; /// source_iter(vec!["dog", "cat", "gorilla"]) -> [neg]diff; /// diff = difference() -> assert_eq(["elephant"]); diff --git a/hydroflow_lang/src/graph/ops/difference_multiset.rs b/dfir_lang/src/graph/ops/difference_multiset.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/difference_multiset.rs rename to dfir_lang/src/graph/ops/difference_multiset.rs index 603ffe05f3de..fd9df810690c 100644 --- a/hydroflow_lang/src/graph/ops/difference_multiset.rs +++ b/dfir_lang/src/graph/ops/difference_multiset.rs @@ -18,7 +18,7 @@ use super::{ /// Note multiset semantics here: each (possibly duplicated) item in the `pos` input /// that has no match in `neg` is sent to the output. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["cat", "cat", "elephant", "elephant"]) -> [pos]diff; /// source_iter(vec!["cat", "gorilla"]) -> [neg]diff; /// diff = difference_multiset() -> assert_eq(["elephant", "elephant"]); diff --git a/hydroflow_lang/src/graph/ops/enumerate.rs b/dfir_lang/src/graph/ops/enumerate.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/enumerate.rs rename to dfir_lang/src/graph/ops/enumerate.rs index c371870afc69..56d77ebdeb14 100644 --- a/hydroflow_lang/src/graph/ops/enumerate.rs +++ b/dfir_lang/src/graph/ops/enumerate.rs @@ -15,7 +15,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// restart at zero at the start of each tick. Otherwise `'static` will never reset /// and count monotonically upwards. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["hello", "world"]) /// -> enumerate() /// -> assert_eq([(0, "hello"), (1, "world")]); diff --git a/hydroflow_lang/src/graph/ops/filter.rs b/dfir_lang/src/graph/ops/filter.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/filter.rs rename to dfir_lang/src/graph/ops/filter.rs index bb2906f93fe7..91fef5bc834d 100644 --- a/hydroflow_lang/src/graph/ops/filter.rs +++ b/dfir_lang/src/graph/ops/filter.rs @@ -14,7 +14,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["hello", "world"]) -> filter(|x| x.starts_with('w')) /// -> assert_eq(["world"]); /// ``` diff --git a/hydroflow_lang/src/graph/ops/filter_map.rs b/dfir_lang/src/graph/ops/filter_map.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/filter_map.rs rename to dfir_lang/src/graph/ops/filter_map.rs index 19f912849b1e..8aab0bdf0828 100644 --- a/hydroflow_lang/src/graph/ops/filter_map.rs +++ b/dfir_lang/src/graph/ops/filter_map.rs @@ -11,7 +11,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["1", "hello", "world", "2"]) /// -> filter_map(|s| s.parse::().ok()) /// -> assert_eq([1, 2]); diff --git a/hydroflow_lang/src/graph/ops/flat_map.rs b/dfir_lang/src/graph/ops/flat_map.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/flat_map.rs rename to dfir_lang/src/graph/ops/flat_map.rs index 85aa66fb7ce5..d3bd553b33b8 100644 --- a/hydroflow_lang/src/graph/ops/flat_map.rs +++ b/dfir_lang/src/graph/ops/flat_map.rs @@ -14,7 +14,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// // should print out each character of each word on a separate line /// source_iter(vec!["hello", "world"]) /// -> flat_map(|x| x.chars()) diff --git a/hydroflow_lang/src/graph/ops/flatten.rs b/dfir_lang/src/graph/ops/flatten.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/flatten.rs rename to dfir_lang/src/graph/ops/flatten.rs index 533884da6570..ab225953e2cb 100644 --- a/hydroflow_lang/src/graph/ops/flatten.rs +++ b/dfir_lang/src/graph/ops/flatten.rs @@ -10,7 +10,7 @@ use super::{ /// For each item `i` passed in, treat `i` as an iterator and produce its items one by one. /// The type of the input items must be iterable. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![[1, 2], [3, 4], [5, 6]]) /// -> flatten() /// -> assert_eq([1, 2, 3, 4, 5, 6]); diff --git a/hydroflow_lang/src/graph/ops/fold.rs b/dfir_lang/src/graph/ops/fold.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/fold.rs rename to dfir_lang/src/graph/ops/fold.rs index 7072b08c2a68..bc62c303dabb 100644 --- a/hydroflow_lang/src/graph/ops/fold.rs +++ b/dfir_lang/src/graph/ops/fold.rs @@ -25,7 +25,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// will be aggregated with items arriving in later ticks. When not explicitly specified /// persistence defaults to `'tick`. /// -/// ```hydroflow +/// ```dfir /// // should print `Reassembled vector [1,2,3,4,5]` /// source_iter([1,2,3,4,5]) /// -> fold::<'tick>(Vec::new, |accum: &mut Vec<_>, elem| { diff --git a/hydroflow_lang/src/graph/ops/fold_keyed.rs b/dfir_lang/src/graph/ops/fold_keyed.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/fold_keyed.rs rename to dfir_lang/src/graph/ops/fold_keyed.rs index f91e3d2deadc..9d51f6f468c1 100644 --- a/hydroflow_lang/src/graph/ops/fold_keyed.rs +++ b/dfir_lang/src/graph/ops/fold_keyed.rs @@ -21,7 +21,7 @@ use super::{ /// /// > Note: The closures have access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter([("toy", 1), ("toy", 2), ("shoe", 11), ("shoe", 35), ("haberdashery", 7)]) /// -> fold_keyed(|| 0, |old: &mut u32, val: u32| *old += val) /// -> assert_eq([("toy", 3), ("shoe", 46), ("haberdashery", 7)]); @@ -37,7 +37,7 @@ use super::{ /// output value type `V2`. This is required when using `'static` persistence if the compiler /// cannot infer the types. /// -/// ```hydroflow +/// ```dfir /// source_iter([("toy", 1), ("toy", 2), ("shoe", 11), ("shoe", 35), ("haberdashery", 7)]) /// -> fold_keyed(|| 0, |old: &mut u32, val: u32| *old += val) /// -> assert_eq([("toy", 3), ("shoe", 46), ("haberdashery", 7)]); @@ -45,8 +45,8 @@ 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(&str, &str)>(); +/// let mut flow = dfir_rs::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/for_each.rs b/dfir_lang/src/graph/ops/for_each.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/for_each.rs rename to dfir_lang/src/graph/ops/for_each.rs index e087aa8eb149..2ee246498b83 100644 --- a/hydroflow_lang/src/graph/ops/for_each.rs +++ b/dfir_lang/src/graph/ops/for_each.rs @@ -14,7 +14,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["Hello", "World"]) /// -> for_each(|x| println!("{}", x)); /// ``` diff --git a/hydroflow_lang/src/graph/ops/identity.rs b/dfir_lang/src/graph/ops/identity.rs similarity index 97% rename from hydroflow_lang/src/graph/ops/identity.rs rename to dfir_lang/src/graph/ops/identity.rs index ffc1f44a4fcd..1eb1af0eb5d4 100644 --- a/hydroflow_lang/src/graph/ops/identity.rs +++ b/dfir_lang/src/graph/ops/identity.rs @@ -6,7 +6,7 @@ use super::{ /// /// For each item passed in, pass it out without any change. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["hello", "world"]) /// -> identity() /// -> assert_eq(["hello", "world"]); @@ -15,7 +15,7 @@ use super::{ /// You can also supply a type parameter `identity::()` to specify what items flow through the /// the pipeline. This can be useful for helping the compiler infer types. /// -/// ```hydroflow +/// ```dfir /// // Use type parameter to ensure items are `i32`s. /// source_iter(0..10) /// -> identity::() diff --git a/hydroflow_lang/src/graph/ops/initialize.rs b/dfir_lang/src/graph/ops/initialize.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/initialize.rs rename to dfir_lang/src/graph/ops/initialize.rs index e7dbe0834658..714d46b41a47 100644 --- a/hydroflow_lang/src/graph/ops/initialize.rs +++ b/dfir_lang/src/graph/ops/initialize.rs @@ -10,7 +10,7 @@ use super::{ /// /// Emits a single unit `()` at the start of the first tick. /// -/// ```hydroflow +/// ```dfir /// initialize() /// -> assert_eq([()]); /// ``` diff --git a/hydroflow_lang/src/graph/ops/inspect.rs b/dfir_lang/src/graph/ops/inspect.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/inspect.rs rename to dfir_lang/src/graph/ops/inspect.rs index bdf888d92a2d..fabe9800b140 100644 --- a/hydroflow_lang/src/graph/ops/inspect.rs +++ b/dfir_lang/src/graph/ops/inspect.rs @@ -14,7 +14,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter([1, 2, 3, 4]) /// -> inspect(|x| println!("{}", x)) /// -> assert_eq([1, 2, 3, 4]); diff --git a/hydroflow_lang/src/graph/ops/join.rs b/dfir_lang/src/graph/ops/join.rs similarity index 96% rename from hydroflow_lang/src/graph/ops/join.rs rename to dfir_lang/src/graph/ops/join.rs index 764dc9b8ea34..9b80a6631cfb 100644 --- a/hydroflow_lang/src/graph/ops/join.rs +++ b/dfir_lang/src/graph/ops/join.rs @@ -11,7 +11,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// /// Forms the equijoin of the tuples in the input streams by their first (key) attribute. Note that the result nests the 2nd input field (values) into a tuple in the 2nd output field. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("hello", "world"), ("stay", "gold"), ("hello", "world")]) -> [0]my_join; /// source_iter(vec![("hello", "cleveland")]) -> [1]my_join; /// my_join = join() @@ -30,7 +30,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// When no persistence arguments are applied it defaults to `'tick` for both. /// /// The syntax is as follows: -/// ```hydroflow,ignore +/// ```dfir,ignore /// join(); // Or /// join::<'static>(); /// @@ -49,8 +49,8 @@ use crate::diagnostic::{Diagnostic, Level}; /// ### Examples /// /// ```rustbook -/// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(&str, &str)>(); +/// let mut flow = dfir_rs::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)); @@ -66,8 +66,8 @@ use crate::diagnostic::{Diagnostic, Level}; /// --- /// /// ```rustbook -/// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(&str, &str)>(); +/// let mut flow = dfir_rs::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/join_fused.rs b/dfir_lang/src/graph/ops/join_fused.rs similarity index 97% rename from hydroflow_lang/src/graph/ops/join_fused.rs rename to dfir_lang/src/graph/ops/join_fused.rs index 867310d674a1..519f8a83371e 100644 --- a/hydroflow_lang/src/graph/ops/join_fused.rs +++ b/dfir_lang/src/graph/ops/join_fused.rs @@ -16,7 +16,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// `Fold`: if the input type is different from the accumulator type, and the accumulator type has a sensible default value, and /// `FoldFrom`: if the input type is different from the accumulator type, and the accumulator needs to be derived from the first input value. /// Examples of all three configuration options are below: -/// ```hydroflow,ignore +/// ```dfir,ignore /// // Left hand side input will use fold, right hand side input will use reduce, /// join_fused(Fold(|| "default value", |x, y| *x += y), Reduce(|x, y| *x -= y)) /// @@ -25,11 +25,11 @@ use crate::diagnostic::{Diagnostic, Level}; /// ``` /// The three currently supported fused operator types are `Fold(Fn() -> A, Fn(A, T) -> A)`, `Reduce(Fn(A, A) -> A)`, and `FoldFrom(Fn(T) -> A, Fn(A, T) -> A)` /// -/// `join_fused` first performs a fold_keyed/reduce_keyed operation on each input stream before performing joining. See `join()`. There is currently no equivalent for `FoldFrom` in hydroflow operators. +/// `join_fused` first performs a fold_keyed/reduce_keyed operation on each input stream before performing joining. See `join()`. There is currently no equivalent for `FoldFrom` in dfir operators. /// -/// For example, the following two hydroflow programs are equivalent, the former would optimize into the latter: +/// For example, the following two dfir programs are equivalent, the former would optimize into the latter: /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("key", 0), ("key", 1), ("key", 2)]) /// -> reduce_keyed(|x: &mut _, y| *x += y) /// -> [0]my_join; @@ -40,7 +40,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// -> assert_eq([("key", (3, 6))]); /// ``` /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("key", 0), ("key", 1), ("key", 2)]) /// -> [0]my_join; /// source_iter(vec![("key", 2), ("key", 3)]) @@ -51,7 +51,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// /// Here is an example of using FoldFrom to derive the accumulator from the first value: /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("key", 0), ("key", 1), ("key", 2)]) /// -> [0]my_join; /// source_iter(vec![("key", 2), ("key", 3)]) @@ -69,7 +69,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// This means that it behaves identically to if `persist::<'static>()` were placed before the inputs and the persistence of /// for example, the two following examples have identical behavior: /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("key", 0), ("key", 1), ("key", 2)]) -> persist::<'static>() -> [0]my_join; /// source_iter(vec![("key", 2)]) -> my_union; /// source_iter(vec![("key", 3)]) -> defer_tick() -> my_union; @@ -79,7 +79,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// -> assert_eq([("key", (3, 2)), ("key", (3, 6))]); /// ``` /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![("key", 0), ("key", 1), ("key", 2)]) -> [0]my_join; /// source_iter(vec![("key", 2)]) -> my_union; /// source_iter(vec![("key", 3)]) -> defer_tick() -> my_union; diff --git a/hydroflow_lang/src/graph/ops/join_fused_lhs.rs b/dfir_lang/src/graph/ops/join_fused_lhs.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/join_fused_lhs.rs rename to dfir_lang/src/graph/ops/join_fused_lhs.rs index 198e0bdb0806..4d2566969b8e 100644 --- a/hydroflow_lang/src/graph/ops/join_fused_lhs.rs +++ b/dfir_lang/src/graph/ops/join_fused_lhs.rs @@ -16,7 +16,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// This means that `join_fused_lhs` only takes one argument input, which is the reducing/folding operation for the left hand side only. /// /// For example: -/// ```hydroflow +/// ```dfir /// source_iter(vec![("key", 0), ("key", 1), ("key", 2)]) -> [0]my_join; /// source_iter(vec![("key", 2), ("key", 3)]) -> [1]my_join; /// my_join = join_fused_lhs(Reduce(|x, y| *x += y)) diff --git a/hydroflow_lang/src/graph/ops/join_fused_rhs.rs b/dfir_lang/src/graph/ops/join_fused_rhs.rs similarity index 100% rename from hydroflow_lang/src/graph/ops/join_fused_rhs.rs rename to dfir_lang/src/graph/ops/join_fused_rhs.rs diff --git a/hydroflow_lang/src/graph/ops/join_multiset.rs b/dfir_lang/src/graph/ops/join_multiset.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/join_multiset.rs rename to dfir_lang/src/graph/ops/join_multiset.rs index 338dac329b60..961cf60b9c0d 100644 --- a/hydroflow_lang/src/graph/ops/join_multiset.rs +++ b/dfir_lang/src/graph/ops/join_multiset.rs @@ -13,7 +13,7 @@ use super::{ /// duplicates eliminated from the inputs, use the [`join`](#join) operator. /// /// For example: -/// ```hydroflow +/// ```dfir /// lhs = source_iter([("a", 0), ("a", 0)]) -> tee(); /// rhs = source_iter([("a", "hydro")]) -> tee(); /// diff --git a/hydroflow_lang/src/graph/ops/lattice_bimorphism.rs b/dfir_lang/src/graph/ops/lattice_bimorphism.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/lattice_bimorphism.rs rename to dfir_lang/src/graph/ops/lattice_bimorphism.rs index 176258ae3331..5fa9c7334b01 100644 --- a/hydroflow_lang/src/graph/ops/lattice_bimorphism.rs +++ b/dfir_lang/src/graph/ops/lattice_bimorphism.rs @@ -16,7 +16,7 @@ use super::{ /// /// The function must be a lattice bimorphism for both `(LhsState, RhsItem)` and `(RhsState, LhsItem)`. /// -/// ```hydroflow +/// ```dfir /// use std::collections::HashSet; /// use lattices::set_union::{CartesianProductBimorphism, SetUnionHashSet, SetUnionSingletonSet}; /// diff --git a/hydroflow_lang/src/graph/ops/lattice_fold.rs b/dfir_lang/src/graph/ops/lattice_fold.rs similarity index 91% rename from hydroflow_lang/src/graph/ops/lattice_fold.rs rename to dfir_lang/src/graph/ops/lattice_fold.rs index 8d85945451eb..a0aa24a4e982 100644 --- a/hydroflow_lang/src/graph/ops/lattice_fold.rs +++ b/dfir_lang/src/graph/ops/lattice_fold.rs @@ -8,7 +8,7 @@ use super::{ /// > 1 input stream, 1 output stream /// /// A specialized operator for merging lattices together into a accumulated value. Like [`fold()`](#fold) -/// but specialized for lattice types. `lattice_fold(MyLattice::default)` is equivalent to `fold(MyLattice::default, hydroflow::lattices::Merge::merge)`. +/// but specialized for lattice types. `lattice_fold(MyLattice::default)` is equivalent to `fold(MyLattice::default, dfir_rs::lattices::Merge::merge)`. /// /// `lattice_fold` can also be provided with one generic lifetime persistence argument, either /// `'tick` or `'static`, to specify how data persists. With `'tick`, values will only be collected @@ -19,9 +19,9 @@ use super::{ /// `lattice_fold` is differentiated from `lattice_reduce` in that `lattice_fold` can accumulate into a different type from its input. /// But it also means that the accumulating type must have a sensible default value /// -/// ```hydroflow -/// use hydroflow::lattices::set_union::SetUnionSingletonSet; -/// use hydroflow::lattices::set_union::SetUnionHashSet; +/// ```dfir +/// use dfir_rs::lattices::set_union::SetUnionSingletonSet; +/// use dfir_rs::lattices::set_union::SetUnionHashSet; /// /// source_iter([SetUnionSingletonSet::new_from(7)]) /// -> lattice_fold(SetUnionHashSet::::default) diff --git a/hydroflow_lang/src/graph/ops/lattice_reduce.rs b/dfir_lang/src/graph/ops/lattice_reduce.rs similarity index 96% rename from hydroflow_lang/src/graph/ops/lattice_reduce.rs rename to dfir_lang/src/graph/ops/lattice_reduce.rs index a38a7dc2481f..a97523dea71d 100644 --- a/hydroflow_lang/src/graph/ops/lattice_reduce.rs +++ b/dfir_lang/src/graph/ops/lattice_reduce.rs @@ -9,7 +9,7 @@ use super::{ /// > 1 input stream, 1 output stream /// /// A specialized operator for merging lattices together into an accumulated value. Like [`reduce()`](#reduce) -/// but specialized for lattice types. `lattice_reduce()` is equivalent to `reduce(hydroflow::lattices::Merge::merge)`. +/// but specialized for lattice types. `lattice_reduce()` is equivalent to `reduce(dfir_rs::lattices::Merge::merge)`. /// /// `lattice_reduce` can also be provided with one generic lifetime persistence argument, either /// `'tick` or `'static`, to specify how data persists. With `'tick`, values will only be collected @@ -20,8 +20,8 @@ use super::{ /// `lattice_reduce` is differentiated from `lattice_fold` in that `lattice_reduce` does not require the accumulating type to have a sensible default value. /// But it also means that the accumulating function inputs and the accumulating type must be the same. /// -/// ```hydroflow -/// use hydroflow::lattices::Max; +/// ```dfir +/// use dfir_rs::lattices::Max; /// /// source_iter([1, 2, 3, 4, 5]) /// -> map(Max::new) diff --git a/hydroflow_lang/src/graph/ops/map.rs b/dfir_lang/src/graph/ops/map.rs similarity index 93% rename from hydroflow_lang/src/graph/ops/map.rs rename to dfir_lang/src/graph/ops/map.rs index bd03ada64c5f..9bcc7f59665f 100644 --- a/hydroflow_lang/src/graph/ops/map.rs +++ b/dfir_lang/src/graph/ops/map.rs @@ -16,7 +16,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["hello", "world"]) -> map(|x| x.to_uppercase()) /// -> assert_eq(["HELLO", "WORLD"]); /// ``` @@ -51,7 +51,7 @@ pub const MAP: OperatorConstraints = OperatorConstraints { let write_iterator = if is_pull { let input = &inputs[0]; quote_spanned! {op_span=> - #[allow(clippy::map_clone, reason = "hydroflow has no explicit `cloned`/`copied` operator")] + #[allow(clippy::map_clone, reason = "dfir has no explicit `cloned`/`copied` operator")] let #ident = #input.map(#func); } } else { diff --git a/hydroflow_lang/src/graph/ops/mod.rs b/dfir_lang/src/graph/ops/mod.rs similarity index 97% rename from hydroflow_lang/src/graph/ops/mod.rs rename to dfir_lang/src/graph/ops/mod.rs index c4c35ce02065..176b9bb09b2c 100644 --- a/hydroflow_lang/src/graph/ops/mod.rs +++ b/dfir_lang/src/graph/ops/mod.rs @@ -39,7 +39,7 @@ pub enum PortListSpec { Fixed(Punctuated), } -/// An instance of this struct represents a single hydroflow operator. +/// An instance of this struct represents a single dfir operator. pub struct OperatorConstraints { /// Operator's name. pub name: &'static str, @@ -337,13 +337,13 @@ pub fn find_op_op_constraints(operator: &Operator) -> Option<&'static OperatorCo /// Context arguments provided to [`OperatorConstraints::write_fn`]. #[derive(Clone)] pub struct WriteContextArgs<'a> { - /// `hydroflow` crate name for `use #root::something`. + /// `dfir` crate name for `use #root::something`. pub root: &'a TokenStream, /// `context` ident, the name of the provided - /// [`hydroflow::scheduled::Context`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/context/struct.Context.html). + /// [`dfir_rs::scheduled::Context`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/context/struct.Context.html). pub context: &'a Ident, /// `df` ident, the name of the - /// [`hydroflow::scheduled::graph::Hydroflow`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Hydroflow.html) + /// [`dfir_rs::scheduled::graph::Dfir`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Hydroflow.html) /// instance. pub hydroflow: &'a Ident, /// Subgraph ID in which this operator is contained. @@ -474,7 +474,7 @@ pub enum Persistence { /// Helper which creates a error message string literal for when the Tokio runtime is not found. fn make_missing_runtime_msg(op_name: &str) -> Literal { - Literal::string(&format!("`{}()` must be used within a Tokio runtime. For example, use `#[hydroflow::main]` on your main method.", op_name)) + Literal::string(&format!("`{}()` must be used within a Tokio runtime. For example, use `#[dfir_rs::main]` on your main method.", op_name)) } /// Operator categories, for docs. diff --git a/hydroflow_lang/src/graph/ops/multiset_delta.rs b/dfir_lang/src/graph/ops/multiset_delta.rs similarity index 96% rename from hydroflow_lang/src/graph/ops/multiset_delta.rs rename to dfir_lang/src/graph/ops/multiset_delta.rs index 46e34da6f33c..fee459cbda03 100644 --- a/hydroflow_lang/src/graph/ops/multiset_delta.rs +++ b/dfir_lang/src/graph/ops/multiset_delta.rs @@ -9,8 +9,8 @@ use super::{ /// Multiset delta from the previous tick. /// /// ```rustbook -/// let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); +/// let mut flow = dfir_rs::dfir_syntax! { /// source_stream(input_recv) /// -> multiset_delta() /// -> for_each(|n| println!("{}", n)); diff --git a/hydroflow_lang/src/graph/ops/next_stratum.rs b/dfir_lang/src/graph/ops/next_stratum.rs similarity index 100% rename from hydroflow_lang/src/graph/ops/next_stratum.rs rename to dfir_lang/src/graph/ops/next_stratum.rs diff --git a/hydroflow_lang/src/graph/ops/null.rs b/dfir_lang/src/graph/ops/null.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/null.rs rename to dfir_lang/src/graph/ops/null.rs index 45f574e2c3d3..4de8f5167f6d 100644 --- a/hydroflow_lang/src/graph/ops/null.rs +++ b/dfir_lang/src/graph/ops/null.rs @@ -4,7 +4,7 @@ use super::{OperatorCategory, OperatorConstraints, NULL_WRITE_FN, RANGE_0}; /// /// As a source, generates nothing. As a sink, absorbs anything with no effect. /// -/// ```hydroflow +/// ```dfir /// // should print `1, 2, 3, 4, 5, 6, a, b, c` across 9 lines /// null() -> for_each(|_: ()| panic!()); /// source_iter([1,2,3]) -> map(|i| println!("{}", i)) -> null(); diff --git a/hydroflow_lang/src/graph/ops/partition.rs b/dfir_lang/src/graph/ops/partition.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/partition.rs rename to dfir_lang/src/graph/ops/partition.rs index d232ffd12e9a..eab0706153e5 100644 --- a/hydroflow_lang/src/graph/ops/partition.rs +++ b/dfir_lang/src/graph/ops/partition.rs @@ -26,7 +26,7 @@ use crate::pretty_span::PrettySpan; /// `[port_a, port_b, port_c]`, where each name is an output port. The closure should return the /// name of the desired output port. /// -/// ```hydroflow +/// ```dfir /// my_partition = source_iter(1..=100) -> partition(|val: &usize, [fzbz, fizz, buzz, rest]| /// match (val % 3, val % 5) { /// (0, 0) => fzbz, @@ -47,7 +47,7 @@ use crate::pretty_span::PrettySpan; /// numbered with an index, starting from zero and with no gaps. The closure returns the index of /// the desired output port. /// -/// ```hydroflow +/// ```dfir /// my_partition = source_iter(1..=100) -> partition(|val, num_outputs| val % num_outputs); /// my_partition[0] -> for_each(|v| println!("0: {}", v)); /// my_partition[1] -> for_each(|v| println!("1: {}", v)); diff --git a/hydroflow_lang/src/graph/ops/persist.rs b/dfir_lang/src/graph/ops/persist.rs similarity index 96% rename from hydroflow_lang/src/graph/ops/persist.rs rename to dfir_lang/src/graph/ops/persist.rs index 4f3f41d5decf..81f6c95cdd64 100644 --- a/hydroflow_lang/src/graph/ops/persist.rs +++ b/dfir_lang/src/graph/ops/persist.rs @@ -9,7 +9,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// Stores each item as it passes through, and replays all item every tick. /// -/// ```hydroflow +/// ```dfir /// // Normally `source_iter(...)` only emits once, but `persist::<'static>()` will replay the `"hello"` /// // on every tick. /// source_iter(["hello"]) @@ -19,11 +19,11 @@ use crate::diagnostic::{Diagnostic, Level}; /// /// `persist()` can be used to introduce statefulness into stateless pipelines. In the example below, the /// join only stores data for single tick. The `persist::<'static>()` operator introduces statefulness -/// across ticks. This can be useful for optimization transformations within the hydroflow +/// across ticks. This can be useful for optimization transformations within the dfir /// 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(&str, &str)>(); +/// let mut flow = dfir_rs::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/persist_mut.rs b/dfir_lang/src/graph/ops/persist_mut.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/persist_mut.rs rename to dfir_lang/src/graph/ops/persist_mut.rs index 822d98b30e9e..d6ea3c077295 100644 --- a/hydroflow_lang/src/graph/ops/persist_mut.rs +++ b/dfir_lang/src/graph/ops/persist_mut.rs @@ -12,8 +12,8 @@ use crate::diagnostic::{Diagnostic, Level}; /// Deletions/persists happen in the order they are received in the stream. /// For example, `[Persist(1), Delete(1), Persist(1)]` will result in a a single `1` value being stored. /// -/// ```hydroflow -/// use hydroflow::util::Persistence; +/// ```dfir +/// use dfir_rs::util::Persistence; /// /// source_iter([ /// Persistence::Persist(1), diff --git a/hydroflow_lang/src/graph/ops/persist_mut_keyed.rs b/dfir_lang/src/graph/ops/persist_mut_keyed.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/persist_mut_keyed.rs rename to dfir_lang/src/graph/ops/persist_mut_keyed.rs index 6e97e74b95cb..03ccde780c6a 100644 --- a/hydroflow_lang/src/graph/ops/persist_mut_keyed.rs +++ b/dfir_lang/src/graph/ops/persist_mut_keyed.rs @@ -12,8 +12,8 @@ use crate::diagnostic::{Diagnostic, Level}; /// Deletions/persists happen in the order they are received in the stream. /// For example, `[Persist(1), Delete(1), Persist(1)]` will result in a a single `1` value being stored. /// -/// ```hydroflow -/// use hydroflow::util::PersistenceKeyed; +/// ```dfir +/// use dfir_rs::util::PersistenceKeyed; /// /// source_iter([ /// PersistenceKeyed::Persist(0, 1), diff --git a/hydroflow_lang/src/graph/ops/py_udf.rs b/dfir_lang/src/graph/ops/py_udf.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/py_udf.rs rename to dfir_lang/src/graph/ops/py_udf.rs index 67901a58d0c7..fc7291bf92a9 100644 --- a/hydroflow_lang/src/graph/ops/py_udf.rs +++ b/dfir_lang/src/graph/ops/py_udf.rs @@ -19,7 +19,7 @@ use super::{ /// `.extract()`, see the [relevant pyo3 docs here](https://pyo3.rs/latest/conversions/traits#extract-and-the-frompyobject-trait) /// or the examples below. /// -/// ```hydroflow +/// ```dfir /// use pyo3::prelude::*; /// /// source_iter(0..10) @@ -37,7 +37,7 @@ use super::{ /// -> assert_eq([0, 1, 1, 2, 3, 5, 8, 13, 21, 34]); /// ``` /// -/// ```hydroflow +/// ```dfir /// use pyo3::prelude::*; /// /// source_iter([(5,1)]) diff --git a/hydroflow_lang/src/graph/ops/reduce.rs b/dfir_lang/src/graph/ops/reduce.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/reduce.rs rename to dfir_lang/src/graph/ops/reduce.rs index 03b16c2e4c09..ce693033c4c5 100644 --- a/hydroflow_lang/src/graph/ops/reduce.rs +++ b/dfir_lang/src/graph/ops/reduce.rs @@ -24,7 +24,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// items are aggregated with items arriving in later ticks. When not explicitly specified /// persistence defaults to `'tick`. /// -/// ```hydroflow +/// ```dfir /// source_iter([1,2,3,4,5]) /// -> reduce::<'tick>(|accum: &mut _, elem| { /// *accum *= elem; diff --git a/hydroflow_lang/src/graph/ops/reduce_keyed.rs b/dfir_lang/src/graph/ops/reduce_keyed.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/reduce_keyed.rs rename to dfir_lang/src/graph/ops/reduce_keyed.rs index bf1fe2f8b4c7..9f309ad943f7 100644 --- a/hydroflow_lang/src/graph/ops/reduce_keyed.rs +++ b/dfir_lang/src/graph/ops/reduce_keyed.rs @@ -30,7 +30,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// `reduce_keyed` can also be provided with two type arguments, the key and value type. This is /// required when using `'static` persistence if the compiler cannot infer the types. /// -/// ```hydroflow +/// ```dfir /// source_iter([("toy", 1), ("toy", 2), ("shoe", 11), ("shoe", 35), ("haberdashery", 7)]) /// -> reduce_keyed(|old: &mut u32, val: u32| *old += val) /// -> assert_eq([("toy", 3), ("shoe", 46), ("haberdashery", 7)]); @@ -38,8 +38,8 @@ 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(&str, &str)>(); +/// let mut flow = dfir_rs::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/sort.rs b/dfir_lang/src/graph/ops/sort.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/sort.rs rename to dfir_lang/src/graph/ops/sort.rs index e10349b180a9..193b6db3a995 100644 --- a/hydroflow_lang/src/graph/ops/sort.rs +++ b/dfir_lang/src/graph/ops/sort.rs @@ -7,7 +7,7 @@ use super::{ /// Takes a stream as input and produces a sorted version of the stream as output. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![2, 3, 1]) /// -> sort() /// -> assert_eq([1, 2, 3]); diff --git a/hydroflow_lang/src/graph/ops/sort_by_key.rs b/dfir_lang/src/graph/ops/sort_by_key.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/sort_by_key.rs rename to dfir_lang/src/graph/ops/sort_by_key.rs index 1e7aacb603c2..4ddaaf733670 100644 --- a/hydroflow_lang/src/graph/ops/sort_by_key.rs +++ b/dfir_lang/src/graph/ops/sort_by_key.rs @@ -10,7 +10,7 @@ use super::{ /// /// > Note: The closure has access to the [`context` object](surface_flows.mdx#the-context-object). /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![(2, 'y'), (3, 'x'), (1, 'z')]) /// -> sort_by_key(|(k, _v)| k) /// -> assert_eq([(1, 'z'), (2, 'y'), (3, 'x')]); diff --git a/hydroflow_lang/src/graph/ops/source_file.rs b/dfir_lang/src/graph/ops/source_file.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/source_file.rs rename to dfir_lang/src/graph/ops/source_file.rs index 664e9ec89640..8df2012680c2 100644 --- a/hydroflow_lang/src/graph/ops/source_file.rs +++ b/dfir_lang/src/graph/ops/source_file.rs @@ -15,7 +15,7 @@ use super::{ /// /// Will panic if the file could not be read, or if the file contains bytes that are not valid UTF-8. /// -/// ```hydroflow +/// ```dfir /// source_file("Cargo.toml") -> for_each(|line| println!("{}", line)); /// ``` pub const SOURCE_FILE: OperatorConstraints = OperatorConstraints { diff --git a/hydroflow_lang/src/graph/ops/source_interval.rs b/dfir_lang/src/graph/ops/source_interval.rs similarity index 87% rename from hydroflow_lang/src/graph/ops/source_interval.rs rename to dfir_lang/src/graph/ops/source_interval.rs index 4f77fd526958..adcc831a8378 100644 --- a/hydroflow_lang/src/graph/ops/source_interval.rs +++ b/dfir_lang/src/graph/ops/source_interval.rs @@ -13,18 +13,18 @@ use super::{ /// Emits units `()` on a repeated interval. The first tick completes immediately. Missed ticks will /// be scheduled as soon as possible. /// -/// Note that this requires the hydroflow instance be run within a [Tokio `Runtime`](https://docs.rs/tokio/1/tokio/runtime/struct.Runtime.html). -/// The easiest way to do this is with a [`#[hydroflow::main]`](https://hydro-project.github.io/hydroflow/doc/hydroflow/macro.hydroflow_main.html) +/// Note that this requires the dfir instance be run within a [Tokio `Runtime`](https://docs.rs/tokio/1/tokio/runtime/struct.Runtime.html). +/// The easiest way to do this is with a [`#[dfir_rs::main]`](https://hydro-project.github.io/hydroflow/doc/hydroflow/macro.hydroflow_main.html) /// annotation on `async fn main() { ... }` as in the example below. /// /// ```rustbook /// use std::time::Duration; /// use std::time::Instant; -/// use hydroflow::hydroflow_syntax; +///use dfir_rs::dfir_syntax; /// -/// #[hydroflow::main] +/// #[dfir_rs::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_iter.rs b/dfir_lang/src/graph/ops/source_iter.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/source_iter.rs rename to dfir_lang/src/graph/ops/source_iter.rs index ca5a299b9c32..0ead9430f28a 100644 --- a/hydroflow_lang/src/graph/ops/source_iter.rs +++ b/dfir_lang/src/graph/ops/source_iter.rs @@ -13,7 +13,7 @@ use super::{ /// /// Note that all elements are emitted during the first tick. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["Hello", "World"]) /// -> for_each(|x| println!("{}", x)); /// ``` diff --git a/hydroflow_lang/src/graph/ops/source_json.rs b/dfir_lang/src/graph/ops/source_json.rs similarity index 95% rename from hydroflow_lang/src/graph/ops/source_json.rs rename to dfir_lang/src/graph/ops/source_json.rs index 890a25372aac..cbd950eae076 100644 --- a/hydroflow_lang/src/graph/ops/source_json.rs +++ b/dfir_lang/src/graph/ops/source_json.rs @@ -12,8 +12,8 @@ use super::{ /// /// `source_json` may take one generic type argument, the type of the value to be parsed, which must implement [`Deserialize`](https://docs.rs/serde/latest/serde/de/trait.Deserialize.html). /// -/// ```hydroflow -/// source_json("example.json") -> for_each(|json: hydroflow::serde_json::Value| println!("{:#?}", json)); +/// ```dfir +/// source_json("example.json") -> for_each(|json: dfir_rs::serde_json::Value| println!("{:#?}", json)); /// ``` pub const SOURCE_JSON: OperatorConstraints = OperatorConstraints { name: "source_json", diff --git a/hydroflow_lang/src/graph/ops/source_stdin.rs b/dfir_lang/src/graph/ops/source_stdin.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/source_stdin.rs rename to dfir_lang/src/graph/ops/source_stdin.rs index 4a788eecc9e6..d0bbbc0e7575 100644 --- a/hydroflow_lang/src/graph/ops/source_stdin.rs +++ b/dfir_lang/src/graph/ops/source_stdin.rs @@ -12,7 +12,7 @@ use super::{ /// `source_stdin` receives a Stream of lines from stdin /// and emits each of the elements it receives downstream. /// -/// ```hydroflow +/// ```dfir /// source_stdin() /// -> map(|x| x.unwrap().to_uppercase()) /// -> for_each(|x| println!("{}", x)); diff --git a/hydroflow_lang/src/graph/ops/source_stream.rs b/dfir_lang/src/graph/ops/source_stream.rs similarity index 95% rename from hydroflow_lang/src/graph/ops/source_stream.rs rename to dfir_lang/src/graph/ops/source_stream.rs index 8a5b7f392e3a..b7051898e31b 100644 --- a/hydroflow_lang/src/graph/ops/source_stream.rs +++ b/dfir_lang/src/graph/ops/source_stream.rs @@ -15,8 +15,8 @@ use super::{ /// elements it receives downstream. /// /// ```rustbook -/// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<&str>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<&str>(); +/// let mut flow = dfir_rs::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/dfir_lang/src/graph/ops/source_stream_serde.rs similarity index 92% rename from hydroflow_lang/src/graph/ops/source_stream_serde.rs rename to dfir_lang/src/graph/ops/source_stream_serde.rs index 4c4fbf51d6f8..629261fb688c 100644 --- a/hydroflow_lang/src/graph/ops/source_stream_serde.rs +++ b/dfir_lang/src/graph/ops/source_stream_serde.rs @@ -15,9 +15,9 @@ use super::{ /// /// ```rustbook /// 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 addr = dfir_rs::util::ipv4_resolve("localhost:9000".into()).unwrap(); +/// let (outbound, inbound, _) = dfir_rs::util::bind_udp_bytes(addr).await; +/// let mut flow = dfir_rs::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/dfir_lang/src/graph/ops/spin.rs similarity index 97% rename from hydroflow_lang/src/graph/ops/spin.rs rename to dfir_lang/src/graph/ops/spin.rs index c686d03d0c95..5edbecd68e3a 100644 --- a/hydroflow_lang/src/graph/ops/spin.rs +++ b/dfir_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 = dfir_rs::dfir_syntax! { /// spin() -> for_each(|x| println!("tick {}: {:?}", context.current_tick(), x)); /// }; /// for _ in 1..100 { diff --git a/hydroflow_lang/src/graph/ops/state.rs b/dfir_lang/src/graph/ops/state.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/state.rs rename to dfir_lang/src/graph/ops/state.rs index ddcf213af446..eadca0eccd15 100644 --- a/hydroflow_lang/src/graph/ops/state.rs +++ b/dfir_lang/src/graph/ops/state.rs @@ -10,7 +10,7 @@ use super::{ /// Emits both a referenceable singleton and (optionally) a pass-through stream. In the future the /// pass-through stream may be deduplicated. /// -/// ```hydroflow +/// ```dfir /// use std::collections::HashSet; /// /// use lattices::set_union::{CartesianProductBimorphism, SetUnionHashSet, SetUnionSingletonSet}; diff --git a/hydroflow_lang/src/graph/ops/state_by.rs b/dfir_lang/src/graph/ops/state_by.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/state_by.rs rename to dfir_lang/src/graph/ops/state_by.rs index d676c5fc8439..c84730dd1693 100644 --- a/hydroflow_lang/src/graph/ops/state_by.rs +++ b/dfir_lang/src/graph/ops/state_by.rs @@ -12,7 +12,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// of the same type as the inputs to the state_by operator and are not required to be a lattice /// type. This is useful receiving pass-through context information on the output side. /// -/// ```hydroflow +/// ```dfir /// use std::collections::HashSet; /// /// use lattices::set_union::{CartesianProductBimorphism, SetUnionHashSet, SetUnionSingletonSet}; diff --git a/hydroflow_lang/src/graph/ops/tee.rs b/dfir_lang/src/graph/ops/tee.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/tee.rs rename to dfir_lang/src/graph/ops/tee.rs index 01641044f328..d8fe7aeb3457 100644 --- a/hydroflow_lang/src/graph/ops/tee.rs +++ b/dfir_lang/src/graph/ops/tee.rs @@ -10,7 +10,7 @@ use super::{ /// Takes the input stream and delivers a copy of each item to each output. /// > Note: Downstream operators may need explicit type annotations. /// -/// ```hydroflow +/// ```dfir /// my_tee = source_iter(vec!["Hello", "World"]) -> tee(); /// my_tee -> map(|x: &str| x.to_uppercase()) -> assert_eq(["HELLO", "WORLD"]); /// my_tee -> map(|x: &str| x.to_lowercase()) -> assert_eq(["hello", "world"]); diff --git a/hydroflow_lang/src/graph/ops/union.rs b/dfir_lang/src/graph/ops/union.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/union.rs rename to dfir_lang/src/graph/ops/union.rs index ae59c8053164..371cca44a4f2 100644 --- a/hydroflow_lang/src/graph/ops/union.rs +++ b/dfir_lang/src/graph/ops/union.rs @@ -12,7 +12,7 @@ use super::{ /// Since `union` has multiple input streams, it needs to be assigned to /// a variable to reference its multiple input ports across statements. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec!["hello", "world"]) -> my_union; /// source_iter(vec!["stay", "gold"]) -> my_union; /// source_iter(vec!["don't", "give", "up"]) -> my_union; diff --git a/hydroflow_lang/src/graph/ops/unique.rs b/dfir_lang/src/graph/ops/unique.rs similarity index 97% rename from hydroflow_lang/src/graph/ops/unique.rs rename to dfir_lang/src/graph/ops/unique.rs index 28b44a049e4f..19dd4fcb336d 100644 --- a/hydroflow_lang/src/graph/ops/unique.rs +++ b/dfir_lang/src/graph/ops/unique.rs @@ -9,7 +9,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// Takes one stream as input and filters out any duplicate occurrences. The output /// contains all unique values from the input. /// -/// ```hydroflow +/// ```dfir /// source_iter(vec![1, 1, 2, 3, 2, 1, 3]) /// -> unique() /// -> assert_eq([1, 2, 3]); @@ -22,8 +22,8 @@ use crate::diagnostic::{Diagnostic, Level}; /// With `'static`, values will be remembered across ticks and no duplicates will ever be emitted. /// /// ```rustbook -/// let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); +/// let mut flow = dfir_rs::dfir_syntax! { /// source_stream(input_recv) /// -> unique::<'tick>() /// -> for_each(|n| println!("{}", n)); diff --git a/hydroflow_lang/src/graph/ops/unzip.rs b/dfir_lang/src/graph/ops/unzip.rs similarity index 98% rename from hydroflow_lang/src/graph/ops/unzip.rs rename to dfir_lang/src/graph/ops/unzip.rs index ac3f04d21461..a7e81480a4ab 100644 --- a/hydroflow_lang/src/graph/ops/unzip.rs +++ b/dfir_lang/src/graph/ops/unzip.rs @@ -11,7 +11,7 @@ use super::{ /// Takes the input stream of pairs and unzips each one, delivers each item to /// its corresponding side. /// -/// ```hydroflow +/// ```dfir /// my_unzip = source_iter(vec![("Hello", "Foo"), ("World", "Bar")]) -> unzip(); /// my_unzip[0] -> assert_eq(["Hello", "World"]); /// my_unzip[1] -> assert_eq(["Foo", "Bar"]); diff --git a/hydroflow_lang/src/graph/ops/zip.rs b/dfir_lang/src/graph/ops/zip.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/zip.rs rename to dfir_lang/src/graph/ops/zip.rs index 290d642cc098..4e33feab7770 100644 --- a/hydroflow_lang/src/graph/ops/zip.rs +++ b/dfir_lang/src/graph/ops/zip.rs @@ -13,7 +13,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// per-tick. Excess items from one input or the other will be discarded. If you do not want to /// discard the excess, use [`zip_longest`](#zip_longest) instead. /// -/// ```hydroflow +/// ```dfir /// source_iter(0..3) -> [0]my_zip; /// source_iter(0..5) -> [1]my_zip; /// my_zip = zip() -> assert_eq([(0, 0), (1, 1), (2, 2)]); diff --git a/hydroflow_lang/src/graph/ops/zip_longest.rs b/dfir_lang/src/graph/ops/zip_longest.rs similarity index 99% rename from hydroflow_lang/src/graph/ops/zip_longest.rs rename to dfir_lang/src/graph/ops/zip_longest.rs index 1ed5e5c51af6..72084bb01555 100644 --- a/hydroflow_lang/src/graph/ops/zip_longest.rs +++ b/dfir_lang/src/graph/ops/zip_longest.rs @@ -13,7 +13,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// per-tick. Excess items are returned as `EitherOrBoth::Left(V1)` or `EitherOrBoth::Right(V2)`. /// If you intead want to discard the excess, use [`zip`](#zip) instead. /// -/// ```hydroflow +/// ```dfir /// source_iter(0..2) -> [0]my_zip_longest; /// source_iter(0..3) -> [1]my_zip_longest; /// my_zip_longest = zip_longest() diff --git a/hydroflow_lang/src/lib.rs b/dfir_lang/src/lib.rs similarity index 100% rename from hydroflow_lang/src/lib.rs rename to dfir_lang/src/lib.rs diff --git a/hydroflow_lang/src/parse.rs b/dfir_lang/src/parse.rs similarity index 100% rename from hydroflow_lang/src/parse.rs rename to dfir_lang/src/parse.rs diff --git a/hydroflow_lang/src/pretty_span.rs b/dfir_lang/src/pretty_span.rs similarity index 95% rename from hydroflow_lang/src/pretty_span.rs rename to dfir_lang/src/pretty_span.rs index ed4d92ba20d4..9a57adfa9f99 100644 --- a/hydroflow_lang/src/pretty_span.rs +++ b/dfir_lang/src/pretty_span.rs @@ -3,7 +3,7 @@ extern crate proc_macro; /// Helper struct which displays the span as `path:row:col` for human reading/IDE linking. -/// Example: `hydroflow\tests\surface_syntax.rs:42:18`. +/// Example: `dfir\tests\surface_syntax.rs:42:18`. pub struct PrettySpan(pub proc_macro2::Span); impl std::fmt::Display for PrettySpan { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { diff --git a/hydroflow_lang/src/process_singletons.rs b/dfir_lang/src/process_singletons.rs similarity index 100% rename from hydroflow_lang/src/process_singletons.rs rename to dfir_lang/src/process_singletons.rs diff --git a/hydroflow_lang/src/union_find.rs b/dfir_lang/src/union_find.rs similarity index 100% rename from hydroflow_lang/src/union_find.rs rename to dfir_lang/src/union_find.rs 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 67% rename from hydroflow_macro/Cargo.toml rename to dfir_macro/Cargo.toml index 4581adb99608..cd55800d1330 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 @@ -17,14 +17,14 @@ proc-macro = true # Note: If we ever compile this proc macro crate to WASM (e.g., if we are # building on a WASM host), we may need to turn diagnostics off for WASM if # proc_macro2 still does not support WASM. -hydroflow_lang = { path = "../hydroflow_lang", version = "^0.10.0" } +dfir_lang = { path = "../dfir_lang", version = "^0.10.0" } proc-macro2 = "1.0.74" proc-macro-crate = "1.0.0" quote = "1.0.35" syn = { version = "2.0.46", features = [ "parsing", "extra-traits" ] } [build-dependencies] -hydroflow_lang = { path = "../hydroflow_lang", version = "^0.10.0" } +dfir_lang = { path = "../dfir_lang", version = "^0.10.0" } itertools = "0.10.0" quote = "1.0.35" rustc_version = "0.4.0" diff --git a/hydroflow_macro/build.rs b/dfir_macro/build.rs similarity index 97% rename from hydroflow_macro/build.rs rename to dfir_macro/build.rs index 3fa4cb3c6f8e..4a745b661468 100644 --- a/hydroflow_macro/build.rs +++ b/dfir_macro/build.rs @@ -6,8 +6,8 @@ use std::fs::File; use std::io::{BufWriter, Read, Result, Write}; use std::path::{Path, PathBuf}; -use hydroflow_lang::graph::ops::{PortListSpec, OPERATORS}; -use hydroflow_lang::graph::PortIndexValue; +use dfir_lang::graph::ops::{PortListSpec, OPERATORS}; +use dfir_lang::graph::PortIndexValue; use itertools::Itertools; use quote::ToTokens; use rustc_version::{version_meta, Channel}; @@ -17,7 +17,7 @@ const FILENAME: &str = "surface_ops_gen.md"; fn book_file(filename: impl AsRef) -> PathBuf { let mut pathbuf = PathBuf::new(); pathbuf.push(std::env!("CARGO_MANIFEST_DIR")); - pathbuf.push("../docs/docs/hydroflow/syntax/"); + pathbuf.push("../docs/docs/dfir/syntax/"); pathbuf.push(filename); pathbuf } @@ -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 89% rename from hydroflow_macro/src/lib.rs rename to dfir_macro/src/lib.rs index f03ae0dc87e0..a072f59e8120 100644 --- a/hydroflow_macro/src/lib.rs +++ b/dfir_macro/src/lib.rs @@ -3,9 +3,9 @@ feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site) )] -use hydroflow_lang::diagnostic::{Diagnostic, Level}; -use hydroflow_lang::graph::{build_hfcode, partition_graph, FlatGraphBuilder}; -use hydroflow_lang::parse::HfCode; +use dfir_lang::diagnostic::{Diagnostic, Level}; +use dfir_lang::graph::{build_hfcode, partition_graph, FlatGraphBuilder}; +use dfir_lang::parse::HfCode; use proc_macro2::{Ident, Literal, Span}; use quote::{format_ident, quote}; use syn::{ @@ -20,34 +20,34 @@ 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 { use std::env::{var as env_var, VarError}; - let hydroflow_crate = proc_macro_crate::crate_name("hydroflow") - .expect("hydroflow should be present in `Cargo.toml`"); + let hydroflow_crate = + proc_macro_crate::crate_name("dfir_rs").expect("dfir_rs should be present in `Cargo.toml`"); match hydroflow_crate { proc_macro_crate::FoundCrate::Itself => { if Err(VarError::NotPresent) == env_var("CARGO_BIN_NAME") && Err(VarError::NotPresent) != env_var("CARGO_PRIMARY_PACKAGE") - && Ok("hydroflow") == env_var("CARGO_CRATE_NAME").as_deref() + && Ok("dfir_rs") == env_var("CARGO_CRATE_NAME").as_deref() { // In the crate itself, including unit tests. quote! { crate } } else { // In an integration test, example, bench, etc. - quote! { ::hydroflow } + quote! { ::dfir_rs } } } proc_macro_crate::FoundCrate::Name(name) => { @@ -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 { @@ -66,7 +66,7 @@ fn hydroflow_syntax_internal( let (graph_code_opt, diagnostics) = build_hfcode(input, &root); let tokens = graph_code_opt .map(|(_graph, code)| code) - .unwrap_or_else(|| quote! { #root::scheduled::graph::Hydroflow::new() }); + .unwrap_or_else(|| quote! { #root::scheduled::graph::Dfir::new() }); let diagnostics = diagnostics .iter() @@ -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); @@ -124,7 +124,7 @@ pub fn hydroflow_parser(input: proc_macro::TokenStream) -> proc_macro::TokenStre #[proc_macro] pub fn surface_booktest_operators(input: proc_macro::TokenStream) -> proc_macro::TokenStream { assert!(input.is_empty(), "Input must be empty"); - let each = hydroflow_lang::graph::ops::OPERATORS.iter().map(|op| { + let each = dfir_lang::graph::ops::OPERATORS.iter().map(|op| { let op_ident = Ident::new(op.name, Span::call_site()); let op_filename = format!("../../docs/docgen/{}.md", op.name); let lit_filename = LitStr::new(&op_filename, Span::call_site()); @@ -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/hydroflow/.gitignore b/dfir_rs/.gitignore similarity index 100% rename from hydroflow/.gitignore rename to dfir_rs/.gitignore diff --git a/hydroflow/CHANGELOG.md b/dfir_rs/CHANGELOG.md similarity index 100% rename from hydroflow/CHANGELOG.md rename to dfir_rs/CHANGELOG.md diff --git a/hydroflow/Cargo.toml b/dfir_rs/Cargo.toml similarity index 81% rename from hydroflow/Cargo.toml rename to dfir_rs/Cargo.toml index 319bf0ae243d..1651256345d8 100644 --- a/hydroflow/Cargo.toml +++ b/dfir_rs/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "hydroflow" +name = "dfir_rs" publish = true version = "0.10.0" edition = "2021" license = "Apache-2.0" -documentation = "https://docs.rs/hydroflow/" +documentation = "https://docs.rs/dfir_rs/" description = "Hydro's low-level dataflow runtime and IR" [lints] @@ -13,17 +13,16 @@ workspace = true [features] default = [ "macros", "debugging", "meta" ] -meta = [ "dep:hydroflow_lang" ] -macros = [ "hydroflow_macro", "hydroflow_datalog" ] -hydroflow_macro = [ "dep:hydroflow_macro" ] -hydroflow_datalog = [ "dep:hydroflow_datalog" ] +meta = [ "dep:dfir_lang" ] +macros = [ "dfir_macro", "dfir_datalog" ] +dfir_macro = [ "dep:dfir_macro" ] +dfir_datalog = [ "dep:dfir_datalog" ] deploy_integration = [ "dep:hydroflow_deploy_integration" ] python = [ "dep:pyo3" ] -debugging = [ "hydroflow_lang/debugging" ] +debugging = [ "dfir_lang/debugging" ] [[example]] name = "kvs_bench" -required-features = [ "nightly" ] [[example]] name = "python_udf" @@ -35,9 +34,9 @@ byteorder = "1.3.2" bytes = "1.1.0" 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_datalog = { optional = true, path = "../dfir_datalog", version = "^0.10.0" } +dfir_lang = { path = "../dfir_lang", version = "^0.10.0", optional = true } +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" } @@ -73,7 +72,7 @@ tokio-util = { version = "0.7.5", features = [ "codec" ] } getrandom = { version = "0.2.6", features = [ "js" ] } [dev-dependencies] -hydroflow_lang = { path = "../hydroflow_lang", version = "^0.10.0", features = [ "clap-derive" ] } +dfir_lang = { path = "../dfir_lang", version = "^0.10.0", features = [ "clap-derive" ] } chrono = { version = "0.4.20", features = [ "serde", "clock" ], default-features = false } clap = { version = "4.5.4", features = [ "derive" ] } diff --git a/hydroflow/README.md b/dfir_rs/README.md similarity index 100% rename from hydroflow/README.md rename to dfir_rs/README.md diff --git a/hydroflow/deprecated_examples/covid_tracing/README.md b/dfir_rs/deprecated_examples/covid_tracing/README.md similarity index 100% rename from hydroflow/deprecated_examples/covid_tracing/README.md rename to dfir_rs/deprecated_examples/covid_tracing/README.md diff --git a/hydroflow/deprecated_examples/covid_tracing/main.rs b/dfir_rs/deprecated_examples/covid_tracing/main.rs similarity index 93% rename from hydroflow/deprecated_examples/covid_tracing/main.rs rename to dfir_rs/deprecated_examples/covid_tracing/main.rs index 9b6330f33dd8..889764b9145b 100644 --- a/hydroflow/deprecated_examples/covid_tracing/main.rs +++ b/dfir_rs/deprecated_examples/covid_tracing/main.rs @@ -1,14 +1,14 @@ use std::cell::RefCell; use std::time::Duration; -use hydroflow::compiled::pull::JoinState; -use hydroflow::compiled::pull::SymmetricHashJoin; -use hydroflow::lang::collections::Iter; -use hydroflow::pusherator::{InputBuild, IteratorToPusherator, PusheratorBuild}; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::VecHandoff; -use hydroflow::var_expr; +use dfir_rs::compiled::pull::JoinState; +use dfir_rs::compiled::pull::SymmetricHashJoin; +use dfir_rs::lang::collections::Iter; +use dfir_rs::pusherator::{InputBuild, IteratorToPusherator, PusheratorBuild}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::VecHandoff; +use dfir_rs::var_expr; use rand::Rng; diff --git a/hydroflow/deprecated_examples/covid_tracing/people.rs b/dfir_rs/deprecated_examples/covid_tracing/people.rs similarity index 100% rename from hydroflow/deprecated_examples/covid_tracing/people.rs rename to dfir_rs/deprecated_examples/covid_tracing/people.rs diff --git a/hydroflow/deprecated_examples/covid_tracing_dist/database.rs b/dfir_rs/deprecated_examples/covid_tracing_dist/database.rs similarity index 92% rename from hydroflow/deprecated_examples/covid_tracing_dist/database.rs rename to dfir_rs/deprecated_examples/covid_tracing_dist/database.rs index b033df24b80a..b6286a2323fc 100644 --- a/hydroflow/deprecated_examples/covid_tracing_dist/database.rs +++ b/dfir_rs/deprecated_examples/covid_tracing_dist/database.rs @@ -2,15 +2,15 @@ use crate::{people, Decode, Encode, Opts, CONTACTS_ADDR, DIAGNOSES_ADDR}; use std::time::Duration; -use hydroflow::compiled::pull::SymmetricHashJoin; -use hydroflow::lang::collections::Iter; -use hydroflow::pusherator::{IteratorToPusherator, PusheratorBuild}; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::VecHandoff; -use hydroflow::scheduled::net::Message; -use hydroflow::tokio::net::TcpListener; -use hydroflow::var_expr; +use dfir_rs::compiled::pull::SymmetricHashJoin; +use dfir_rs::lang::collections::Iter; +use dfir_rs::pusherator::{IteratorToPusherator, PusheratorBuild}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::VecHandoff; +use dfir_rs::scheduled::net::Message; +use dfir_rs::tokio::net::TcpListener; +use dfir_rs::var_expr; use rand::Rng; pub(crate) async fn run_database(opts: Opts) { diff --git a/hydroflow/deprecated_examples/covid_tracing_dist/main.rs b/dfir_rs/deprecated_examples/covid_tracing_dist/main.rs similarity index 98% rename from hydroflow/deprecated_examples/covid_tracing_dist/main.rs rename to dfir_rs/deprecated_examples/covid_tracing_dist/main.rs index 6f140d30fb9e..4192ea8a1732 100644 --- a/hydroflow/deprecated_examples/covid_tracing_dist/main.rs +++ b/dfir_rs/deprecated_examples/covid_tracing_dist/main.rs @@ -1,6 +1,6 @@ use clap::{ArgEnum, Parser}; use database::run_database; -use hydroflow::tokio; +use dfir_rs::tokio; use serde::de::DeserializeOwned; use serde::Serialize; use tracker::run_tracker; @@ -71,7 +71,7 @@ where const CONTACTS_ADDR: u32 = 0; const DIAGNOSES_ADDR: u32 = 1; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); diff --git a/hydroflow/deprecated_examples/covid_tracing_dist/people.rs b/dfir_rs/deprecated_examples/covid_tracing_dist/people.rs similarity index 100% rename from hydroflow/deprecated_examples/covid_tracing_dist/people.rs rename to dfir_rs/deprecated_examples/covid_tracing_dist/people.rs diff --git a/hydroflow/deprecated_examples/covid_tracing_dist/tracker.rs b/dfir_rs/deprecated_examples/covid_tracing_dist/tracker.rs similarity index 91% rename from hydroflow/deprecated_examples/covid_tracing_dist/tracker.rs rename to dfir_rs/deprecated_examples/covid_tracing_dist/tracker.rs index 7abfb0555d2b..c1fd6f09c0af 100644 --- a/hydroflow/deprecated_examples/covid_tracing_dist/tracker.rs +++ b/dfir_rs/deprecated_examples/covid_tracing_dist/tracker.rs @@ -1,12 +1,12 @@ use crate::{Decode, Encode, Opts, CONTACTS_ADDR, DIAGNOSES_ADDR}; -use hydroflow::compiled::pull::SymmetricHashJoin; -use hydroflow::lang::collections::Iter; -use hydroflow::pusherator::{InputBuild, IteratorToPusherator, PusheratorBuild}; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::{graph::Hydroflow, handoff::VecHandoff, net::Message}; -use hydroflow::var_expr; -use hydroflow::tokio::net::TcpStream; +use dfir_rs::compiled::pull::SymmetricHashJoin; +use dfir_rs::lang::collections::Iter; +use dfir_rs::pusherator::{InputBuild, IteratorToPusherator, PusheratorBuild}; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::{graph::Dfir, handoff::VecHandoff, net::Message}; +use dfir_rs::var_expr; +use dfir_rs::tokio::net::TcpStream; pub(crate) async fn run_tracker(opts: Opts) { let mut df = Hydroflow::new(); diff --git a/hydroflow/example.json b/dfir_rs/example.json similarity index 100% rename from hydroflow/example.json rename to dfir_rs/example.json diff --git a/hydroflow/example_utils/chat_driver.py b/dfir_rs/example_utils/chat_driver.py similarity index 100% rename from hydroflow/example_utils/chat_driver.py rename to dfir_rs/example_utils/chat_driver.py diff --git a/hydroflow/example_utils/web2a b/dfir_rs/example_utils/web2a similarity index 100% rename from hydroflow/example_utils/web2a rename to dfir_rs/example_utils/web2a diff --git a/hydroflow/examples/chat/README.md b/dfir_rs/examples/chat/README.md similarity index 64% rename from hydroflow/examples/chat/README.md rename to dfir_rs/examples/chat/README.md index 24145a23cc57..38d4167d8d29 100644 --- a/hydroflow/examples/chat/README.md +++ b/dfir_rs/examples/chat/README.md @@ -13,18 +13,18 @@ To run the example, open 3 terminals. #### Running the Server In one terminal run the server like so: ```shell -cargo run -p hydroflow --example chat -- --name "_" --role server +cargo run -p dfir_rs --example chat -- --name "_" --role server ``` #### Running the Clients In another terminal run the first client: ```shell -cargo run -p hydroflow --example chat -- --name "alice" --role client +cargo run -p dfir_rs --example chat -- --name "alice" --role client ``` In the third terminal run the second client: ```shell -cargo run -p hydroflow --example chat -- --name "bob" --role client +cargo run -p dfir_rs --example chat -- --name "bob" --role client ``` If you type in the client terminals the messages should appear everywhere. @@ -39,35 +39,35 @@ In (up to) five separate tabs, run the following servers. ##### First ```shell -cargo run -p hydroflow --example chat -- --name "_" --address 127.0.0.1:12345 --role gossiping-server1 +cargo run -p dfir_rs --example chat -- --name "_" --address 127.0.0.1:12345 --role gossiping-server1 ``` ##### Second ```shell -cargo run -p hydroflow --example chat -- --name "_" --address 127.0.0.1:12346 --role gossiping-server2 +cargo run -p dfir_rs --example chat -- --name "_" --address 127.0.0.1:12346 --role gossiping-server2 ``` ##### Third ```shell -cargo run -p hydroflow --example chat -- --name "_" --address 127.0.0.1:12347 --role gossiping-server3 +cargo run -p dfir_rs --example chat -- --name "_" --address 127.0.0.1:12347 --role gossiping-server3 ``` ##### Fourth ```shell -cargo run -p hydroflow --example chat -- --name "_" --address 127.0.0.1:12348 --role gossiping-server4 +cargo run -p dfir_rs --example chat -- --name "_" --address 127.0.0.1:12348 --role gossiping-server4 ``` ##### Fifth ```shell -cargo run -p hydroflow --example chat -- --name "_" --address 127.0.0.1:12349 --role gossiping-server5 +cargo run -p dfir_rs --example chat -- --name "_" --address 127.0.0.1:12349 --role gossiping-server5 ``` #### Running the Clients In another terminal run the first client: ```shell -cargo run -p hydroflow --example chat -- --name "alice" --address 127.0.0.1:12345 --role client +cargo run -p dfir_rs --example chat -- --name "alice" --address 127.0.0.1:12345 --role client ``` In another terminal run the second client: ```shell -cargo run -p hydroflow --example chat -- --name "bob" --address 127.0.0.1:12349 --role client +cargo run -p dfir_rs --example chat -- --name "bob" --address 127.0.0.1:12349 --role client ``` If you type in the client terminals the messages should appear everywhere. Give it a few seconds though - unlike the @@ -77,19 +77,19 @@ cycles for the message to be delivered everywhere. ### Dump Graphs of the Flows #### Client ```shell -cargo run -p hydroflow --example chat -- --name "alice" --role client --graph mermaid +cargo run -p dfir_rs --example chat -- --name "alice" --role client --graph mermaid ``` #### Broadcast Server ```shell -cargo run -p hydroflow --example chat -- --name "_" --role server --graph mermaid +cargo run -p dfir_rs --example chat -- --name "_" --role server --graph mermaid ``` #### Gossip Server ```shell -cargo run -p hydroflow --example chat -- --name "_" --role gossiping-server1 --graph mermaid +cargo run -p dfir_rs --example chat -- --name "_" --role gossiping-server1 --graph mermaid ``` ### Display Help ```shell -cargo run -p hydroflow --example chat -- --help +cargo run -p dfir_rs --example chat -- --help ``` \ No newline at end of file diff --git a/hydroflow/examples/chat/client.rs b/dfir_rs/examples/chat/client.rs similarity index 95% rename from hydroflow/examples/chat/client.rs rename to dfir_rs/examples/chat/client.rs index c926054459b4..6c084c8bc185 100644 --- a/hydroflow/examples/chat/client.rs +++ b/dfir_rs/examples/chat/client.rs @@ -1,7 +1,7 @@ use chrono::prelude::*; use colored::Colorize; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use crate::protocol::Message; use crate::{default_server_address, Opts}; @@ -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/main.rs b/dfir_rs/examples/chat/main.rs similarity index 94% rename from hydroflow/examples/chat/main.rs rename to dfir_rs/examples/chat/main.rs index afc61ce57360..8b17af83aea9 100644 --- a/hydroflow/examples/chat/main.rs +++ b/dfir_rs/examples/chat/main.rs @@ -2,8 +2,8 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::util::ipv4_resolve; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::ipv4_resolve; use server::run_server; use crate::randomized_gossiping_server::run_gossiping_server; @@ -44,7 +44,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); @@ -67,7 +67,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_output) = run_cargo_example( "chat", @@ -122,7 +122,7 @@ fn test() { fn test_gossip() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server1, _, mut server1_output) = run_cargo_example( "chat", diff --git a/hydroflow/examples/chat/protocol.rs b/dfir_rs/examples/chat/protocol.rs similarity index 97% rename from hydroflow/examples/chat/protocol.rs rename to dfir_rs/examples/chat/protocol.rs index ea14986f6077..bb21242b4cf7 100644 --- a/hydroflow/examples/chat/protocol.rs +++ b/dfir_rs/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/dfir_rs/examples/chat/randomized_gossiping_server.rs similarity index 98% rename from hydroflow/examples/chat/randomized_gossiping_server.rs rename to dfir_rs/examples/chat/randomized_gossiping_server.rs index 8b7d21736b74..67f5ebce6f2d 100644 --- a/hydroflow/examples/chat/randomized_gossiping_server.rs +++ b/dfir_rs/examples/chat/randomized_gossiping_server.rs @@ -3,9 +3,9 @@ use std::net::SocketAddr; use std::time::Duration; use chrono::{DateTime, Utc}; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow_macro::hydroflow_syntax; +use dfir_macro::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; 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: Dfir = 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/dfir_rs/examples/chat/server.rs similarity index 92% rename from hydroflow/examples/chat/server.rs rename to dfir_rs/examples/chat/server.rs index f4cc07fea06f..b7a39c241ec6 100644 --- a/hydroflow/examples/chat/server.rs +++ b/dfir_rs/examples/chat/server.rs @@ -1,6 +1,6 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::bind_udp_bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::bind_udp_bytes; use crate::protocol::{Message, MessageWithAddr}; use crate::{default_server_address, Opts}; @@ -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: Dfir = 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/README.md b/dfir_rs/examples/deadlock_detector/README.md similarity index 100% rename from hydroflow/examples/deadlock_detector/README.md rename to dfir_rs/examples/deadlock_detector/README.md diff --git a/hydroflow/examples/deadlock_detector/helpers.rs b/dfir_rs/examples/deadlock_detector/helpers.rs similarity index 100% rename from hydroflow/examples/deadlock_detector/helpers.rs rename to dfir_rs/examples/deadlock_detector/helpers.rs diff --git a/hydroflow/examples/deadlock_detector/main.rs b/dfir_rs/examples/deadlock_detector/main.rs similarity index 95% rename from hydroflow/examples/deadlock_detector/main.rs rename to dfir_rs/examples/deadlock_detector/main.rs index 4ecc96ac5a36..1d725d165051 100644 --- a/hydroflow/examples/deadlock_detector/main.rs +++ b/dfir_rs/examples/deadlock_detector/main.rs @@ -5,7 +5,7 @@ use std::path::Path; /// This is a remedial distributed deadlock (cycle) detector use clap::Parser; -use hydroflow::lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::lang::graph::{WriteConfig, WriteGraphType}; use peer::run_detector; use serde::Deserialize; @@ -44,7 +44,7 @@ fn read_addresses_from_file(path: impl AsRef) -> Result) { // setup message send/recv ports let server_socket = UdpSocket::bind(("127.0.0.1", opts.port)).await.unwrap(); - let (outbound, inbound, _) = hydroflow::util::udp_lines(server_socket); + let (outbound, inbound, _) = dfir_rs::util::udp_lines(server_socket); // We provide a command line for users to type waits-for edges (u32,u32). let reader = tokio::io::BufReader::new(tokio::io::stdin()); let stdin_lines = LinesStream::new(reader.lines()); #[expect(clippy::map_identity, reason = "helps type inference?")] - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Dfir = 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/deadlock_detector/peers.json b/dfir_rs/examples/deadlock_detector/peers.json similarity index 100% rename from hydroflow/examples/deadlock_detector/peers.json rename to dfir_rs/examples/deadlock_detector/peers.json diff --git a/hydroflow/examples/deadlock_detector/protocol.rs b/dfir_rs/examples/deadlock_detector/protocol.rs similarity index 100% rename from hydroflow/examples/deadlock_detector/protocol.rs rename to dfir_rs/examples/deadlock_detector/protocol.rs diff --git a/hydroflow/examples/echo_serde_json/README.md b/dfir_rs/examples/echo_serde_json/README.md similarity index 100% rename from hydroflow/examples/echo_serde_json/README.md rename to dfir_rs/examples/echo_serde_json/README.md diff --git a/hydroflow/examples/echo_serde_json/client.rs b/dfir_rs/examples/echo_serde_json/client.rs similarity index 87% rename from hydroflow/examples/echo_serde_json/client.rs rename to dfir_rs/examples/echo_serde_json/client.rs index 5926a1e3442d..935edef527f2 100644 --- a/hydroflow/examples/echo_serde_json/client.rs +++ b/dfir_rs/examples/echo_serde_json/client.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{UdpLinesSink, UdpLinesStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{UdpLinesSink, UdpLinesStream}; use crate::helpers::{deserialize_json, serialize_json}; use crate::protocol::EchoMsg; @@ -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/helpers.rs b/dfir_rs/examples/echo_serde_json/helpers.rs similarity index 100% rename from hydroflow/examples/echo_serde_json/helpers.rs rename to dfir_rs/examples/echo_serde_json/helpers.rs diff --git a/hydroflow/examples/echo_serde_json/main.rs b/dfir_rs/examples/echo_serde_json/main.rs similarity index 94% rename from hydroflow/examples/echo_serde_json/main.rs rename to dfir_rs/examples/echo_serde_json/main.rs index 6c3e31dc7dbf..ddc1eda0b409 100644 --- a/hydroflow/examples/echo_serde_json/main.rs +++ b/dfir_rs/examples/echo_serde_json/main.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::util::{bind_udp_lines, ipv4_resolve}; +use dfir_rs::util::{bind_udp_lines, ipv4_resolve}; use server::run_server; mod client; @@ -26,7 +26,7 @@ struct Opts { server_addr: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { // parse command line arguments let opts = Opts::parse(); @@ -60,7 +60,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_output) = run_cargo_example( "echo_serde_json", diff --git a/hydroflow/examples/echo_serde_json/protocol.rs b/dfir_rs/examples/echo_serde_json/protocol.rs similarity index 100% rename from hydroflow/examples/echo_serde_json/protocol.rs rename to dfir_rs/examples/echo_serde_json/protocol.rs diff --git a/hydroflow/examples/echo_serde_json/server.rs b/dfir_rs/examples/echo_serde_json/server.rs similarity index 80% rename from hydroflow/examples/echo_serde_json/server.rs rename to dfir_rs/examples/echo_serde_json/server.rs index 1e34ea4913fa..d3d60c93a249 100644 --- a/hydroflow/examples/echo_serde_json/server.rs +++ b/dfir_rs/examples/echo_serde_json/server.rs @@ -1,9 +1,9 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpLinesSink, UdpLinesStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpLinesSink, UdpLinesStream}; use crate::helpers::{deserialize_json, serialize_json}; use crate::protocol::EchoMsg; @@ -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: Dfir = dfir_syntax! { // Inbound channel sharing inbound_chan = source_stream(inbound) -> map(deserialize_json) -> tee(); diff --git a/hydroflow/examples/echoserver/README.md b/dfir_rs/examples/echoserver/README.md similarity index 100% rename from hydroflow/examples/echoserver/README.md rename to dfir_rs/examples/echoserver/README.md diff --git a/hydroflow/examples/echoserver/client.rs b/dfir_rs/examples/echoserver/client.rs similarity index 90% rename from hydroflow/examples/echoserver/client.rs rename to dfir_rs/examples/echoserver/client.rs index 1304867fc7fb..2156b90c9ca0 100644 --- a/hydroflow/examples/echoserver/client.rs +++ b/dfir_rs/examples/echoserver/client.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::protocol::EchoMsg; use crate::Opts; @@ -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/main.rs b/dfir_rs/examples/echoserver/main.rs similarity index 93% rename from hydroflow/examples/echoserver/main.rs rename to dfir_rs/examples/echoserver/main.rs index 6734c790289d..8ef0553f11b6 100644 --- a/hydroflow/examples/echoserver/main.rs +++ b/dfir_rs/examples/echoserver/main.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use server::run_server; mod client; @@ -25,7 +25,7 @@ struct Opts { server_addr: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { // parse command line arguments let opts = Opts::parse(); @@ -52,7 +52,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_output) = run_cargo_example("echoserver", "--role server --addr 127.0.0.1:2048"); diff --git a/hydroflow/examples/echoserver/protocol.rs b/dfir_rs/examples/echoserver/protocol.rs similarity index 100% rename from hydroflow/examples/echoserver/protocol.rs rename to dfir_rs/examples/echoserver/protocol.rs diff --git a/hydroflow/examples/echoserver/server.rs b/dfir_rs/examples/echoserver/server.rs similarity index 82% rename from hydroflow/examples/echoserver/server.rs rename to dfir_rs/examples/echoserver/server.rs index 4f8dcebe3690..9e886774d8b3 100644 --- a/hydroflow/examples/echoserver/server.rs +++ b/dfir_rs/examples/echoserver/server.rs @@ -1,16 +1,16 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; 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: Dfir = 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/dfir_rs/examples/example_1_simplest.rs similarity index 74% rename from hydroflow/examples/example_1_simplest.rs rename to dfir_rs/examples/example_1_simplest.rs index 8f7b84b46140..e6cbce48c74a 100644 --- a/hydroflow/examples/example_1_simplest.rs +++ b/dfir_rs/examples/example_1_simplest.rs @@ -1,10 +1,10 @@ //[use]// -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_2_simple_1.rs similarity index 78% rename from hydroflow/examples/example_2_simple_1.rs rename to dfir_rs/examples/example_2_simple_1.rs index 1fe53455e995..8c4148ab54c8 100644 --- a/hydroflow/examples/example_2_simple_1.rs +++ b/dfir_rs/examples/example_2_simple_1.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_2_simple_2.rs similarity index 82% rename from hydroflow/examples/example_2_simple_2.rs rename to dfir_rs/examples/example_2_simple_2.rs index 843c14ae603c..acf14246cab6 100644 --- a/hydroflow/examples/example_2_simple_2.rs +++ b/dfir_rs/examples/example_2_simple_2.rs @@ -1,6 +1,6 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_3_stream.rs similarity index 83% rename from hydroflow/examples/example_3_stream.rs rename to dfir_rs/examples/example_3_stream.rs index 7cf9694e5511..95f79252b061 100644 --- a/hydroflow/examples/example_3_stream.rs +++ b/dfir_rs/examples/example_3_stream.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::dfir_syntax; pub fn main() { // Create our channel input - let (input_example, example_recv) = hydroflow::util::unbounded_channel::(); + let (input_example, example_recv) = dfir_rs::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/dfir_rs/examples/example_4_neighbors.rs similarity index 85% rename from hydroflow/examples/example_4_neighbors.rs rename to dfir_rs/examples/example_4_neighbors.rs index ac298c02b0f1..48205dc428e2 100644 --- a/hydroflow/examples/example_4_neighbors.rs +++ b/dfir_rs/examples/example_4_neighbors.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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 (edges_send, edges_recv) = dfir_rs::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/dfir_rs/examples/example_5_reachability.rs similarity index 88% rename from hydroflow/examples/example_5_reachability.rs rename to dfir_rs/examples/example_5_reachability.rs index 116df5ac5ef3..c6a90f09069c 100644 --- a/hydroflow/examples/example_5_reachability.rs +++ b/dfir_rs/examples/example_5_reachability.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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 (edges_send, edges_recv) = dfir_rs::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/dfir_rs/examples/example_6_unreachability.rs similarity index 90% rename from hydroflow/examples/example_6_unreachability.rs rename to dfir_rs/examples/example_6_unreachability.rs index 66656acf621c..4287414c87e6 100644 --- a/hydroflow/examples/example_6_unreachability.rs +++ b/dfir_rs/examples/example_6_unreachability.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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 (pairs_send, pairs_recv) = dfir_rs::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/dfir_rs/examples/example_naturals.rs similarity index 79% rename from hydroflow/examples/example_naturals.rs rename to dfir_rs/examples/example_naturals.rs index e9d723709757..066666609a3e 100644 --- a/hydroflow/examples/example_naturals.rs +++ b/dfir_rs/examples/example_naturals.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_surface_flows_1_basic.rs similarity index 70% rename from hydroflow/examples/example_surface_flows_1_basic.rs rename to dfir_rs/examples/example_surface_flows_1_basic.rs index af13b5816f2b..8f56221b3bae 100644 --- a/hydroflow/examples/example_surface_flows_1_basic.rs +++ b/dfir_rs/examples/example_surface_flows_1_basic.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_surface_flows_2_varname.rs similarity index 73% rename from hydroflow/examples/example_surface_flows_2_varname.rs rename to dfir_rs/examples/example_surface_flows_2_varname.rs index c8871d4e853f..60a88ecfb658 100644 --- a/hydroflow/examples/example_surface_flows_2_varname.rs +++ b/dfir_rs/examples/example_surface_flows_2_varname.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_surface_flows_3_ports.rs similarity index 86% rename from hydroflow/examples/example_surface_flows_3_ports.rs rename to dfir_rs/examples/example_surface_flows_3_ports.rs index 3cdd887a22e2..ceba080ae072 100644 --- a/hydroflow/examples/example_surface_flows_3_ports.rs +++ b/dfir_rs/examples/example_surface_flows_3_ports.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_surface_flows_4_context.rs similarity index 73% rename from hydroflow/examples/example_surface_flows_4_context.rs rename to dfir_rs/examples/example_surface_flows_4_context.rs index 6650a3564d0b..1309a2aa8421 100644 --- a/hydroflow/examples/example_surface_flows_4_context.rs +++ b/dfir_rs/examples/example_surface_flows_4_context.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_syntax_empty.rs similarity index 65% rename from hydroflow/examples/example_syntax_empty.rs rename to dfir_rs/examples/example_syntax_empty.rs index 13010ddc39dc..82c6c85c85c4 100644 --- a/hydroflow/examples/example_syntax_empty.rs +++ b/dfir_rs/examples/example_syntax_empty.rs @@ -1,9 +1,9 @@ #![expect(unused_mut, unused_variables, reason = "example code")] -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_syntax_hello_world.rs similarity index 71% rename from hydroflow/examples/example_syntax_hello_world.rs rename to dfir_rs/examples/example_syntax_hello_world.rs index 5c289d79a1a4..66fb66dfebeb 100644 --- a/hydroflow/examples/example_syntax_hello_world.rs +++ b/dfir_rs/examples/example_syntax_hello_world.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/examples/example_syntax_input.rs similarity index 60% rename from hydroflow/examples/example_syntax_input.rs rename to dfir_rs/examples/example_syntax_input.rs index 6c1d0c31e5db..2603c1586532 100644 --- a/hydroflow/examples/example_syntax_input.rs +++ b/dfir_rs/examples/example_syntax_input.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::dfir_syntax; fn main() { - let (input_send, input_recv) = hydroflow::util::unbounded_channel::<&str>(); - let mut flow = hydroflow_syntax! { + let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<&str>(); + let mut flow = dfir_syntax! { source_stream(input_recv) -> map(|x| x.to_uppercase()) -> for_each(|x| println!("{}", x)); }; diff --git a/dfir_rs/examples/example_syntax_output.rs b/dfir_rs/examples/example_syntax_output.rs new file mode 100644 index 000000000000..294f65b39ce2 --- /dev/null +++ b/dfir_rs/examples/example_syntax_output.rs @@ -0,0 +1,13 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::(); + let mut flow = dfir_syntax! { + source_iter("Hello World".chars()) -> map(|c| c.to_ascii_uppercase()) + -> for_each(|c| output_send.send(c).unwrap()); + }; + flow.run_available(); + + let output = &*dfir_rs::util::collect_ready::(&mut output_recv); + assert_eq!(output, "HELLO WORLD"); +} diff --git a/hydroflow/examples/hello_world/README.md b/dfir_rs/examples/hello_world/README.md similarity index 100% rename from hydroflow/examples/hello_world/README.md rename to dfir_rs/examples/hello_world/README.md diff --git a/hydroflow/examples/hello_world/main.rs b/dfir_rs/examples/hello_world/main.rs similarity index 70% rename from hydroflow/examples/hello_world/main.rs rename to dfir_rs/examples/hello_world/main.rs index 7b70f9daf2b9..e53731295cce 100644 --- a/hydroflow/examples/hello_world/main.rs +++ b/dfir_rs/examples/hello_world/main.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/README.md b/dfir_rs/examples/kvs/README.md similarity index 100% rename from hydroflow/examples/kvs/README.md rename to dfir_rs/examples/kvs/README.md diff --git a/hydroflow/examples/kvs/client.rs b/dfir_rs/examples/kvs/client.rs similarity index 90% rename from hydroflow/examples/kvs/client.rs rename to dfir_rs/examples/kvs/client.rs index c090c753b3df..857f3390146f 100644 --- a/hydroflow/examples/kvs/client.rs +++ b/dfir_rs/examples/kvs/client.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::helpers::parse_command; use crate::protocol::KvsResponse; @@ -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/helpers.rs b/dfir_rs/examples/kvs/helpers.rs similarity index 100% rename from hydroflow/examples/kvs/helpers.rs rename to dfir_rs/examples/kvs/helpers.rs diff --git a/hydroflow/examples/kvs/main.rs b/dfir_rs/examples/kvs/main.rs similarity index 93% rename from hydroflow/examples/kvs/main.rs rename to dfir_rs/examples/kvs/main.rs index a4b38190f70f..46b17d3af31d 100644 --- a/hydroflow/examples/kvs/main.rs +++ b/dfir_rs/examples/kvs/main.rs @@ -2,8 +2,8 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::lang::graph::{WriteConfig, WriteGraphType}; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use server::run_server; mod client; @@ -31,7 +31,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); let addr = opts.addr.unwrap(); @@ -55,7 +55,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_stdout) = run_cargo_example("kvs", "--role server --addr 127.0.0.1:2051"); diff --git a/hydroflow/examples/kvs/protocol.rs b/dfir_rs/examples/kvs/protocol.rs similarity index 96% rename from hydroflow/examples/kvs/protocol.rs rename to dfir_rs/examples/kvs/protocol.rs index eccf2cc84df5..087956b332d2 100644 --- a/hydroflow/examples/kvs/protocol.rs +++ b/dfir_rs/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/dfir_rs/examples/kvs/server.rs similarity index 89% rename from hydroflow/examples/kvs/server.rs rename to dfir_rs/examples/kvs/server.rs index 845e85b36265..ff70e7ecbde2 100644 --- a/hydroflow/examples/kvs/server.rs +++ b/dfir_rs/examples/kvs/server.rs @@ -1,6 +1,6 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::protocol::{KvsMessageWithAddr, KvsResponse}; use crate::Opts; @@ -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: Dfir = dfir_syntax! { // Setup network channels. network_send = dest_sink_serde(outbound); network_recv = source_stream_serde(inbound) diff --git a/hydroflow/examples/kvs_bench/README.md b/dfir_rs/examples/kvs_bench/README.md similarity index 100% rename from hydroflow/examples/kvs_bench/README.md rename to dfir_rs/examples/kvs_bench/README.md diff --git a/hydroflow/examples/kvs_bench/buffer_pool/mod.rs b/dfir_rs/examples/kvs_bench/buffer_pool/mod.rs similarity index 100% rename from hydroflow/examples/kvs_bench/buffer_pool/mod.rs rename to dfir_rs/examples/kvs_bench/buffer_pool/mod.rs diff --git a/hydroflow/examples/kvs_bench/buffer_pool/serialization.rs b/dfir_rs/examples/kvs_bench/buffer_pool/serialization.rs similarity index 100% rename from hydroflow/examples/kvs_bench/buffer_pool/serialization.rs rename to dfir_rs/examples/kvs_bench/buffer_pool/serialization.rs diff --git a/hydroflow/examples/kvs_bench/main.rs b/dfir_rs/examples/kvs_bench/main.rs similarity index 96% rename from hydroflow/examples/kvs_bench/main.rs rename to dfir_rs/examples/kvs_bench/main.rs index 635fdfb86c08..11585f67d74e 100644 --- a/hydroflow/examples/kvs_bench/main.rs +++ b/dfir_rs/examples/kvs_bench/main.rs @@ -10,8 +10,8 @@ use std::time::{Duration, Instant}; use bytes::Bytes; use clap::{command, Parser, Subcommand}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; use futures::Stream; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::StreamExt; @@ -106,7 +106,7 @@ fn main() { continue; } - let (tx, rx) = hydroflow::util::unbounded_channel::(); + let (tx, rx) = dfir_rs::util::unbounded_channel::(); { let entry = nodes.entry(n1).or_default(); @@ -182,7 +182,7 @@ fn main() { #[test] fn test() { - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_stdout) = run_cargo_example("kvs_bench", "bench --threads 2"); diff --git a/hydroflow/examples/kvs_bench/protocol/mod.rs b/dfir_rs/examples/kvs_bench/protocol/mod.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/mod.rs rename to dfir_rs/examples/kvs_bench/protocol/mod.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_delete_visitor.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_delete_visitor.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_delete_visitor.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_delete_visitor.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_get_visitor.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_get_visitor.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_get_visitor.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_get_visitor.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_gossip_visitor.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_gossip_visitor.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_gossip_visitor.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_gossip_visitor.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_put_visitor.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_put_visitor.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/kvs_request_put_visitor.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/kvs_request_put_visitor.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/lattices/map_union.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/lattices/map_union.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/lattices/map_union.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/lattices/map_union.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/lattices/mod.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/lattices/mod.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/lattices/mod.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/lattices/mod.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/lattices/my_last_write_wins.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/lattices/my_last_write_wins.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/lattices/my_last_write_wins.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/lattices/my_last_write_wins.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/lattices/point.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/lattices/point.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/lattices/point.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/lattices/point.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/lattices/with_bot.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/lattices/with_bot.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/lattices/with_bot.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/lattices/with_bot.rs diff --git a/hydroflow/examples/kvs_bench/protocol/serialization/mod.rs b/dfir_rs/examples/kvs_bench/protocol/serialization/mod.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/serialization/mod.rs rename to dfir_rs/examples/kvs_bench/protocol/serialization/mod.rs diff --git a/hydroflow/examples/kvs_bench/protocol/test/magic_buffer.rs b/dfir_rs/examples/kvs_bench/protocol/test/magic_buffer.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/test/magic_buffer.rs rename to dfir_rs/examples/kvs_bench/protocol/test/magic_buffer.rs diff --git a/hydroflow/examples/kvs_bench/protocol/test/mod.rs b/dfir_rs/examples/kvs_bench/protocol/test/mod.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/test/mod.rs rename to dfir_rs/examples/kvs_bench/protocol/test/mod.rs diff --git a/hydroflow/examples/kvs_bench/protocol/test/util.rs b/dfir_rs/examples/kvs_bench/protocol/test/util.rs similarity index 100% rename from hydroflow/examples/kvs_bench/protocol/test/util.rs rename to dfir_rs/examples/kvs_bench/protocol/test/util.rs diff --git a/hydroflow/examples/kvs_bench/server.rs b/dfir_rs/examples/kvs_bench/server.rs similarity index 95% rename from hydroflow/examples/kvs_bench/server.rs rename to dfir_rs/examples/kvs_bench/server.rs index 30687f20692c..7a270f8bac30 100644 --- a/hydroflow/examples/kvs_bench/server.rs +++ b/dfir_rs/examples/kvs_bench/server.rs @@ -5,11 +5,11 @@ use std::time::Duration; use bincode::options; use bytes::{BufMut, Bytes, BytesMut}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::compiled::pull::HalfMultisetJoinState; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::ticks::TickInstant; use futures::Stream; -use hydroflow::compiled::pull::HalfMultisetJoinState; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; use lattices::map_union::{MapUnionHashMap, MapUnionSingletonMap}; use lattices::set_union::SetUnionSingletonSet; use lattices::{Max, Point, WithBot}; @@ -47,12 +47,12 @@ pub fn run_server( let buffer_pool = BufferPool::::create_buffer_pool(); let (transducer_to_peers_tx, mut transducer_to_peers_rx) = - hydroflow::util::unsync_channel::<(Bytes, NodeId)>(None); + dfir_rs::util::unsync_channel::<(Bytes, NodeId)>(None); let (client_to_transducer_tx, client_to_transducer_rx) = - hydroflow::util::unsync_channel::<(KvsRequest, NodeId)>(None); + dfir_rs::util::unsync_channel::<(KvsRequest, NodeId)>(None); let (transducer_to_client_tx, mut _transducer_to_client_rx) = - hydroflow::util::unsync_channel::<(KvsResponse, NodeId)>(None); + dfir_rs::util::unsync_channel::<(KvsResponse, NodeId)>(None); let localset = task::LocalSet::new(); @@ -83,7 +83,7 @@ pub fn run_server( let outbound_networking_task = localset.run_until({ let lookup = topology.lookup.clone(); - // TODO: Eventually this would get moved into a hydroflow operator that would return a Bytes struct and be efficient and zero copy and etc. + // TODO: Eventually this would get moved into a dfir operator that would return a Bytes struct and be efficient and zero copy and etc. async move { loop { while let Some((serialized_req, node_id)) = transducer_to_peers_rx.next().await { @@ -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/README.md b/dfir_rs/examples/kvs_mut/README.md similarity index 100% rename from hydroflow/examples/kvs_mut/README.md rename to dfir_rs/examples/kvs_mut/README.md diff --git a/hydroflow/examples/kvs_mut/client.rs b/dfir_rs/examples/kvs_mut/client.rs similarity index 90% rename from hydroflow/examples/kvs_mut/client.rs rename to dfir_rs/examples/kvs_mut/client.rs index c090c753b3df..857f3390146f 100644 --- a/hydroflow/examples/kvs_mut/client.rs +++ b/dfir_rs/examples/kvs_mut/client.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::helpers::parse_command; use crate::protocol::KvsResponse; @@ -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/helpers.rs b/dfir_rs/examples/kvs_mut/helpers.rs similarity index 100% rename from hydroflow/examples/kvs_mut/helpers.rs rename to dfir_rs/examples/kvs_mut/helpers.rs diff --git a/hydroflow/examples/kvs_mut/main.rs b/dfir_rs/examples/kvs_mut/main.rs similarity index 93% rename from hydroflow/examples/kvs_mut/main.rs rename to dfir_rs/examples/kvs_mut/main.rs index 3838fe6faa7d..1e9e33d0b047 100644 --- a/hydroflow/examples/kvs_mut/main.rs +++ b/dfir_rs/examples/kvs_mut/main.rs @@ -2,8 +2,8 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::lang::graph::{WriteConfig, WriteGraphType}; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use server::run_server; mod client; @@ -31,7 +31,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); let addr = opts.addr.unwrap(); @@ -55,7 +55,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_stdout) = run_cargo_example("kvs_mut", "--role server --addr 127.0.0.1:2061"); diff --git a/hydroflow/examples/kvs_mut/protocol.rs b/dfir_rs/examples/kvs_mut/protocol.rs similarity index 96% rename from hydroflow/examples/kvs_mut/protocol.rs rename to dfir_rs/examples/kvs_mut/protocol.rs index 3df1a7d5001a..25b57453908f 100644 --- a/hydroflow/examples/kvs_mut/protocol.rs +++ b/dfir_rs/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/dfir_rs/examples/kvs_mut/server.rs similarity index 91% rename from hydroflow/examples/kvs_mut/server.rs rename to dfir_rs/examples/kvs_mut/server.rs index 61f0d6e1181d..8deecc16752e 100644 --- a/hydroflow/examples/kvs_mut/server.rs +++ b/dfir_rs/examples/kvs_mut/server.rs @@ -1,6 +1,6 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{PersistenceKeyed, UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{PersistenceKeyed, UdpSink, UdpStream}; use crate::protocol::{KvsMessageWithAddr, KvsResponse}; use crate::Opts; @@ -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: Dfir = dfir_syntax! { // Setup network channels. network_send = dest_sink_serde(outbound); network_recv = source_stream_serde(inbound) diff --git a/hydroflow/examples/kvs_replicated/README.md b/dfir_rs/examples/kvs_replicated/README.md similarity index 100% rename from hydroflow/examples/kvs_replicated/README.md rename to dfir_rs/examples/kvs_replicated/README.md diff --git a/hydroflow/examples/kvs_replicated/client.rs b/dfir_rs/examples/kvs_replicated/client.rs similarity index 90% rename from hydroflow/examples/kvs_replicated/client.rs rename to dfir_rs/examples/kvs_replicated/client.rs index eb4f2c882d5e..ccb54268e054 100644 --- a/hydroflow/examples/kvs_replicated/client.rs +++ b/dfir_rs/examples/kvs_replicated/client.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::helpers::parse_command; use crate::protocol::KvsMessage; @@ -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/helpers.rs b/dfir_rs/examples/kvs_replicated/helpers.rs similarity index 100% rename from hydroflow/examples/kvs_replicated/helpers.rs rename to dfir_rs/examples/kvs_replicated/helpers.rs diff --git a/hydroflow/examples/kvs_replicated/main.rs b/dfir_rs/examples/kvs_replicated/main.rs similarity index 93% rename from hydroflow/examples/kvs_replicated/main.rs rename to dfir_rs/examples/kvs_replicated/main.rs index 0d4117a2a35e..f5b053929914 100644 --- a/hydroflow/examples/kvs_replicated/main.rs +++ b/dfir_rs/examples/kvs_replicated/main.rs @@ -2,8 +2,8 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::lang::graph::{WriteConfig, WriteGraphType}; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use server::run_server; mod client; @@ -31,7 +31,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); let addr = opts.addr; @@ -55,7 +55,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server_1, _, mut server_1_stdout) = run_cargo_example("kvs_replicated", "--role server --addr 127.0.0.1:2051"); diff --git a/hydroflow/examples/kvs_replicated/protocol.rs b/dfir_rs/examples/kvs_replicated/protocol.rs similarity index 97% rename from hydroflow/examples/kvs_replicated/protocol.rs rename to dfir_rs/examples/kvs_replicated/protocol.rs index 93c7a541d6dc..f0f869c699be 100644 --- a/hydroflow/examples/kvs_replicated/protocol.rs +++ b/dfir_rs/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/dfir_rs/examples/kvs_replicated/server.rs similarity index 94% rename from hydroflow/examples/kvs_replicated/server.rs rename to dfir_rs/examples/kvs_replicated/server.rs index 82a0d98257dd..08ca0975d6b6 100644 --- a/hydroflow/examples/kvs_replicated/server.rs +++ b/dfir_rs/examples/kvs_replicated/server.rs @@ -1,6 +1,6 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::protocol::{KvsMessage, KvsMessageWithAddr}; use crate::Opts; @@ -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: Dfir = 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/README.md b/dfir_rs/examples/lamport_clock/README.md similarity index 100% rename from hydroflow/examples/lamport_clock/README.md rename to dfir_rs/examples/lamport_clock/README.md diff --git a/hydroflow/examples/lamport_clock/client.rs b/dfir_rs/examples/lamport_clock/client.rs similarity index 93% rename from hydroflow/examples/lamport_clock/client.rs rename to dfir_rs/examples/lamport_clock/client.rs index 680ca15b5b12..de65c7cb7fd3 100644 --- a/hydroflow/examples/lamport_clock/client.rs +++ b/dfir_rs/examples/lamport_clock/client.rs @@ -1,9 +1,9 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::{Max, Merge}; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::{Max, Merge}; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::protocol::EchoMsg; use crate::Opts; @@ -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/main.rs b/dfir_rs/examples/lamport_clock/main.rs similarity index 92% rename from hydroflow/examples/lamport_clock/main.rs rename to dfir_rs/examples/lamport_clock/main.rs index 2c178d63dfac..42bf3f4874e9 100644 --- a/hydroflow/examples/lamport_clock/main.rs +++ b/dfir_rs/examples/lamport_clock/main.rs @@ -2,8 +2,8 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use server::run_server; mod client; @@ -30,7 +30,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { // parse command line arguments let opts = Opts::parse(); @@ -57,7 +57,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_stdout) = run_cargo_example("lamport_clock", "--role server --addr 127.0.0.1:11052"); diff --git a/hydroflow/examples/lamport_clock/protocol.rs b/dfir_rs/examples/lamport_clock/protocol.rs similarity index 85% rename from hydroflow/examples/lamport_clock/protocol.rs rename to dfir_rs/examples/lamport_clock/protocol.rs index cd2629fd7db0..e1f24c9935bb 100644 --- a/hydroflow/examples/lamport_clock/protocol.rs +++ b/dfir_rs/examples/lamport_clock/protocol.rs @@ -1,4 +1,4 @@ -use hydroflow::lattices::Max; +use dfir_rs::lattices::Max; use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, Clone, Serialize, Deserialize, Debug)] diff --git a/hydroflow/examples/lamport_clock/server.rs b/dfir_rs/examples/lamport_clock/server.rs similarity index 89% rename from hydroflow/examples/lamport_clock/server.rs rename to dfir_rs/examples/lamport_clock/server.rs index 76ae73dbb572..fc0eebbf167d 100644 --- a/hydroflow/examples/lamport_clock/server.rs +++ b/dfir_rs/examples/lamport_clock/server.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::{Max, Merge}; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::{Max, Merge}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::protocol::EchoMsg; use crate::Opts; @@ -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: Dfir = 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/dfir_rs/examples/python_udf/main.rs similarity index 85% rename from hydroflow/examples/python_udf/main.rs rename to dfir_rs/examples/python_udf/main.rs index fb32af5649af..2182e95b6957 100644 --- a/hydroflow/examples/python_udf/main.rs +++ b/dfir_rs/examples/python_udf/main.rs @@ -1,13 +1,13 @@ -use hydroflow_macro::hydroflow_syntax; +use dfir_macro::dfir_syntax; use pyo3::{Py, PyAny, PyResult, Python}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { eprintln!("Vec sender starting..."); 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/README.md b/dfir_rs/examples/rga/README.md similarity index 100% rename from hydroflow/examples/rga/README.md rename to dfir_rs/examples/rga/README.md diff --git a/hydroflow/examples/rga/adjacency.rs b/dfir_rs/examples/rga/adjacency.rs similarity index 95% rename from hydroflow/examples/rga/adjacency.rs rename to dfir_rs/examples/rga/adjacency.rs index 5f8d0e74a4ae..6aa6c90eced0 100644 --- a/hydroflow/examples/rga/adjacency.rs +++ b/dfir_rs/examples/rga/adjacency.rs @@ -1,7 +1,7 @@ use std::collections::VecDeque; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -11,8 +11,8 @@ pub(crate) fn rga_adjacency( input_recv: UnboundedReceiverStream<(Token, Timestamp)>, rga_send: UnboundedSender<(Token, Timestamp)>, list_send: UnboundedSender<(Timestamp, Timestamp)>, -) -> Hydroflow<'static> { - hydroflow_syntax! { +) -> Dfir<'static> { + 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/dfir_rs/examples/rga/datalog.rs similarity index 96% rename from hydroflow/examples/rga/datalog.rs rename to dfir_rs/examples/rga/datalog.rs index 787a6df93f1a..2409eb00d492 100644 --- a/hydroflow/examples/rga/datalog.rs +++ b/dfir_rs/examples/rga/datalog.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -9,8 +9,8 @@ pub(crate) fn rga_datalog( input_recv: UnboundedReceiverStream<(Token, Timestamp)>, rga_send: UnboundedSender<(Token, Timestamp)>, list_send: UnboundedSender<(Timestamp, Timestamp)>, -) -> Hydroflow<'static> { - hydroflow_syntax! { +) -> Dfir<'static> { + 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/dfir_rs/examples/rga/datalog_agg.rs similarity index 96% rename from hydroflow/examples/rga/datalog_agg.rs rename to dfir_rs/examples/rga/datalog_agg.rs index 3455351f7054..4bbf345ac22b 100644 --- a/hydroflow/examples/rga/datalog_agg.rs +++ b/dfir_rs/examples/rga/datalog_agg.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -9,8 +9,8 @@ pub(crate) fn rga_datalog_agg( input_recv: UnboundedReceiverStream<(Token, Timestamp)>, rga_send: UnboundedSender<(Token, Timestamp)>, list_send: UnboundedSender<(Timestamp, Timestamp)>, -) -> Hydroflow<'static> { - hydroflow_syntax! { +) -> Dfir<'static> { + 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/main.rs b/dfir_rs/examples/rga/main.rs similarity index 95% rename from hydroflow/examples/rga/main.rs rename to dfir_rs/examples/rga/main.rs index 52f96660d0a0..c7a6d8332037 100644 --- a/hydroflow/examples/rga/main.rs +++ b/dfir_rs/examples/rga/main.rs @@ -4,8 +4,8 @@ use adjacency::rga_adjacency; use clap::{Parser, ValueEnum}; use datalog::rga_datalog; use datalog_agg::rga_datalog_agg; -use hydroflow::util::collect_ready_async; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::collect_ready_async; use minimal::rga_minimal; use protocol::{Timestamp, Token}; use tokio::sync::mpsc::UnboundedSender; @@ -35,7 +35,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] pub async fn main() { { // Set up tracing logger. @@ -47,9 +47,9 @@ pub async fn main() { } // An edge in the input data = a pair of `Token` vertex IDs. - let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(Token, Timestamp)>(); - let (rga_send, mut rga_recv) = hydroflow::util::unbounded_channel::<(Token, Timestamp)>(); - let (list_send, mut list_recv) = hydroflow::util::unbounded_channel::<(Timestamp, Timestamp)>(); + let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(Token, Timestamp)>(); + let (rga_send, mut rga_recv) = dfir_rs::util::unbounded_channel::<(Token, Timestamp)>(); + let (list_send, mut list_recv) = dfir_rs::util::unbounded_channel::<(Timestamp, Timestamp)>(); let opts = Opts::parse(); let mut hf = match opts.implementation { @@ -164,7 +164,7 @@ fn format_dot_node(n: Token) -> String { #[test] fn test() { - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; fn escape_regex(input: &str) -> String { input diff --git a/hydroflow/examples/rga/minimal.rs b/dfir_rs/examples/rga/minimal.rs similarity index 78% rename from hydroflow/examples/rga/minimal.rs rename to dfir_rs/examples/rga/minimal.rs index 23b3583fa5c1..d80ed92782ab 100644 --- a/hydroflow/examples/rga/minimal.rs +++ b/dfir_rs/examples/rga/minimal.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -9,8 +9,8 @@ pub(crate) fn rga_minimal( input_recv: UnboundedReceiverStream<(Token, Timestamp)>, rga_send: UnboundedSender<(Token, Timestamp)>, _list_send: UnboundedSender<(Timestamp, Timestamp)>, -) -> Hydroflow<'static> { - hydroflow_syntax! { +) -> Dfir<'static> { + 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/rga/protocol.rs b/dfir_rs/examples/rga/protocol.rs similarity index 100% rename from hydroflow/examples/rga/protocol.rs rename to dfir_rs/examples/rga/protocol.rs diff --git a/hydroflow/examples/shopping/README.md b/dfir_rs/examples/shopping/README.md similarity index 100% rename from hydroflow/examples/shopping/README.md rename to dfir_rs/examples/shopping/README.md diff --git a/hydroflow/examples/shopping/driver.rs b/dfir_rs/examples/shopping/driver.rs similarity index 94% rename from hydroflow/examples/shopping/driver.rs rename to dfir_rs/examples/shopping/driver.rs index f7bfdd7c56de..64a9dd53326c 100644 --- a/hydroflow/examples/shopping/driver.rs +++ b/dfir_rs/examples/shopping/driver.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow::util::ipv4_resolve; +use dfir_rs::util::ipv4_resolve; use crate::flows::bp_flow::bp_flow; use crate::flows::client_state_flow::client_state_flow; @@ -20,9 +20,9 @@ async fn spawn_listener( bp_listener_addr: SocketAddr, ssiv_listener_addr: SocketAddr, ) { - let (_, tuple_listener_in, _) = hydroflow::util::bind_udp_bytes(tuple_listener_addr).await; - let (_, bp_listener_in, _) = hydroflow::util::bind_udp_bytes(bp_listener_addr).await; - let (_, ssiv_listener_in, _) = hydroflow::util::bind_udp_bytes(ssiv_listener_addr).await; + let (_, tuple_listener_in, _) = dfir_rs::util::bind_udp_bytes(tuple_listener_addr).await; + let (_, bp_listener_in, _) = dfir_rs::util::bind_udp_bytes(bp_listener_addr).await; + let (_, ssiv_listener_in, _) = dfir_rs::util::bind_udp_bytes(ssiv_listener_addr).await; // spawn a listener thread to print out what each flow sends over the network std::thread::spawn(move || { let runtime = tokio::runtime::Builder::new_current_thread() @@ -41,7 +41,7 @@ async fn spawn_listener( pub(crate) async fn run_driver(opts: Opts) { // the address for the output; the listener will listen to this address let out_addr = ipv4_resolve("localhost:0").unwrap(); - let (out, _, _) = hydroflow::util::bind_udp_bytes(out_addr).await; + let (out, _, _) = dfir_rs::util::bind_udp_bytes(out_addr).await; // define the shopping workload from the test data let client1 = tuple_wrap(client1_vec().into_iter()); @@ -81,7 +81,7 @@ pub(crate) async fn run_driver(opts: Opts) { // addresses for a client proxy thread let client_addr = ipv4_resolve("localhost:23457").unwrap(); let client_out_addr = ipv4_resolve("localhost:23460").unwrap(); - let (client_out, _, _) = hydroflow::util::bind_udp_bytes(client_out_addr).await; + let (client_out, _, _) = dfir_rs::util::bind_udp_bytes(client_out_addr).await; // shopping input is handled by the client proxy transducer // so the server transducer should get an empty iterator as its first argument @@ -170,14 +170,14 @@ pub(crate) async fn run_driver(opts: Opts) { // address for a client proxy thread let client_addr = ipv4_resolve("localhost:23457").unwrap(); let client_out_addr = ipv4_resolve("localhost:23460").unwrap(); - let (client_out, _, _) = hydroflow::util::bind_udp_bytes(client_out_addr).await; + let (client_out, _, _) = dfir_rs::util::bind_udp_bytes(client_out_addr).await; // Spawn 3 server replicas asynchronously for pair in server_addrs.iter().zip(gossip_addrs.iter()) { let (&addr, &gossip_addr) = pair; let out_addr = ipv4_resolve("localhost:0").unwrap(); - let (out, _, _) = hydroflow::util::bind_udp_bytes(out_addr).await; + let (out, _, _) = dfir_rs::util::bind_udp_bytes(out_addr).await; let gossip_addrs = gossip_addrs.clone(); // shopping input is handled by the client proxy transducer diff --git a/hydroflow/examples/shopping/flows/bp_flow.rs b/dfir_rs/examples/shopping/flows/bp_flow.rs similarity index 89% rename from hydroflow/examples/shopping/flows/bp_flow.rs rename to dfir_rs/examples/shopping/flows/bp_flow.rs index 960dfffca803..62e115f00b1e 100644 --- a/hydroflow/examples/shopping/flows/bp_flow.rs +++ b/dfir_rs/examples/shopping/flows/bp_flow.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::Merge; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Merge; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -16,7 +16,7 @@ pub(crate) async fn bp_flow( shopping_bp: impl Iterator)> + 'static, out_addr: SocketAddr, out: SplitSink, (Bytes, SocketAddr)>, -) -> Hydroflow<'static> { +) -> Dfir<'static> { let client_class = client_class_iter(); // First define some shorthand for the merge and bot of this lattice @@ -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/dfir_rs/examples/shopping/flows/client_state_flow.rs similarity index 88% rename from hydroflow/examples/shopping/flows/client_state_flow.rs rename to dfir_rs/examples/shopping/flows/client_state_flow.rs index 8d4cdb511b91..7c8facd7659d 100644 --- a/hydroflow/examples/shopping/flows/client_state_flow.rs +++ b/dfir_rs/examples/shopping/flows/client_state_flow.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::Merge; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Merge; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -18,7 +18,7 @@ pub(crate) async fn client_state_flow( out: SplitSink, (Bytes, SocketAddr)>, local_addr: SocketAddr, remote_addr: SocketAddr, -) -> Hydroflow<'static> { +) -> Dfir<'static> { let client_class = client_class_iter(); // First define some shorthand for the merge and bot of this lattice @@ -27,12 +27,12 @@ pub(crate) async fn client_state_flow( const SSIV_BOT: fn() -> SealedSetOfIndexedValues = Default::default; // Set up the Udp socket for proxy-server communication - let (carts_out, carts_in, _) = hydroflow::util::bind_udp_bytes(local_addr).await; + let (carts_out, carts_in, _) = dfir_rs::util::bind_udp_bytes(local_addr).await; // 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/dfir_rs/examples/shopping/flows/listener_flow.rs similarity index 85% rename from hydroflow/examples/shopping/flows/listener_flow.rs rename to dfir_rs/examples/shopping/flows/listener_flow.rs index 0ab38af0b8cc..4a57f21d94a6 100644 --- a/hydroflow/examples/shopping/flows/listener_flow.rs +++ b/dfir_rs/examples/shopping/flows/listener_flow.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::UdpStream; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::UdpStream; use crate::lattices::{BoundedPrefix, SealedSetOfIndexedValues}; use crate::structs::{ClientClass, LineItem, Request}; @@ -11,9 +11,9 @@ pub(crate) async fn listener_flow( tuple_input: UdpStream, bp_input: UdpStream, ssiv_input: UdpStream, -) -> Hydroflow<'static> { +) -> Dfir<'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/mod.rs b/dfir_rs/examples/shopping/flows/mod.rs similarity index 100% rename from hydroflow/examples/shopping/flows/mod.rs rename to dfir_rs/examples/shopping/flows/mod.rs diff --git a/hydroflow/examples/shopping/flows/orig_flow.rs b/dfir_rs/examples/shopping/flows/orig_flow.rs similarity index 90% rename from hydroflow/examples/shopping/flows/orig_flow.rs rename to dfir_rs/examples/shopping/flows/orig_flow.rs index c92f080c8138..db0570dea9b3 100644 --- a/hydroflow/examples/shopping/flows/orig_flow.rs +++ b/dfir_rs/examples/shopping/flows/orig_flow.rs @@ -1,9 +1,9 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -14,14 +14,14 @@ pub(crate) async fn orig_flow( shopping: impl Iterator + 'static, out_addr: SocketAddr, out: SplitSink, (Bytes, SocketAddr)>, -) -> Hydroflow<'static> { +) -> Dfir<'static> { let client_class = client_class_iter(); // This is the straightforward single-transducer sequential case. // 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/dfir_rs/examples/shopping/flows/push_group_flow.rs similarity index 90% rename from hydroflow/examples/shopping/flows/push_group_flow.rs rename to dfir_rs/examples/shopping/flows/push_group_flow.rs index 210f567a8ddc..30f9136711b8 100644 --- a/hydroflow/examples/shopping/flows/push_group_flow.rs +++ b/dfir_rs/examples/shopping/flows/push_group_flow.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::Merge; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Merge; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -16,7 +16,7 @@ pub(crate) async fn push_group_flow( shopping_ssiv: impl Iterator)> + 'static, out_addr: SocketAddr, out: SplitSink, (Bytes, SocketAddr)>, -) -> Hydroflow<'static> { +) -> Dfir<'static> { let client_class = client_class_iter(); // First define some shorthand for the merge and bot of this lattice @@ -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/dfir_rs/examples/shopping/flows/rep_server_flow.rs similarity index 86% rename from hydroflow/examples/shopping/flows/rep_server_flow.rs rename to dfir_rs/examples/shopping/flows/rep_server_flow.rs index 8b62825b7a6b..c5af1f361b8b 100644 --- a/hydroflow/examples/shopping/flows/rep_server_flow.rs +++ b/dfir_rs/examples/shopping/flows/rep_server_flow.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::Merge; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Merge; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -20,8 +20,8 @@ pub(crate) async fn rep_server_flow( remote_addr: SocketAddr, gossip_addr: SocketAddr, server_addrs: impl Iterator + 'static, -) -> Hydroflow<'static> { - let (broadcast_out, broadcast_in, _) = hydroflow::util::bind_udp_bytes(gossip_addr).await; +) -> Dfir<'static> { + let (broadcast_out, broadcast_in, _) = dfir_rs::util::bind_udp_bytes(gossip_addr).await; let client_class = client_class_iter(); let ssiv_merge = as Merge>>::merge; @@ -29,9 +29,9 @@ pub(crate) async fn rep_server_flow( const SSIV_BOT: fn() -> SealedSetOfIndexedValues = Default::default; // Set up the Udp socket for proxy-server communication - let (reqs_out, reqs_in, _) = hydroflow::util::bind_udp_bytes(local_addr).await; + let (reqs_out, reqs_in, _) = dfir_rs::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/dfir_rs/examples/shopping/flows/server_state_flow.rs similarity index 88% rename from hydroflow/examples/shopping/flows/server_state_flow.rs rename to dfir_rs/examples/shopping/flows/server_state_flow.rs index 9b1bcde86405..0f69fe84c4d7 100644 --- a/hydroflow/examples/shopping/flows/server_state_flow.rs +++ b/dfir_rs/examples/shopping/flows/server_state_flow.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::Merge; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Merge; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -18,7 +18,7 @@ pub(crate) async fn server_state_flow( out: SplitSink, (Bytes, SocketAddr)>, local_addr: SocketAddr, remote_addr: SocketAddr, -) -> Hydroflow<'static> { +) -> Dfir<'static> { let client_class = client_class_iter(); // First define some shorthand for the merge and bot of this lattice @@ -27,12 +27,12 @@ pub(crate) async fn server_state_flow( const SSIV_BOT: fn() -> SealedSetOfIndexedValues = Default::default; // Set up the Udp socket for proxy-server communication - let (reqs_out, reqs_in, _) = hydroflow::util::bind_udp_bytes(local_addr).await; + let (reqs_out, reqs_in, _) = dfir_rs::util::bind_udp_bytes(local_addr).await; // 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/dfir_rs/examples/shopping/flows/ssiv_flow.rs similarity index 90% rename from hydroflow/examples/shopping/flows/ssiv_flow.rs rename to dfir_rs/examples/shopping/flows/ssiv_flow.rs index 34ddfefc5163..1f2330c7ce6f 100644 --- a/hydroflow/examples/shopping/flows/ssiv_flow.rs +++ b/dfir_rs/examples/shopping/flows/ssiv_flow.rs @@ -1,10 +1,10 @@ use std::net::SocketAddr; use bytes::Bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::Merge; +use dfir_rs::scheduled::graph::Dfir; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Merge; -use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -16,7 +16,7 @@ pub(crate) async fn ssiv_flow( shopping_ssiv: impl Iterator)> + 'static, out_addr: SocketAddr, out: SplitSink, (Bytes, SocketAddr)>, -) -> Hydroflow<'static> { +) -> Dfir<'static> { let client_class = client_class_iter(); // First define some shorthand for the merge and bot of this lattice @@ -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/shopping/lattices.rs b/dfir_rs/examples/shopping/lattices.rs similarity index 99% rename from hydroflow/examples/shopping/lattices.rs rename to dfir_rs/examples/shopping/lattices.rs index b3c21b661f15..aa30f0297558 100644 --- a/hydroflow/examples/shopping/lattices.rs +++ b/dfir_rs/examples/shopping/lattices.rs @@ -1,7 +1,7 @@ use std::cmp::Ordering; use std::collections::BTreeMap; -use hydroflow::lattices::{LatticeFrom, LatticeOrd, Merge}; +use dfir_rs::lattices::{LatticeFrom, LatticeOrd, Merge}; use itertools::Itertools; use serde::{Deserialize, Serialize}; diff --git a/hydroflow/examples/shopping/main.rs b/dfir_rs/examples/shopping/main.rs similarity index 98% rename from hydroflow/examples/shopping/main.rs rename to dfir_rs/examples/shopping/main.rs index 7fae93a39b11..a90ad7aedc06 100644 --- a/hydroflow/examples/shopping/main.rs +++ b/dfir_rs/examples/shopping/main.rs @@ -1,8 +1,8 @@ // Test harness for the various implementations of shopping carts. use clap::{Parser, ValueEnum}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; use driver::run_driver; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; mod driver; mod flows; @@ -27,7 +27,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); @@ -37,7 +37,7 @@ async fn main() { #[test] fn test() { - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; fn escape_regex(input: &str) -> String { input diff --git a/hydroflow/examples/shopping/misc/replicated2.dot b/dfir_rs/examples/shopping/misc/replicated2.dot similarity index 100% rename from hydroflow/examples/shopping/misc/replicated2.dot rename to dfir_rs/examples/shopping/misc/replicated2.dot diff --git a/hydroflow/examples/shopping/misc/replicated2.pdf b/dfir_rs/examples/shopping/misc/replicated2.pdf similarity index 100% rename from hydroflow/examples/shopping/misc/replicated2.pdf rename to dfir_rs/examples/shopping/misc/replicated2.pdf diff --git a/hydroflow/examples/shopping/structs.rs b/dfir_rs/examples/shopping/structs.rs similarity index 100% rename from hydroflow/examples/shopping/structs.rs rename to dfir_rs/examples/shopping/structs.rs diff --git a/hydroflow/examples/shopping/test_data.rs b/dfir_rs/examples/shopping/test_data.rs similarity index 100% rename from hydroflow/examples/shopping/test_data.rs rename to dfir_rs/examples/shopping/test_data.rs diff --git a/hydroflow/examples/shopping/wrappers.rs b/dfir_rs/examples/shopping/wrappers.rs similarity index 100% rename from hydroflow/examples/shopping/wrappers.rs rename to dfir_rs/examples/shopping/wrappers.rs diff --git a/hydroflow/examples/three_clique/README.md b/dfir_rs/examples/three_clique/README.md similarity index 100% rename from hydroflow/examples/three_clique/README.md rename to dfir_rs/examples/three_clique/README.md diff --git a/hydroflow/examples/three_clique/main.rs b/dfir_rs/examples/three_clique/main.rs similarity index 91% rename from hydroflow/examples/three_clique/main.rs rename to dfir_rs/examples/three_clique/main.rs index deacc379d19a..d5a645dac83a 100644 --- a/hydroflow/examples/three_clique/main.rs +++ b/dfir_rs/examples/three_clique/main.rs @@ -1,6 +1,6 @@ use clap::Parser; -use hydroflow::hydroflow_syntax; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::dfir_syntax; // This example detects size three cliques in a graph. Size three cliques are also known as triangles. // The equivalent datalog program would be Triangle(x,y,z) := Edge(x,y), Edge(y,z), Edge(z,x) @@ -16,10 +16,10 @@ struct Opts { pub fn main() { let opts = Opts::parse(); // An edge in the input data = a pair of `usize` vertex IDs. - let (edges_send, edges_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (edges_send, edges_recv) = dfir_rs::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 @@ -79,7 +79,7 @@ pub fn main() { #[test] fn test() { - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_child, _, mut stdout) = run_cargo_example("three_clique", ""); diff --git a/hydroflow/examples/two_pc_hf/README.md b/dfir_rs/examples/two_pc_hf/README.md similarity index 100% rename from hydroflow/examples/two_pc_hf/README.md rename to dfir_rs/examples/two_pc_hf/README.md diff --git a/hydroflow/examples/two_pc_hf/coordinator.rs b/dfir_rs/examples/two_pc_hf/coordinator.rs similarity index 86% rename from hydroflow/examples/two_pc_hf/coordinator.rs rename to dfir_rs/examples/two_pc_hf/coordinator.rs index c71b68d0f516..4fb11e8a4ce7 100644 --- a/hydroflow/examples/two_pc_hf/coordinator.rs +++ b/dfir_rs/examples/two_pc_hf/coordinator.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::helpers::parse_out; use crate::protocol::{CoordMsg, MsgType, SubordResponse}; @@ -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: Dfir = dfir_syntax! { // fetch subordinates from file, convert ip:port to a SocketAddr, and tee subords = source_json(path) -> flat_map(|json: Addresses| json.subordinates) @@ -40,7 +40,7 @@ pub(crate) async fn run_coordinator(outbound: UdpSink, inbound: UdpStream, opts: }); msgs[errs] -> for_each(|m| println!("Received unexpected message type: {:?}", m)); msgs[endeds] - -> map(|m: SubordResponse| hydroflow::util::PersistenceKeyed::Delete(m.xid)) + -> map(|m: SubordResponse| dfir_rs::util::PersistenceKeyed::Delete(m.xid)) -> defer_tick() -> phase_map; @@ -61,7 +61,7 @@ pub(crate) async fn run_coordinator(outbound: UdpSink, inbound: UdpStream, opts: -> filter_map(|l: Result| parse_out(l.unwrap())) -> tee(); initiate - -> flat_map(|xid: u16| [hydroflow::util::PersistenceKeyed::Delete(xid), hydroflow::util::PersistenceKeyed::Persist(xid, 1)]) + -> flat_map(|xid: u16| [dfir_rs::util::PersistenceKeyed::Delete(xid), dfir_rs::util::PersistenceKeyed::Persist(xid, 1)]) -> phase_map; initiate -> map(|xid:u16| CoordMsg{xid, mtype: MsgType::Prepare}) @@ -72,7 +72,7 @@ pub(crate) async fn run_coordinator(outbound: UdpSink, inbound: UdpStream, opts: // We'll respond to each abort message: this is redundant but correct (and monotone) abort_p1s = msgs[aborts] -> tee(); abort_p1s - -> flat_map(|m: SubordResponse| [hydroflow::util::PersistenceKeyed::Delete(m.xid), hydroflow::util::PersistenceKeyed::Persist(m.xid, 2)]) + -> flat_map(|m: SubordResponse| [dfir_rs::util::PersistenceKeyed::Delete(m.xid), dfir_rs::util::PersistenceKeyed::Persist(m.xid, 2)]) -> defer_tick() -> phase_map; abort_p1s @@ -106,7 +106,7 @@ pub(crate) async fn run_coordinator(outbound: UdpSink, inbound: UdpStream, opts: -> tee(); // update the phase_map check_committed - -> flat_map(|xid| [hydroflow::util::PersistenceKeyed::Delete(xid), hydroflow::util::PersistenceKeyed::Persist(xid, 2)]) + -> flat_map(|xid| [dfir_rs::util::PersistenceKeyed::Delete(xid), dfir_rs::util::PersistenceKeyed::Persist(xid, 2)]) -> defer_tick() -> phase_map; // broadcast the P2 commit message @@ -117,7 +117,7 @@ pub(crate) async fn run_coordinator(outbound: UdpSink, inbound: UdpStream, opts: // Handle p2 acknowledgments by sending an End message ack_p2s = msgs[acks] -> tee(); ack_p2s - -> flat_map(|m: SubordResponse| [hydroflow::util::PersistenceKeyed::Delete(m.xid), hydroflow::util::PersistenceKeyed::Persist(m.xid, 3)]) + -> flat_map(|m: SubordResponse| [dfir_rs::util::PersistenceKeyed::Delete(m.xid), dfir_rs::util::PersistenceKeyed::Persist(m.xid, 3)]) -> defer_tick() -> phase_map; ack_p2s diff --git a/hydroflow/examples/two_pc_hf/helpers.rs b/dfir_rs/examples/two_pc_hf/helpers.rs similarity index 100% rename from hydroflow/examples/two_pc_hf/helpers.rs rename to dfir_rs/examples/two_pc_hf/helpers.rs diff --git a/hydroflow/examples/two_pc_hf/main.rs b/dfir_rs/examples/two_pc_hf/main.rs similarity index 95% rename from hydroflow/examples/two_pc_hf/main.rs rename to dfir_rs/examples/two_pc_hf/main.rs index 0d8d18b82e95..94ff69272f9d 100644 --- a/hydroflow/examples/two_pc_hf/main.rs +++ b/dfir_rs/examples/two_pc_hf/main.rs @@ -3,8 +3,8 @@ use std::path::Path; use clap::{Parser, ValueEnum}; use coordinator::run_coordinator; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use serde::Deserialize; use subordinate::run_subordinate; @@ -46,7 +46,7 @@ struct Addresses { subordinates: Vec, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let opts = Opts::parse(); let addr = opts.addr; @@ -67,7 +67,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; const TEST_NAME: &str = "two_pc_hf"; diff --git a/hydroflow/examples/two_pc_hf/members.json b/dfir_rs/examples/two_pc_hf/members.json similarity index 100% rename from hydroflow/examples/two_pc_hf/members.json rename to dfir_rs/examples/two_pc_hf/members.json diff --git a/hydroflow/examples/two_pc_hf/protocol.rs b/dfir_rs/examples/two_pc_hf/protocol.rs similarity index 100% rename from hydroflow/examples/two_pc_hf/protocol.rs rename to dfir_rs/examples/two_pc_hf/protocol.rs diff --git a/hydroflow/examples/two_pc_hf/subordinate.rs b/dfir_rs/examples/two_pc_hf/subordinate.rs similarity index 94% rename from hydroflow/examples/two_pc_hf/subordinate.rs rename to dfir_rs/examples/two_pc_hf/subordinate.rs index 52a1e703fa1b..1c732ec83117 100644 --- a/hydroflow/examples/two_pc_hf/subordinate.rs +++ b/dfir_rs/examples/two_pc_hf/subordinate.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; use crate::helpers::decide; use crate::protocol::{CoordMsg, MsgType, SubordResponse}; @@ -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: Dfir = dfir_syntax! { // Outbound address server_addr = source_json(path) -> map(|json: Addresses| json.coordinator) diff --git a/hydroflow/examples/vector_clock/README.md b/dfir_rs/examples/vector_clock/README.md similarity index 100% rename from hydroflow/examples/vector_clock/README.md rename to dfir_rs/examples/vector_clock/README.md diff --git a/hydroflow/examples/vector_clock/client.rs b/dfir_rs/examples/vector_clock/client.rs similarity index 96% rename from hydroflow/examples/vector_clock/client.rs rename to dfir_rs/examples/vector_clock/client.rs index 7a172a870a74..99fe0d32c381 100644 --- a/hydroflow/examples/vector_clock/client.rs +++ b/dfir_rs/examples/vector_clock/client.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::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/main.rs b/dfir_rs/examples/vector_clock/main.rs similarity index 94% rename from hydroflow/examples/vector_clock/main.rs rename to dfir_rs/examples/vector_clock/main.rs index e221059b90fd..97abb8965b4b 100644 --- a/hydroflow/examples/vector_clock/main.rs +++ b/dfir_rs/examples/vector_clock/main.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use server::run_server; mod client; @@ -34,7 +34,7 @@ struct Opts { graph: Option, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { // parse command line arguments let opts = Opts::parse(); @@ -61,7 +61,7 @@ async fn main() { fn test() { use std::io::Write; - use hydroflow::util::{run_cargo_example, wait_for_process_output}; + use dfir_rs::util::{run_cargo_example, wait_for_process_output}; let (_server, _, mut server_stdout) = run_cargo_example("vector_clock", "--role server --addr 127.0.0.1:11053"); diff --git a/hydroflow/examples/vector_clock/protocol.rs b/dfir_rs/examples/vector_clock/protocol.rs similarity index 100% rename from hydroflow/examples/vector_clock/protocol.rs rename to dfir_rs/examples/vector_clock/protocol.rs diff --git a/hydroflow/examples/vector_clock/server.rs b/dfir_rs/examples/vector_clock/server.rs similarity index 90% rename from hydroflow/examples/vector_clock/server.rs rename to dfir_rs/examples/vector_clock/server.rs index 6b97600f8043..a22a10fb848b 100644 --- a/hydroflow/examples/vector_clock/server.rs +++ b/dfir_rs/examples/vector_clock/server.rs @@ -1,9 +1,9 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{UdpSink, UdpStream}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{UdpSink, UdpStream}; use lattices::map_union::MapUnionSingletonMap; use lattices::{Max, Merge}; @@ -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: Dfir = dfir_syntax! { // Define a shared inbound channel inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap) -> tee(); diff --git a/hydroflow/src/compiled/mod.rs b/dfir_rs/src/compiled/mod.rs similarity index 100% rename from hydroflow/src/compiled/mod.rs rename to dfir_rs/src/compiled/mod.rs diff --git a/hydroflow/src/compiled/pull/anti_join.rs b/dfir_rs/src/compiled/pull/anti_join.rs similarity index 100% rename from hydroflow/src/compiled/pull/anti_join.rs rename to dfir_rs/src/compiled/pull/anti_join.rs diff --git a/hydroflow/src/compiled/pull/cross_join.rs b/dfir_rs/src/compiled/pull/cross_join.rs similarity index 100% rename from hydroflow/src/compiled/pull/cross_join.rs rename to dfir_rs/src/compiled/pull/cross_join.rs diff --git a/hydroflow/src/compiled/pull/half_join_state/fold.rs b/dfir_rs/src/compiled/pull/half_join_state/fold.rs similarity index 100% rename from hydroflow/src/compiled/pull/half_join_state/fold.rs rename to dfir_rs/src/compiled/pull/half_join_state/fold.rs diff --git a/hydroflow/src/compiled/pull/half_join_state/fold_from.rs b/dfir_rs/src/compiled/pull/half_join_state/fold_from.rs similarity index 100% rename from hydroflow/src/compiled/pull/half_join_state/fold_from.rs rename to dfir_rs/src/compiled/pull/half_join_state/fold_from.rs diff --git a/hydroflow/src/compiled/pull/half_join_state/mod.rs b/dfir_rs/src/compiled/pull/half_join_state/mod.rs similarity index 100% rename from hydroflow/src/compiled/pull/half_join_state/mod.rs rename to dfir_rs/src/compiled/pull/half_join_state/mod.rs diff --git a/hydroflow/src/compiled/pull/half_join_state/multiset.rs b/dfir_rs/src/compiled/pull/half_join_state/multiset.rs similarity index 100% rename from hydroflow/src/compiled/pull/half_join_state/multiset.rs rename to dfir_rs/src/compiled/pull/half_join_state/multiset.rs diff --git a/hydroflow/src/compiled/pull/half_join_state/reduce.rs b/dfir_rs/src/compiled/pull/half_join_state/reduce.rs similarity index 100% rename from hydroflow/src/compiled/pull/half_join_state/reduce.rs rename to dfir_rs/src/compiled/pull/half_join_state/reduce.rs diff --git a/hydroflow/src/compiled/pull/half_join_state/set.rs b/dfir_rs/src/compiled/pull/half_join_state/set.rs similarity index 100% rename from hydroflow/src/compiled/pull/half_join_state/set.rs rename to dfir_rs/src/compiled/pull/half_join_state/set.rs diff --git a/hydroflow/src/compiled/pull/mod.rs b/dfir_rs/src/compiled/pull/mod.rs similarity index 100% rename from hydroflow/src/compiled/pull/mod.rs rename to dfir_rs/src/compiled/pull/mod.rs diff --git a/hydroflow/src/compiled/pull/symmetric_hash_join.rs b/dfir_rs/src/compiled/pull/symmetric_hash_join.rs similarity index 100% rename from hydroflow/src/compiled/pull/symmetric_hash_join.rs rename to dfir_rs/src/compiled/pull/symmetric_hash_join.rs diff --git a/hydroflow/src/declarative_macro.rs b/dfir_rs/src/declarative_macro.rs similarity index 95% rename from hydroflow/src/declarative_macro.rs rename to dfir_rs/src/declarative_macro.rs index 12f8d3ece978..5454d82ac0df 100644 --- a/hydroflow/src/declarative_macro.rs +++ b/dfir_rs/src/declarative_macro.rs @@ -44,9 +44,9 @@ macro_rules! assert_var_impl { }; } -/// Tests that the given warnings are emitted by the hydroflow macro invocation. +/// Tests that the given warnings are emitted by the dfir macro invocation. /// -/// For example usage, see `hydroflow/tests/surface_warnings.rs`. +/// For example usage, see `dfir/tests/surface_warnings.rs`. #[macro_export] macro_rules! hydroflow_expect_warnings { ( @@ -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/dfir_rs/src/lib.rs similarity index 74% rename from hydroflow/src/lib.rs rename to dfir_rs/src/lib.rs index 63c6c2f48360..c0b365039947 100644 --- a/hydroflow/src/lib.rs +++ b/dfir_rs/src/lib.rs @@ -2,13 +2,13 @@ //! Hydroflow is a low-level dataflow-based runtime system for the [Hydro Project](https://hydro.run/). //! -//! The primary item in this crate is the [`Hydroflow`](crate::scheduled::graph::Hydroflow) struct, +//! The primary item in this crate is the [`Hydroflow`](crate::scheduled::graph::Dfir) 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 = dfir_rs::dfir_syntax! { //! source_iter(["hello", "world"]) -> for_each(|s| println!("{}", s)); //! }; //! hf.run_available(); @@ -21,7 +21,7 @@ pub mod scheduled; pub mod util; #[cfg(feature = "meta")] -pub use hydroflow_lang as lang; +pub use dfir_lang as lang; #[cfg(feature = "python")] pub use pyo3; pub use variadics::{self, var_args, var_expr, var_type}; @@ -32,12 +32,12 @@ pub use { /// `#[macro_use]` automagically brings the declarative macro export to the crate-level. mod declarative_macro; -#[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, +#[cfg(feature = "dfir_datalog")] +pub use dfir_datalog::*; +#[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, }; // TODO(mingwei): Use 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/scheduled/context.rs b/dfir_rs/src/scheduled/context.rs similarity index 100% rename from hydroflow/src/scheduled/context.rs rename to dfir_rs/src/scheduled/context.rs diff --git a/hydroflow/src/scheduled/graph.rs b/dfir_rs/src/scheduled/graph.rs similarity index 97% rename from hydroflow/src/scheduled/graph.rs rename to dfir_rs/src/scheduled/graph.rs index 5a5b302e731c..a7fd221024a5 100644 --- a/hydroflow/src/scheduled/graph.rs +++ b/dfir_rs/src/scheduled/graph.rs @@ -1,4 +1,4 @@ -//! Module for the [`Hydroflow`] struct and helper items. +//! Module for the [`Dfir`] struct and helper items. use std::any::Any; use std::borrow::Cow; @@ -7,9 +7,9 @@ use std::future::Future; use std::marker::PhantomData; #[cfg(feature = "meta")] -use hydroflow_lang::diagnostic::{Diagnostic, SerdeSpan}; +use dfir_lang::diagnostic::{Diagnostic, SerdeSpan}; #[cfg(feature = "meta")] -use hydroflow_lang::graph::HydroflowGraph; +use dfir_lang::graph::DfirGraph; use ref_cast::RefCast; use smallvec::SmallVec; use web_time::SystemTime; @@ -25,9 +25,9 @@ use super::{HandoffId, SubgraphId}; use crate::scheduled::ticks::{TickDuration, TickInstant}; use crate::Never; -/// A Hydroflow graph. Owns, schedules, and runs the compiled subgraphs. +/// A DFIR graph. Owns, schedules, and runs the compiled subgraphs. #[derive(Default)] -pub struct Hydroflow<'a> { +pub struct Dfir<'a> { pub(super) subgraphs: Vec>, pub(super) context: Context, @@ -35,7 +35,7 @@ pub struct Hydroflow<'a> { #[cfg(feature = "meta")] /// See [`Self::meta_graph()`]. - meta_graph: Option, + meta_graph: Option, #[cfg(feature = "meta")] /// See [`Self::diagnostics()`]. @@ -43,7 +43,7 @@ pub struct Hydroflow<'a> { } /// Methods for [`TeeingHandoff`] teeing and dropping. -impl Hydroflow<'_> { +impl Dfir<'_> { /// Tees a [`TeeingHandoff`]. pub fn teeing_handoff_tee( &mut self, @@ -128,7 +128,7 @@ impl Hydroflow<'_> { } } -impl<'a> Hydroflow<'a> { +impl<'a> Dfir<'a> { /// Create a new empty Hydroflow graph. pub fn new() -> Self { Default::default() @@ -139,7 +139,7 @@ impl<'a> Hydroflow<'a> { pub fn __assign_meta_graph(&mut self, _meta_graph_json: &str) { #[cfg(feature = "meta")] { - let mut meta_graph: HydroflowGraph = + let mut meta_graph: DfirGraph = serde_json::from_str(_meta_graph_json).expect("Failed to deserialize graph."); let mut op_inst_diagnostics = Vec::new(); @@ -169,7 +169,7 @@ impl<'a> Hydroflow<'a> { /// Return a handle to the meta `HydroflowGraph` if set. The `HydroflowGraph is a /// representation of all the operators, subgraphs, and handoffs in this `Hydroflow` instance. /// Will only be set if this graph was constructed using a surface syntax macro. - pub fn meta_graph(&self) -> Option<&HydroflowGraph> { + pub fn meta_graph(&self) -> Option<&DfirGraph> { self.meta_graph.as_ref() } @@ -253,7 +253,7 @@ impl<'a> Hydroflow<'a> { /// Returns true if any work was done. #[tracing::instrument(level = "trace", skip(self), fields(tick = u64::from(self.context.current_tick), stratum = self.context.current_stratum), ret)] pub fn run_stratum(&mut self) -> bool { - // Make sure to spawn tasks once hydroflow is running! + // Make sure to spawn tasks once dfir is running! // This drains the task buffer, so becomes a no-op after first call. self.context.spawn_tasks(); @@ -776,7 +776,7 @@ impl<'a> Hydroflow<'a> { } } -impl Hydroflow<'_> { +impl Dfir<'_> { /// Alias for [`Context::request_task`]. pub fn request_task(&mut self, future: Fut) where @@ -796,7 +796,7 @@ impl Hydroflow<'_> { } } -impl Drop for Hydroflow<'_> { +impl Drop for Dfir<'_> { fn drop(&mut self) { self.abort_tasks(); } @@ -804,7 +804,7 @@ impl Drop for Hydroflow<'_> { /// A handoff and its input and output [SubgraphId]s. /// -/// Internal use: used to track the hydroflow graph structure. +/// Internal use: used to track the dfir graph structure. /// /// TODO(mingwei): restructure `PortList` so this can be crate-private. #[doc(hidden)] @@ -860,7 +860,7 @@ impl HandoffData { /// A subgraph along with its predecessor and successor [SubgraphId]s. /// -/// Used internally by the [Hydroflow] struct to represent the dataflow graph +/// Used internally by the [Dfir] struct to represent the dataflow graph /// structure and scheduled state. pub(super) struct SubgraphData<'a> { /// A friendly name for diagnostics. @@ -874,10 +874,10 @@ pub(super) struct SubgraphData<'a> { preds: Vec, succs: Vec, - /// If this subgraph is scheduled in [`Hydroflow::stratum_queues`]. + /// If this subgraph is scheduled in [`dfir_rs::stratum_queues`]. /// [`Cell`] allows modifying this field when iterating `Self::preds` or /// `Self::succs`, as all `SubgraphData` are owned by the same vec - /// `Hydroflow::subgraphs`. + /// `dfir_rs::subgraphs`. is_scheduled: Cell, /// Keep track of the last tick that this subgraph was run in diff --git a/hydroflow/src/scheduled/graph_ext.rs b/dfir_rs/src/scheduled/graph_ext.rs similarity index 98% rename from hydroflow/src/scheduled/graph_ext.rs rename to dfir_rs/src/scheduled/graph_ext.rs index 1d0be9d28dd6..8aba769e7fe8 100644 --- a/hydroflow/src/scheduled/graph_ext.rs +++ b/dfir_rs/src/scheduled/graph_ext.rs @@ -1,4 +1,4 @@ -//! Helper extensions for [`Hydroflow`]. +//! Helper extensions for [`Dfir`]. use core::task; use std::borrow::Cow; @@ -8,7 +8,7 @@ use std::task::Poll; use futures::Stream; use super::context::Context; -use super::graph::Hydroflow; +use super::graph::Dfir; use super::handoff::{CanReceive, Handoff}; use super::input::Input; use super::port::{RecvCtx, RecvPort, SendCtx, SendPort}; @@ -126,7 +126,7 @@ pub trait GraphExt { W: 'static + Handoff + CanReceive; } -impl GraphExt for Hydroflow<'_> { +impl GraphExt for Dfir<'_> { subgraph_ext!(impl add_subgraph_sink, (recv_port: R), ()); subgraph_ext!( impl add_subgraph_2sink, diff --git a/hydroflow/src/scheduled/handoff/handoff_list.rs b/dfir_rs/src/scheduled/handoff/handoff_list.rs similarity index 100% rename from hydroflow/src/scheduled/handoff/handoff_list.rs rename to dfir_rs/src/scheduled/handoff/handoff_list.rs diff --git a/hydroflow/src/scheduled/handoff/mod.rs b/dfir_rs/src/scheduled/handoff/mod.rs similarity index 100% rename from hydroflow/src/scheduled/handoff/mod.rs rename to dfir_rs/src/scheduled/handoff/mod.rs diff --git a/hydroflow/src/scheduled/handoff/tee.rs b/dfir_rs/src/scheduled/handoff/tee.rs similarity index 100% rename from hydroflow/src/scheduled/handoff/tee.rs rename to dfir_rs/src/scheduled/handoff/tee.rs diff --git a/hydroflow/src/scheduled/handoff/vector.rs b/dfir_rs/src/scheduled/handoff/vector.rs similarity index 100% rename from hydroflow/src/scheduled/handoff/vector.rs rename to dfir_rs/src/scheduled/handoff/vector.rs diff --git a/hydroflow/src/scheduled/input.rs b/dfir_rs/src/scheduled/input.rs similarity index 100% rename from hydroflow/src/scheduled/input.rs rename to dfir_rs/src/scheduled/input.rs diff --git a/hydroflow/src/scheduled/mod.rs b/dfir_rs/src/scheduled/mod.rs similarity index 83% rename from hydroflow/src/scheduled/mod.rs rename to dfir_rs/src/scheduled/mod.rs index 0b385ee01a83..b322411cce39 100644 --- a/hydroflow/src/scheduled/mod.rs +++ b/dfir_rs/src/scheduled/mod.rs @@ -1,6 +1,6 @@ //! Hydroflow's outer scheduled layer. Deals with inter-subgraph runtime data-passing and scheduling. //! -//! The most important item is the [`Hydroflow`](graph::Hydroflow) struct. Most of the items in this +//! The most important item is the [`Hydroflow`](graph::Dfir) struct. Most of the items in this //! module are supporting the implementation of the `Hydroflow` struct and its operation. use std::fmt::{Display, Formatter, Result}; @@ -21,7 +21,7 @@ pub(crate) mod subgraph; pub mod ticks; -/// A subgraph's ID. Invalid if used in a different [`graph::Hydroflow`] +/// A subgraph's ID. Invalid if used in a different [`graph::Dfir`] /// instance than the original that created it. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize)] #[repr(transparent)] @@ -32,7 +32,7 @@ impl Display for SubgraphId { } } -/// A handoff's ID. Invalid if used in a different [`graph::Hydroflow`] +/// A handoff's ID. Invalid if used in a different [`graph::Dfir`] /// instance than the original that created it. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)] #[repr(transparent)] @@ -43,7 +43,7 @@ impl Display for HandoffId { } } -/// A staten handle's ID. Invalid if used in a different [`graph::Hydroflow`] +/// A staten handle's ID. Invalid if used in a different [`graph::Dfir`] /// instance than the original that created it. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[repr(transparent)] diff --git a/hydroflow/src/scheduled/net/mod.rs b/dfir_rs/src/scheduled/net/mod.rs similarity index 99% rename from hydroflow/src/scheduled/net/mod.rs rename to dfir_rs/src/scheduled/net/mod.rs index 10664f8a58d3..cf16549263b7 100644 --- a/hydroflow/src/scheduled/net/mod.rs +++ b/dfir_rs/src/scheduled/net/mod.rs @@ -66,7 +66,7 @@ use tokio::net::tcp::{OwnedReadHalf, OwnedWriteHalf}; use tokio::net::TcpStream; use tokio_util::codec::{FramedRead, FramedWrite, LengthDelimitedCodec}; -use super::graph::Hydroflow; +use super::graph::Dfir; use super::graph_ext::GraphExt; use super::handoff::VecHandoff; use super::port::{RecvPort, SendPort}; @@ -96,7 +96,7 @@ impl Message { } } -impl Hydroflow<'_> { +impl Dfir<'_> { fn register_read_tcp_stream(&mut self, reader: OwnedReadHalf) -> RecvPort> { let reader = FramedRead::new(reader, LengthDelimitedCodec::new()); let (send_port, recv_port) = self.make_edge("tcp ingress handoff"); diff --git a/hydroflow/src/scheduled/net/network_vertex.rs b/dfir_rs/src/scheduled/net/network_vertex.rs similarity index 99% rename from hydroflow/src/scheduled/net/network_vertex.rs rename to dfir_rs/src/scheduled/net/network_vertex.rs index b2db71169646..f1750c7ceea4 100644 --- a/hydroflow/src/scheduled/net/network_vertex.rs +++ b/dfir_rs/src/scheduled/net/network_vertex.rs @@ -8,7 +8,7 @@ use serde::Serialize; use tokio::net::{TcpListener, TcpStream}; use tokio_util::codec::{FramedRead, FramedWrite, LengthDelimitedCodec}; -use crate::scheduled::graph::Hydroflow; +use crate::scheduled::graph::Dfir; use crate::scheduled::graph_ext::GraphExt; use crate::scheduled::handoff::VecHandoff; use crate::scheduled::port::{RecvPort, SendPort}; @@ -18,7 +18,7 @@ pub type Address = String; // These methods can't be wrapped up in a trait because async methods are not // allowed in traits (yet). -impl Hydroflow<'_> { +impl Dfir<'_> { // TODO(justin): document these, but they're derivatives of inbound_tcp_vertex_internal. pub async fn inbound_tcp_vertex_port(&mut self, port: u16) -> RecvPort> where diff --git a/hydroflow/src/scheduled/port.rs b/dfir_rs/src/scheduled/port.rs similarity index 91% rename from hydroflow/src/scheduled/port.rs rename to dfir_rs/src/scheduled/port.rs index e28b5a8fa387..5b80da35f3e9 100644 --- a/hydroflow/src/scheduled/port.rs +++ b/dfir_rs/src/scheduled/port.rs @@ -6,7 +6,7 @@ use ref_cast::RefCast; use sealed::sealed; use super::HandoffId; -use crate::scheduled::graph::Hydroflow; +use crate::scheduled::graph::Dfir; use crate::scheduled::handoff::{CanReceive, Handoff, TeeingHandoff, TryCanReceive}; /// An empty trait used to denote [`Polarity`]: either **send** or **receive**. @@ -33,7 +33,7 @@ impl Polarity for SEND {} impl Polarity for RECV {} /// Lightweight ID struct representing an input or output port for a [`Handoff`] added to a -/// [`Hydroflow`] instance.. +/// [`Dfir`] instance.. #[must_use] pub struct Port where @@ -50,17 +50,17 @@ pub type RecvPort = Port; /// Methods for [`TeeingHandoff`] teeing and dropping. impl RecvPort> { - /// Tees this [`TeeingHandoff`], given the [`Hydroflow`] instance it belongs to. - pub fn tee(&self, hf: &mut Hydroflow) -> RecvPort> { + /// Tees this [`TeeingHandoff`], given the [`Dfir`] instance it belongs to. + pub fn tee(&self, hf: &mut Dfir) -> RecvPort> { hf.teeing_handoff_tee(self) } /// Marks this output of a [`TeeingHandoff`] as dropped so that no more data will be sent to - /// it, given the [`Hydroflow`] instance it belongs to. + /// it, given the [`Dfir`] instance it belongs to. /// /// It is recommended to not not use this method and instead simply avoid teeing a /// [`TeeingHandoff`] when it is not needed. - pub fn drop(self, hf: &mut Hydroflow) { + pub fn drop(self, hf: &mut Dfir) { hf.teeing_handoff_drop(self) } } diff --git a/hydroflow/src/scheduled/query.rs b/dfir_rs/src/scheduled/query.rs similarity index 97% rename from hydroflow/src/scheduled/query.rs rename to dfir_rs/src/scheduled/query.rs index 50595df44963..3463d0430017 100644 --- a/hydroflow/src/scheduled/query.rs +++ b/dfir_rs/src/scheduled/query.rs @@ -9,14 +9,14 @@ use super::context::Context; use super::graph_ext::GraphExt; use super::handoff::Iter; use super::port::{RecvPort, SendCtx}; -use crate::scheduled::graph::Hydroflow; +use crate::scheduled::graph::Dfir; use crate::scheduled::handoff::VecHandoff; const QUERY_EDGE_NAME: Cow<'static, str> = Cow::Borrowed("query handoff"); #[derive(Default)] pub struct Query<'a> { - df: Rc>>, + df: Rc>>, } impl<'a> Query<'a> { @@ -73,7 +73,7 @@ pub struct Operator<'a, T> where T: 'static, { - df: Rc>>, + df: Rc>>, recv_port: RecvPort>, } diff --git a/hydroflow/src/scheduled/reactor.rs b/dfir_rs/src/scheduled/reactor.rs similarity index 94% rename from hydroflow/src/scheduled/reactor.rs rename to dfir_rs/src/scheduled/reactor.rs index 5add64ad9ff4..896069361b6f 100644 --- a/hydroflow/src/scheduled/reactor.rs +++ b/dfir_rs/src/scheduled/reactor.rs @@ -5,7 +5,7 @@ use tokio::sync::mpsc::UnboundedSender; use super::SubgraphId; -/// A handle into a specific [super::graph::Hydroflow] instance for triggering +/// A handle into a specific [super::graph::Dfir] instance for triggering /// subgraphs to run, possibly from another thread. /// /// Reactor events are considered to be external events. diff --git a/hydroflow/src/scheduled/state.rs b/dfir_rs/src/scheduled/state.rs similarity index 93% rename from hydroflow/src/scheduled/state.rs rename to dfir_rs/src/scheduled/state.rs index 3faa20d7d4ea..4567b8a1cdec 100644 --- a/hydroflow/src/scheduled/state.rs +++ b/dfir_rs/src/scheduled/state.rs @@ -5,8 +5,8 @@ use std::marker::PhantomData; use super::StateId; -/// A handle into a particular [`Hydroflow`](super::graph::Hydroflow) instance, referring to data -/// inserted by [`add_state`](super::graph::Hydroflow::add_state). +/// A handle into a particular [`Hydroflow`](super::graph::Dfir) instance, referring to data +/// inserted by [`add_state`](super::graph::Dfir::add_state). /// /// If you need to store state handles in a data structure see [`StateHandleErased`] which hides /// the generic type parameter. diff --git a/hydroflow/src/scheduled/subgraph.rs b/dfir_rs/src/scheduled/subgraph.rs similarity index 100% rename from hydroflow/src/scheduled/subgraph.rs rename to dfir_rs/src/scheduled/subgraph.rs diff --git a/hydroflow/src/scheduled/ticks.rs b/dfir_rs/src/scheduled/ticks.rs similarity index 94% rename from hydroflow/src/scheduled/ticks.rs rename to dfir_rs/src/scheduled/ticks.rs index 22b981a99c00..205f1db40bf7 100644 --- a/hydroflow/src/scheduled/ticks.rs +++ b/dfir_rs/src/scheduled/ticks.rs @@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize}; /// `TickInstant` instances can be subtracted to calculate the `TickDuration` between them. /// /// ``` -/// # use hydroflow::scheduled::ticks::{TickDuration, TickInstant}; +/// # use dfir_rs::scheduled::ticks::{TickDuration, TickInstant}; /// /// assert_eq!(TickInstant(1) - TickInstant(0), TickDuration::SINGLE_TICK); /// assert_eq!(TickInstant(0) - TickInstant(1), -TickDuration::SINGLE_TICK); @@ -30,13 +30,13 @@ pub struct TickInstant(pub u64); /// `TickDuration` instances can be negative to allow for calculation of `TickInstant` instances in the past. /// /// ``` -/// # use hydroflow::scheduled::ticks::{TickDuration, TickInstant}; +/// # use dfir_rs::scheduled::ticks::{TickDuration, TickInstant}; /// assert_eq!(TickInstant(1) + TickDuration::new(-1), TickInstant(0)) /// ``` /// `TickDuration` instances can be added/subtracted to/from other `TickDuration` instances /// /// ``` -/// # use hydroflow::scheduled::ticks::TickDuration; +/// # use dfir_rs::scheduled::ticks::TickDuration; /// assert_eq!(TickDuration::ZERO + TickDuration::ZERO, TickDuration::ZERO); /// assert_eq!( /// TickDuration::ZERO + TickDuration::SINGLE_TICK, @@ -81,8 +81,8 @@ impl TickDuration { /// the same `TickInstant` or `TickDuration`. /// /// ``` - /// # use hydroflow::scheduled::ticks::{TickDuration, TickInstant}; - /// # use hydroflow_lang::graph::ops::DelayType::Tick; + /// # use dfir_rs::scheduled::ticks::{TickDuration, TickInstant}; + /// # use dfir_lang::graph::ops::DelayType::Tick; /// let ticks = TickInstant::new(100); /// assert_eq!(ticks + TickDuration::ZERO, ticks); /// assert_eq!(ticks - TickDuration::ZERO, ticks); @@ -98,7 +98,7 @@ impl TickDuration { /// It is the duration between two consecutive `TickInstant` instances. /// /// ``` - /// # use hydroflow::scheduled::ticks::{TickDuration, TickInstant}; + /// # use dfir_rs::scheduled::ticks::{TickDuration, TickInstant}; /// assert_eq!(TickInstant(0) + TickDuration::SINGLE_TICK, TickInstant(1)) /// ``` pub const SINGLE_TICK: Self = TickDuration { ticks: 1 }; diff --git a/hydroflow/src/util/clear.rs b/dfir_rs/src/util/clear.rs similarity index 100% rename from hydroflow/src/util/clear.rs rename to dfir_rs/src/util/clear.rs diff --git a/hydroflow/src/util/demux_enum.rs b/dfir_rs/src/util/demux_enum.rs similarity index 92% rename from hydroflow/src/util/demux_enum.rs rename to dfir_rs/src/util/demux_enum.rs index d9ef820dcd63..f177a59425d0 100644 --- a/hydroflow/src/util/demux_enum.rs +++ b/dfir_rs/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. /// @@ -30,5 +30,5 @@ pub trait SingleVariant: DemuxEnumBase { } /// Base implementation to constrain that [`DemuxEnum`] is implemented. -#[diagnostic::on_unimplemented(note = "use `#[derive(hydroflow::DemuxEnum)]`")] +#[diagnostic::on_unimplemented(note = "use `#[derive(dfir_rs::DemuxEnum)]`")] pub trait DemuxEnumBase {} diff --git a/hydroflow/src/util/deploy.rs b/dfir_rs/src/util/deploy.rs similarity index 97% rename from hydroflow/src/util/deploy.rs rename to dfir_rs/src/util/deploy.rs index 64d436ea440b..86ced7926f3a 100644 --- a/hydroflow/src/util/deploy.rs +++ b/dfir_rs/src/util/deploy.rs @@ -6,7 +6,7 @@ use std::collections::HashMap; pub use hydroflow_deploy_integration::*; use serde::de::DeserializeOwned; -use crate::scheduled::graph::Hydroflow; +use crate::scheduled::graph::Dfir; #[macro_export] macro_rules! launch { @@ -24,7 +24,7 @@ macro_rules! launch { pub use crate::launch; -pub async fn launch_flow(mut flow: Hydroflow<'_>) { +pub async fn launch_flow(mut flow: Dfir<'_>) { let stop = tokio::sync::oneshot::channel(); tokio::task::spawn_blocking(|| { let mut line = String::new(); diff --git a/hydroflow/src/util/mod.rs b/dfir_rs/src/util/mod.rs similarity index 98% rename from hydroflow/src/util/mod.rs rename to dfir_rs/src/util/mod.rs index 4dd2332d4f36..e864d4282721 100644 --- a/hydroflow/src/util/mod.rs +++ b/dfir_rs/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; @@ -297,7 +297,7 @@ impl Drop for DroppableChild { pub fn run_cargo_example(test_name: &str, args: &str) -> (DroppableChild, ChildStdin, ChildStdout) { let mut server = if args.is_empty() { std::process::Command::new("cargo") - .args(["run", "-p", "hydroflow", "--example"]) + .args(["run", "-p", "dfir_rs", "--example"]) .arg(test_name) .stdin(Stdio::piped()) .stdout(Stdio::piped()) @@ -305,7 +305,7 @@ pub fn run_cargo_example(test_name: &str, args: &str) -> (DroppableChild, ChildS .unwrap() } else { std::process::Command::new("cargo") - .args(["run", "-p", "hydroflow", "--example"]) + .args(["run", "-p", "dfir_rs", "--example"]) .arg(test_name) .arg("--") .args(args.split(' ')) diff --git a/hydroflow/src/util/monotonic.rs b/dfir_rs/src/util/monotonic.rs similarity index 100% rename from hydroflow/src/util/monotonic.rs rename to dfir_rs/src/util/monotonic.rs diff --git a/hydroflow/src/util/monotonic_map.rs b/dfir_rs/src/util/monotonic_map.rs similarity index 100% rename from hydroflow/src/util/monotonic_map.rs rename to dfir_rs/src/util/monotonic_map.rs diff --git a/hydroflow/src/util/multiset.rs b/dfir_rs/src/util/multiset.rs similarity index 100% rename from hydroflow/src/util/multiset.rs rename to dfir_rs/src/util/multiset.rs diff --git a/hydroflow/src/util/simulation.rs b/dfir_rs/src/util/simulation.rs similarity index 97% rename from hydroflow/src/util/simulation.rs rename to dfir_rs/src/util/simulation.rs index 86b2bc785644..fa173ad0f02b 100644 --- a/hydroflow/src/util/simulation.rs +++ b/dfir_rs/src/util/simulation.rs @@ -81,7 +81,7 @@ use tokio_stream::wrappers::UnboundedReceiverStream; use tokio_stream::Stream; use tracing::trace; -use crate::scheduled::graph::Hydroflow; +use crate::scheduled::graph::Dfir; use crate::util::{collect_ready_async, unbounded_channel}; /// A hostname is a unique identifier for a host in the simulation. It is used to address messages @@ -143,7 +143,7 @@ pub struct Outbox { /// and outboxes. pub struct Host { name: Hostname, - transducer: Hydroflow<'static>, + transducer: Dfir<'static>, inputs: HashMap, output: HashMap, } @@ -159,7 +159,7 @@ impl Host { /// A builder for constructing a host in the simulation. pub struct HostBuilder { name: Hostname, - transducer: Option>, + transducer: Option>, inboxes: HashMap, outboxes: HashMap, } @@ -179,7 +179,7 @@ fn sink_from_fn(mut f: impl FnMut(T)) -> impl Sink { impl TransducerBuilderContext<'_> { /// Create a new inbox on the host with the given interface name. Returns a stream that can - /// be read by the transducer using the source_stream hydroflow operator. + /// be read by the transducer using the source_stream dfir operator. pub fn new_inbox( &mut self, interface: InterfaceName, @@ -195,7 +195,7 @@ impl TransducerBuilderContext<'_> { } /// Creates a new outbox on the host with the given interface name. Returns a sink that can - /// be written to by the transducer using the dest_sink hydroflow operator. + /// be written to by the transducer using the dest_sink dfir operator. pub fn new_outbox( &mut self, interface: InterfaceName, @@ -229,7 +229,7 @@ impl HostBuilder { /// Supplies the (mandatory) transducer that runs on this host. pub fn with_transducer(mut self, builder: F) -> Self where - F: FnOnce(&mut TransducerBuilderContext) -> Hydroflow<'static>, + F: FnOnce(&mut TransducerBuilderContext) -> Dfir<'static>, { let mut context = TransducerBuilderContext { inboxes: &mut self.inboxes, @@ -272,7 +272,7 @@ impl Fleet { /// Adds a new host to the fleet with the given name and transducer. pub fn add_host(&mut self, name: String, transducer_builder: F) -> &Host where - F: FnOnce(&mut TransducerBuilderContext) -> Hydroflow<'static>, + F: FnOnce(&mut TransducerBuilderContext) -> Dfir<'static>, { let host = HostBuilder::new(name.clone()) .with_transducer(transducer_builder) @@ -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/src/util/socket.rs b/dfir_rs/src/util/socket.rs similarity index 100% rename from hydroflow/src/util/socket.rs rename to dfir_rs/src/util/socket.rs diff --git a/hydroflow/src/util/sparse_vec.rs b/dfir_rs/src/util/sparse_vec.rs similarity index 100% rename from hydroflow/src/util/sparse_vec.rs rename to dfir_rs/src/util/sparse_vec.rs diff --git a/hydroflow/src/util/tcp.rs b/dfir_rs/src/util/tcp.rs similarity index 100% rename from hydroflow/src/util/tcp.rs rename to dfir_rs/src/util/tcp.rs diff --git a/hydroflow/src/util/udp.rs b/dfir_rs/src/util/udp.rs similarity index 100% rename from hydroflow/src/util/udp.rs rename to dfir_rs/src/util/udp.rs diff --git a/hydroflow/src/util/unsync/mod.rs b/dfir_rs/src/util/unsync/mod.rs similarity index 100% rename from hydroflow/src/util/unsync/mod.rs rename to dfir_rs/src/util/unsync/mod.rs diff --git a/hydroflow/src/util/unsync/mpsc.rs b/dfir_rs/src/util/unsync/mpsc.rs similarity index 100% rename from hydroflow/src/util/unsync/mpsc.rs rename to dfir_rs/src/util/unsync/mpsc.rs diff --git a/hydroflow/tests/compile-fail/datalog_badparse.rs b/dfir_rs/tests/compile-fail/datalog_badparse.rs similarity index 91% rename from hydroflow/tests/compile-fail/datalog_badparse.rs rename to dfir_rs/tests/compile-fail/datalog_badparse.rs index 61bc95500e81..1db267bc5362 100644 --- a/hydroflow/tests/compile-fail/datalog_badparse.rs +++ b/dfir_rs/tests/compile-fail/datalog_badparse.rs @@ -1,4 +1,4 @@ -use hydroflow::datalog; +use dfir_rs::datalog; fn main() { let mut df = datalog!(r#" diff --git a/hydroflow/tests/compile-fail/datalog_badparse.stderr b/dfir_rs/tests/compile-fail/datalog_badparse.stderr similarity index 100% rename from hydroflow/tests/compile-fail/datalog_badparse.stderr rename to dfir_rs/tests/compile-fail/datalog_badparse.stderr diff --git a/hydroflow/tests/compile-fail/datalog_filter_badtypes.rs b/dfir_rs/tests/compile-fail/datalog_filter_badtypes.rs similarity index 92% rename from hydroflow/tests/compile-fail/datalog_filter_badtypes.rs rename to dfir_rs/tests/compile-fail/datalog_filter_badtypes.rs index da104da491ac..69e608c4dfa7 100644 --- a/hydroflow/tests/compile-fail/datalog_filter_badtypes.rs +++ b/dfir_rs/tests/compile-fail/datalog_filter_badtypes.rs @@ -1,4 +1,4 @@ -use hydroflow::datalog; +use dfir_rs::datalog; #[derive(Clone, PartialEq, Eq, Hash)] struct Uncomparable; diff --git a/hydroflow/tests/compile-fail/datalog_filter_badtypes.stderr b/dfir_rs/tests/compile-fail/datalog_filter_badtypes.stderr similarity index 100% rename from hydroflow/tests/compile-fail/datalog_filter_badtypes.stderr rename to dfir_rs/tests/compile-fail/datalog_filter_badtypes.stderr diff --git a/hydroflow/tests/compile-fail/datalog_join_badtypes.rs b/dfir_rs/tests/compile-fail/datalog_join_badtypes.rs similarity index 92% rename from hydroflow/tests/compile-fail/datalog_join_badtypes.rs rename to dfir_rs/tests/compile-fail/datalog_join_badtypes.rs index e02cf17de2b8..7a4e49ab43b8 100644 --- a/hydroflow/tests/compile-fail/datalog_join_badtypes.rs +++ b/dfir_rs/tests/compile-fail/datalog_join_badtypes.rs @@ -1,4 +1,4 @@ -use hydroflow::datalog; +use dfir_rs::datalog; fn main() { let mut df = datalog!(r#" diff --git a/hydroflow/tests/compile-fail/datalog_join_badtypes.stderr b/dfir_rs/tests/compile-fail/datalog_join_badtypes.stderr similarity index 100% rename from hydroflow/tests/compile-fail/datalog_join_badtypes.stderr rename to dfir_rs/tests/compile-fail/datalog_join_badtypes.stderr diff --git a/hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs b/dfir_rs/tests/compile-fail/surface_anti_join_badtypes.rs similarity index 75% rename from hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs rename to dfir_rs/tests/compile-fail/surface_anti_join_badtypes.rs index 344dca0a8859..68771c49be09 100644 --- a/hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs +++ b/dfir_rs/tests/compile-fail/surface_anti_join_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_anti_join_badtypes.stderr b/dfir_rs/tests/compile-fail/surface_anti_join_badtypes.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_anti_join_badtypes.stderr rename to dfir_rs/tests/compile-fail/surface_anti_join_badtypes.stderr diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_both.rs b/dfir_rs/tests/compile-fail/surface_badgeneric_both.rs similarity index 65% rename from hydroflow/tests/compile-fail/surface_badgeneric_both.rs rename to dfir_rs/tests/compile-fail/surface_badgeneric_both.rs index 47073c41bce6..974215ee3623 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_both.rs +++ b/dfir_rs/tests/compile-fail/surface_badgeneric_both.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_both.stderr b/dfir_rs/tests/compile-fail/surface_badgeneric_both.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_badgeneric_both.stderr rename to dfir_rs/tests/compile-fail/surface_badgeneric_both.stderr diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_extra.rs b/dfir_rs/tests/compile-fail/surface_badgeneric_extra.rs similarity index 73% rename from hydroflow/tests/compile-fail/surface_badgeneric_extra.rs rename to dfir_rs/tests/compile-fail/surface_badgeneric_extra.rs index 5e8e7a209d27..bcb736cf37c4 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_badgeneric_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_extra.stderr b/dfir_rs/tests/compile-fail/surface_badgeneric_extra.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_badgeneric_extra.stderr rename to dfir_rs/tests/compile-fail/surface_badgeneric_extra.stderr diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs b/dfir_rs/tests/compile-fail/surface_badgeneric_lifetime.rs similarity index 64% rename from hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs rename to dfir_rs/tests/compile-fail/surface_badgeneric_lifetime.rs index ec7bc9bc41cc..30a78ba18a4b 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs +++ b/dfir_rs/tests/compile-fail/surface_badgeneric_lifetime.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_lifetime.stderr b/dfir_rs/tests/compile-fail/surface_badgeneric_lifetime.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_badgeneric_lifetime.stderr rename to dfir_rs/tests/compile-fail/surface_badgeneric_lifetime.stderr diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs b/dfir_rs/tests/compile-fail/surface_badgeneric_nocolon.rs similarity index 63% rename from hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs rename to dfir_rs/tests/compile-fail/surface_badgeneric_nocolon.rs index 89641b7935a1..0cf4be0fed51 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs +++ b/dfir_rs/tests/compile-fail/surface_badgeneric_nocolon.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_nocolon.stderr b/dfir_rs/tests/compile-fail/surface_badgeneric_nocolon.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_badgeneric_nocolon.stderr rename to dfir_rs/tests/compile-fail/surface_badgeneric_nocolon.stderr diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_type.rs b/dfir_rs/tests/compile-fail/surface_badgeneric_type.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_badgeneric_type.rs rename to dfir_rs/tests/compile-fail/surface_badgeneric_type.rs index ef2c290c63bc..99046b241d90 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_type.rs +++ b/dfir_rs/tests/compile-fail/surface_badgeneric_type.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_badgeneric_type.stderr b/dfir_rs/tests/compile-fail/surface_badgeneric_type.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_badgeneric_type.stderr rename to dfir_rs/tests/compile-fail/surface_badgeneric_type.stderr diff --git a/hydroflow/tests/compile-fail/surface_conflicting_name.rs b/dfir_rs/tests/compile-fail/surface_conflicting_name.rs similarity index 60% rename from hydroflow/tests/compile-fail/surface_conflicting_name.rs rename to dfir_rs/tests/compile-fail/surface_conflicting_name.rs index 7cf398e6d1fa..b12f30d7e172 100644 --- a/hydroflow/tests/compile-fail/surface_conflicting_name.rs +++ b/dfir_rs/tests/compile-fail/surface_conflicting_name.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_conflicting_name.stderr b/dfir_rs/tests/compile-fail/surface_conflicting_name.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_conflicting_name.stderr rename to dfir_rs/tests/compile-fail/surface_conflicting_name.stderr diff --git a/dfir_rs/tests/compile-fail/surface_degenerate_merge.rs b/dfir_rs/tests/compile-fail/surface_degenerate_merge.rs new file mode 100644 index 000000000000..38ce3a4cb725 --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_degenerate_merge.rs @@ -0,0 +1,8 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + union(); + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_degenerate_merge.stderr b/dfir_rs/tests/compile-fail/surface_degenerate_merge.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_degenerate_merge.stderr rename to dfir_rs/tests/compile-fail/surface_degenerate_merge.stderr diff --git a/hydroflow/tests/compile-fail/surface_degenerate_null.rs b/dfir_rs/tests/compile-fail/surface_degenerate_null.rs similarity index 67% rename from hydroflow/tests/compile-fail/surface_degenerate_null.rs rename to dfir_rs/tests/compile-fail/surface_degenerate_null.rs index 9d88f37211b5..8ea5cc1c2844 100644 --- a/hydroflow/tests/compile-fail/surface_degenerate_null.rs +++ b/dfir_rs/tests/compile-fail/surface_degenerate_null.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_null.stderr b/dfir_rs/tests/compile-fail/surface_degenerate_null.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_degenerate_null.stderr rename to dfir_rs/tests/compile-fail/surface_degenerate_null.stderr diff --git a/dfir_rs/tests/compile-fail/surface_degenerate_tee.rs b/dfir_rs/tests/compile-fail/surface_degenerate_tee.rs new file mode 100644 index 000000000000..8b10290769cb --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_degenerate_tee.rs @@ -0,0 +1,8 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + tee(); + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_degenerate_tee.stderr b/dfir_rs/tests/compile-fail/surface_degenerate_tee.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_degenerate_tee.stderr rename to dfir_rs/tests/compile-fail/surface_degenerate_tee.stderr diff --git a/hydroflow/tests/compile-fail/surface_demux_badarg.rs b/dfir_rs/tests/compile-fail/surface_demux_badarg.rs similarity index 78% rename from hydroflow/tests/compile-fail/surface_demux_badarg.rs rename to dfir_rs/tests/compile-fail/surface_demux_badarg.rs index 1d4e5444aed6..898e96dd801a 100644 --- a/hydroflow/tests/compile-fail/surface_demux_badarg.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_badarg.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_badarg.stderr b/dfir_rs/tests/compile-fail/surface_demux_badarg.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demux_badarg.stderr rename to dfir_rs/tests/compile-fail/surface_demux_badarg.stderr diff --git a/hydroflow/tests/compile-fail/surface_demux_badclosure.rs b/dfir_rs/tests/compile-fail/surface_demux_badclosure.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_demux_badclosure.rs rename to dfir_rs/tests/compile-fail/surface_demux_badclosure.rs index b9ddcd990d4d..001b5366b2e1 100644 --- a/hydroflow/tests/compile-fail/surface_demux_badclosure.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_badclosure.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use dfir_rs::{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/dfir_rs/tests/compile-fail/surface_demux_badclosure.stderr similarity index 76% rename from hydroflow/tests/compile-fail/surface_demux_badclosure.stderr rename to dfir_rs/tests/compile-fail/surface_demux_badclosure.stderr index 0384823a88bb..6ac2f4ed23ff 100644 --- a/hydroflow/tests/compile-fail/surface_demux_badclosure.stderr +++ b/dfir_rs/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:28 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use dfir_rs::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs b/dfir_rs/tests/compile-fail/surface_demux_port_duplicate.rs similarity index 85% rename from hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs rename to dfir_rs/tests/compile-fail/surface_demux_port_duplicate.rs index 9a357ed2c54b..7d20af3f000c 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_port_duplicate.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use dfir_rs::{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/dfir_rs/tests/compile-fail/surface_demux_port_duplicate.stderr similarity index 79% rename from hydroflow/tests/compile-fail/surface_demux_port_duplicate.stderr rename to dfir_rs/tests/compile-fail/surface_demux_port_duplicate.stderr index c787b85cd55c..92e339c216db 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.stderr +++ b/dfir_rs/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:28 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use dfir_rs::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_elided.rs b/dfir_rs/tests/compile-fail/surface_demux_port_elided.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demux_port_elided.rs rename to dfir_rs/tests/compile-fail/surface_demux_port_elided.rs index f5d9954a4ff3..77e3124450d1 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_elided.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_port_elided.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use dfir_rs::{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/dfir_rs/tests/compile-fail/surface_demux_port_elided.stderr similarity index 80% rename from hydroflow/tests/compile-fail/surface_demux_port_elided.stderr rename to dfir_rs/tests/compile-fail/surface_demux_port_elided.stderr index 5d7dce2d2bf4..4b6a56d5b06d 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_elided.stderr +++ b/dfir_rs/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:28 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use dfir_rs::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_extra.rs b/dfir_rs/tests/compile-fail/surface_demux_port_extra.rs similarity index 85% rename from hydroflow/tests/compile-fail/surface_demux_port_extra.rs rename to dfir_rs/tests/compile-fail/surface_demux_port_extra.rs index c7fc9ef68061..40367966cfe3 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_port_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use dfir_rs::{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/dfir_rs/tests/compile-fail/surface_demux_port_extra.stderr similarity index 83% rename from hydroflow/tests/compile-fail/surface_demux_port_extra.stderr rename to dfir_rs/tests/compile-fail/surface_demux_port_extra.stderr index 5cfefddc5d50..a49e729ec2fe 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extra.stderr +++ b/dfir_rs/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:28 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use dfir_rs::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs b/dfir_rs/tests/compile-fail/surface_demux_port_extramissing.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs rename to dfir_rs/tests/compile-fail/surface_demux_port_extramissing.rs index 6631fc868ccb..05f6ff4eb7cf 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_port_extramissing.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use dfir_rs::{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/dfir_rs/tests/compile-fail/surface_demux_port_extramissing.stderr similarity index 87% rename from hydroflow/tests/compile-fail/surface_demux_port_extramissing.stderr rename to dfir_rs/tests/compile-fail/surface_demux_port_extramissing.stderr index cf52067779c7..6aa6bc50face 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.stderr +++ b/dfir_rs/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:28 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use dfir_rs::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_missing.rs b/dfir_rs/tests/compile-fail/surface_demux_port_missing.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demux_port_missing.rs rename to dfir_rs/tests/compile-fail/surface_demux_port_missing.rs index 185de09847f9..2f44fb87e849 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_missing.rs +++ b/dfir_rs/tests/compile-fail/surface_demux_port_missing.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use dfir_rs::{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/dfir_rs/tests/compile-fail/surface_demux_port_missing.stderr similarity index 71% rename from hydroflow/tests/compile-fail/surface_demux_port_missing.stderr rename to dfir_rs/tests/compile-fail/surface_demux_port_missing.stderr index 7f7be970d102..68be99a8d2bb 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_missing.stderr +++ b/dfir_rs/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:28 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use dfir_rs::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_missingtypeparam.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_missingtypeparam.rs index a8540f94d3ba..819ab6d66735 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_missingtypeparam.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_missingtypeparam.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_missingtypeparam.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_missingtypeparam.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_notenum.rs similarity index 86% rename from hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_notenum.rs index d000a03dad16..e44c4fac79af 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_notenum.rs @@ -1,11 +1,11 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_notenum.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_notenum.stderr similarity index 98% rename from hydroflow/tests/compile-fail/surface_demuxenum_notenum.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_notenum.stderr index be5512428e64..08694f796d87 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_notenum.stderr +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_notenum.stderr @@ -4,7 +4,7 @@ error[E0277]: the trait bound `Shape: DemuxEnumBase` is not satisfied 12 | ]) -> demux_enum::(); | ^^^^^ the trait `DemuxEnumBase` is not implemented for `Shape` | - = note: use `#[derive(hydroflow::DemuxEnum)]` + = note: use `#[derive(dfir_rs::DemuxEnum)]` note: required by a bound in `check_impl_demux_enum` --> tests/compile-fail/surface_demuxenum_notenum.rs:12:28 | diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate.rs index 28d9d7b3bdcd..2be0863f871f 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs similarity index 74% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs index 0b193eaba6e8..b0c071fa6780 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::demux_enum::DemuxEnum; +use dfir_rs::dfir_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; 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_port_duplicate_one.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate_one.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_duplicate_one.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_elided.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_elided.rs index 6f6ed8c0718b..380d9861922f 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_elided.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_elided.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_elided.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_elided.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_elided.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extra.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_extra.rs index 1d25a92b58b3..ec1a2bcbc6d5 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extra.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extra.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_extra.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_extra.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extra_zero.rs similarity index 64% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_extra_zero.rs index 8317420f9cb1..080097d569f5 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extra_zero.rs @@ -1,12 +1,12 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_extra_zero.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extra_zero.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_extra_zero.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extramissing.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_extramissing.rs index fcde4a73a020..af834bc5dd12 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extramissing.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_extramissing.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_extramissing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_extramissing.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_missing.rs similarity index 80% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_missing.rs index 84856d1df77d..af470a4cc327 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_missing.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_missing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_missing.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_missing.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_missing_one.rs similarity index 76% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_missing_one.rs index 7cf98339ada3..cc7ff3b52b13 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_missing_one.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_missing_one.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_missing_one.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_missing_one.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_port_wrong_one.rs similarity index 70% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_wrong_one.rs index 293a4b66a748..523ace6f39d2 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_port_wrong_one.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_port_wrong_one.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_port_wrong_one.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_port_wrong_one.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongenum.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongenum.rs index 71ef0b72edc5..1bd5e3a358a1 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongenum.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_wrongenum.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongenum.stderr similarity index 98% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongenum.stderr index 6758b9f894e4..5e35f99ef85a 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.stderr +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongenum.stderr @@ -4,7 +4,7 @@ error[E0277]: the trait bound `std::option::Option<()>: DemuxEnumBase` is not sa 17 | ]) -> demux_enum::>(); | ^^^^^^^^^^ the trait `DemuxEnumBase` is not implemented for `std::option::Option<()>` | - = note: use `#[derive(hydroflow::DemuxEnum)]` + = note: use `#[derive(dfir_rs::DemuxEnum)]` = help: the trait `DemuxEnumBase` is implemented for `Shape` note: required by a bound in `check_impl_demux_enum` --> tests/compile-fail/surface_demuxenum_wrongenum.rs:17:28 diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_1.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_1.rs index 7f0025f42ef6..0e284bcd1a24 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_1.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_1.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_1.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_2.rs similarity index 82% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_2.rs index f350c4bf8a07..057953980de9 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_2.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_2.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongfields_2.stderr diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongtype.rs similarity index 78% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongtype.rs index 12431cf527dc..c18b573a77c7 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs +++ b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongtype.rs @@ -1,5 +1,5 @@ -use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use dfir_rs::util::demux_enum::DemuxEnum; +use dfir_rs::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_demuxenum_wrongtype.stderr b/dfir_rs/tests/compile-fail/surface_demuxenum_wrongtype.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.stderr rename to dfir_rs/tests/compile-fail/surface_demuxenum_wrongtype.stderr diff --git a/hydroflow/tests/compile-fail/surface_dest_sink_baditem.ci.stderr b/dfir_rs/tests/compile-fail/surface_dest_sink_baditem.ci.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_dest_sink_baditem.ci.stderr rename to dfir_rs/tests/compile-fail/surface_dest_sink_baditem.ci.stderr diff --git a/hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore b/dfir_rs/tests/compile-fail/surface_dest_sink_baditem.rs.ignore similarity index 74% rename from hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore rename to dfir_rs/tests/compile-fail/surface_dest_sink_baditem.rs.ignore index b7246f469194..77c384ef95ea 100644 --- a/hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore +++ b/dfir_rs/tests/compile-fail/surface_dest_sink_baditem.rs.ignore @@ -1,14 +1,14 @@ use std::net::{Ipv4Addr, SocketAddr}; -use hydroflow::hydroflow_syntax; -use hydroflow::util::bind_udp_bytes; +use dfir_rs::dfir_syntax; +use dfir_rs::util::bind_udp_bytes; -#[hydroflow::main] +#[dfir_rs::main] 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_baditem.stderr b/dfir_rs/tests/compile-fail/surface_dest_sink_baditem.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_dest_sink_baditem.stderr rename to dfir_rs/tests/compile-fail/surface_dest_sink_baditem.stderr diff --git a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore b/dfir_rs/tests/compile-fail/surface_dest_sink_badsink.rs.ignore similarity index 63% rename from hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore rename to dfir_rs/tests/compile-fail/surface_dest_sink_badsink.rs.ignore index 08cea0ef0c70..31c8c2eb7ae8 100644 --- a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore +++ b/dfir_rs/tests/compile-fail/surface_dest_sink_badsink.rs.ignore @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/compile-fail/surface_dest_sink_badsink.stderr b/dfir_rs/tests/compile-fail/surface_dest_sink_badsink.stderr new file mode 100644 index 000000000000..b43017eb5428 --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_dest_sink_badsink.stderr @@ -0,0 +1,28 @@ +error[E0277]: the trait bound `&str: dfir_rs::futures::Sink<_>` is not satisfied + --> tests/compile-fail/surface_dest_sink_badsink.rs:6:41 + | +6 | source_iter(0..10) -> dest_sink(sink); + | ----------^^^^- + | | | + | | the trait `dfir_rs::futures::Sink<_>` is not implemented for `&str` + | required by a bound introduced by this call + | + = help: the following other types implement trait `dfir_rs::futures::Sink`: + <&dfir_rs::futures::futures_channel::mpsc::UnboundedSender as dfir_rs::futures::Sink> + <&mut S as dfir_rs::futures::Sink> + as dfir_rs::futures::Sink> + as dfir_rs::futures::Sink> + as dfir_rs::futures::Sink> + as dfir_rs::futures::Sink<(u32, T)>> + as dfir_rs::futures::Sink> + as dfir_rs::futures::Sink<_Item>> + and $N others +note: required by a bound in `sink_feed_flush` + --> tests/compile-fail/surface_dest_sink_badsink.rs:5:18 + | +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 `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/dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_int.rs similarity index 79% rename from hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.rs rename to dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_int.rs index 7329d81414d5..767a59d6e8f0 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.rs +++ b/dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_int.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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_int.stderr b/dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_int.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.stderr rename to dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_int.stderr diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs b/dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_option.rs similarity index 81% rename from hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs rename to dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_option.rs index ad83a995ee12..b453aaf70dc7 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs +++ b/dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_option.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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_badtype_option.stderr b/dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_option.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.stderr rename to dfir_rs/tests/compile-fail/surface_fold_keyed_badtype_option.stderr diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr b/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr similarity index 95% rename from hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr rename to dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr index 155c756cf094..ab43386175a1 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr +++ b/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr @@ -1,7 +1,7 @@ -warning: unused import: `hydroflow::hydroflow_syntax` +warning: unused import: `dfir_rs::dfir_syntax` --> tests/compile-fail/surface_fold_keyed_generics_bad.rs:1:5 | -1 | use hydroflow::hydroflow_syntax; +1 |use dfir_rs::dfir_syntax; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore b/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore similarity index 85% rename from hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore rename to dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore index 1061491f6393..b3cd3c5c002f 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore +++ b/dfir_rs/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 = dfir_rs::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/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.stderr similarity index 95% rename from hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.stderr rename to dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.stderr index ba06dbb33eb1..31c9b04a96a2 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.stderr +++ b/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_bad.stderr @@ -1,7 +1,7 @@ -warning: unused import: `hydroflow::hydroflow_syntax` +warning: unused import: `dfir_rs::dfir_syntax` --> tests/compile-fail/surface_fold_keyed_generics_bad.rs:1:5 | -1 | use hydroflow::hydroflow_syntax; +1 |use dfir_rs::dfir_syntax; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs b/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_extra.rs similarity index 79% rename from hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs rename to dfir_rs/tests/compile-fail/surface_fold_keyed_generics_extra.rs index 0154d1f7ec41..feff9439c519 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::dfir_syntax; fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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/dfir_rs/tests/compile-fail/surface_fold_keyed_generics_extra.stderr similarity index 77% rename from hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.stderr rename to dfir_rs/tests/compile-fail/surface_fold_keyed_generics_extra.stderr index c4d2d3011c46..e70911a9b346 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.stderr +++ b/dfir_rs/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: `dfir_rs::dfir_syntax` --> tests/compile-fail/surface_fold_keyed_generics_extra.rs:1:5 | -1 | use hydroflow::hydroflow_syntax; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 | use dfir_rs::dfir_syntax; + | ^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs b/dfir_rs/tests/compile-fail/surface_forwardref_chain_double.rs similarity index 77% rename from hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs rename to dfir_rs/tests/compile-fail/surface_forwardref_chain_double.rs index 612cb04d2a5b..a161e060ab5c 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs +++ b/dfir_rs/tests/compile-fail/surface_forwardref_chain_double.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_double.stderr b/dfir_rs/tests/compile-fail/surface_forwardref_chain_double.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_forwardref_chain_double.stderr rename to dfir_rs/tests/compile-fail/surface_forwardref_chain_double.stderr diff --git a/hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs b/dfir_rs/tests/compile-fail/surface_forwardref_chain_single.rs similarity index 75% rename from hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs rename to dfir_rs/tests/compile-fail/surface_forwardref_chain_single.rs index b7b95482d00b..9c93e014ae08 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs +++ b/dfir_rs/tests/compile-fail/surface_forwardref_chain_single.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_chain_single.stderr b/dfir_rs/tests/compile-fail/surface_forwardref_chain_single.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_forwardref_chain_single.stderr rename to dfir_rs/tests/compile-fail/surface_forwardref_chain_single.stderr diff --git a/dfir_rs/tests/compile-fail/surface_forwardref_self1.rs b/dfir_rs/tests/compile-fail/surface_forwardref_self1.rs new file mode 100644 index 000000000000..464d5ac286ff --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_forwardref_self1.rs @@ -0,0 +1,8 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + f = f -> f; + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self1.stderr b/dfir_rs/tests/compile-fail/surface_forwardref_self1.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_forwardref_self1.stderr rename to dfir_rs/tests/compile-fail/surface_forwardref_self1.stderr diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self2.rs b/dfir_rs/tests/compile-fail/surface_forwardref_self2.rs similarity index 55% rename from hydroflow/tests/compile-fail/surface_forwardref_self2.rs rename to dfir_rs/tests/compile-fail/surface_forwardref_self2.rs index 23a2b6740339..4aa9021d5aa6 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self2.rs +++ b/dfir_rs/tests/compile-fail/surface_forwardref_self2.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_forwardref_self2.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_forwardref_self2.stderr rename to dfir_rs/tests/compile-fail/surface_forwardref_self2.stderr diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs b/dfir_rs/tests/compile-fail/surface_forwardref_self2_indirect.rs similarity index 59% rename from hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs rename to dfir_rs/tests/compile-fail/surface_forwardref_self2_indirect.rs index 1c1ba5b1703e..ea45af994f07 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs +++ b/dfir_rs/tests/compile-fail/surface_forwardref_self2_indirect.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_self2_indirect.stderr b/dfir_rs/tests/compile-fail/surface_forwardref_self2_indirect.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.stderr rename to dfir_rs/tests/compile-fail/surface_forwardref_self2_indirect.stderr diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self3.rs b/dfir_rs/tests/compile-fail/surface_forwardref_self3.rs similarity index 58% rename from hydroflow/tests/compile-fail/surface_forwardref_self3.rs rename to dfir_rs/tests/compile-fail/surface_forwardref_self3.rs index 7c44ee5b0242..318149c64ed5 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self3.rs +++ b/dfir_rs/tests/compile-fail/surface_forwardref_self3.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_forwardref_self3.stderr b/dfir_rs/tests/compile-fail/surface_forwardref_self3.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_forwardref_self3.stderr rename to dfir_rs/tests/compile-fail/surface_forwardref_self3.stderr diff --git a/hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs b/dfir_rs/tests/compile-fail/surface_identity_wronggeneric.rs similarity index 64% rename from hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs rename to dfir_rs/tests/compile-fail/surface_identity_wronggeneric.rs index 20ee8ba91aac..729cf26868b3 100644 --- a/hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs +++ b/dfir_rs/tests/compile-fail/surface_identity_wronggeneric.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_identity_wronggeneric.stderr b/dfir_rs/tests/compile-fail/surface_identity_wronggeneric.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_identity_wronggeneric.stderr rename to dfir_rs/tests/compile-fail/surface_identity_wronggeneric.stderr diff --git a/hydroflow/tests/compile-fail/surface_join_badtypes.rs b/dfir_rs/tests/compile-fail/surface_join_badtypes.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_join_badtypes.rs rename to dfir_rs/tests/compile-fail/surface_join_badtypes.rs index 3d3ba588dbbb..dba802fe207c 100644 --- a/hydroflow/tests/compile-fail/surface_join_badtypes.rs +++ b/dfir_rs/tests/compile-fail/surface_join_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_badtypes.stderr b/dfir_rs/tests/compile-fail/surface_join_badtypes.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_join_badtypes.stderr rename to dfir_rs/tests/compile-fail/surface_join_badtypes.stderr diff --git a/hydroflow/tests/compile-fail/surface_join_generics_extra.rs b/dfir_rs/tests/compile-fail/surface_join_generics_extra.rs similarity index 75% rename from hydroflow/tests/compile-fail/surface_join_generics_extra.rs rename to dfir_rs/tests/compile-fail/surface_join_generics_extra.rs index 9722319bbeb7..8c5c325eca56 100644 --- a/hydroflow/tests/compile-fail/surface_join_generics_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_join_generics_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_generics_extra.stderr b/dfir_rs/tests/compile-fail/surface_join_generics_extra.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_join_generics_extra.stderr rename to dfir_rs/tests/compile-fail/surface_join_generics_extra.stderr diff --git a/hydroflow/tests/compile-fail/surface_join_persistence_bad.rs b/dfir_rs/tests/compile-fail/surface_join_persistence_bad.rs similarity index 75% rename from hydroflow/tests/compile-fail/surface_join_persistence_bad.rs rename to dfir_rs/tests/compile-fail/surface_join_persistence_bad.rs index 0144b0f3084f..45eebd22d61c 100644 --- a/hydroflow/tests/compile-fail/surface_join_persistence_bad.rs +++ b/dfir_rs/tests/compile-fail/surface_join_persistence_bad.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_bad.stderr b/dfir_rs/tests/compile-fail/surface_join_persistence_bad.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_join_persistence_bad.stderr rename to dfir_rs/tests/compile-fail/surface_join_persistence_bad.stderr diff --git a/hydroflow/tests/compile-fail/surface_join_persistence_extra.rs b/dfir_rs/tests/compile-fail/surface_join_persistence_extra.rs similarity index 76% rename from hydroflow/tests/compile-fail/surface_join_persistence_extra.rs rename to dfir_rs/tests/compile-fail/surface_join_persistence_extra.rs index dae9b813bf98..246e33e25d06 100644 --- a/hydroflow/tests/compile-fail/surface_join_persistence_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_join_persistence_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_join_persistence_extra.stderr b/dfir_rs/tests/compile-fail/surface_join_persistence_extra.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_join_persistence_extra.stderr rename to dfir_rs/tests/compile-fail/surface_join_persistence_extra.stderr diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore b/dfir_rs/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore similarity index 75% rename from hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore rename to dfir_rs/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore index 5bc9e6af3b53..edef68d09337 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore +++ b/dfir_rs/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/compile-fail/surface_lattice_fold_badgeneric.stderr similarity index 89% rename from hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.stderr rename to dfir_rs/tests/compile-fail/surface_lattice_fold_badgeneric.stderr index a92cdebecbb7..267d6e811238 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.stderr +++ b/dfir_rs/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/dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.rs b/dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.rs new file mode 100644 index 000000000000..6a964f729e97 --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.rs @@ -0,0 +1,10 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + source_iter([1,2,3,4,5]) + -> lattice_fold::>() + -> for_each(|x| println!("Least upper bound: {:?}", x)); + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.stderr b/dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.stderr similarity index 62% rename from hydroflow/tests/compile-fail/surface_lattice_fold_noarg.stderr rename to dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.stderr index c283bc4c724b..44e4fc783a37 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.stderr +++ b/dfir_rs/tests/compile-fail/surface_lattice_fold_noarg.stderr @@ -1,11 +1,11 @@ error: `lattice_fold` should have exactly 0 generic type arguments, actually has 1. --> tests/compile-fail/surface_lattice_fold_noarg.rs:6:31 | -6 | -> lattice_fold::>() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 | -> lattice_fold::>() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected 1 argument(s), found 0 --> tests/compile-fail/surface_lattice_fold_noarg.rs:6:16 | -6 | -> lattice_fold::>() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 | -> lattice_fold::>() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.rs b/dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.rs new file mode 100644 index 000000000000..85653594ee5d --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.rs @@ -0,0 +1,10 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + source_iter([1,2,3,4,5]) + -> lattice_fold::<'static, dfir_rs::lattices::set_union::SetUnionHashSet>(dfir_rs::lattices::set_union::SetUnionHashSet::::default()) + -> for_each(|x| println!("Least upper bound: {:?}", x)); + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr b/dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr similarity index 56% rename from hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr rename to dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr index f9f901aec6df..15d72bb3b68a 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr +++ b/dfir_rs/tests/compile-fail/surface_lattice_fold_wronggeneric.stderr @@ -1,5 +1,5 @@ error: `lattice_fold` should have exactly 0 generic type arguments, actually has 1. --> tests/compile-fail/surface_lattice_fold_wronggeneric.rs:6:31 | -6 | ... -> lattice_fold::<'static, hydroflow::lattices::set_union::SetUnionHashSet>(hydroflow::lattices::set_union::SetUnionHashSet::<... - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 | ... -> lattice_fold::<'static, dfir_rs::lattices::set_union::SetUnionHashSet>(dfir_rs::lattices::set_union::SetUnionHashSet::... + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore b/dfir_rs/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore similarity index 73% rename from hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore rename to dfir_rs/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore index 1fad32e06857..7a9bef94d052 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore +++ b/dfir_rs/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr similarity index 90% rename from hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr rename to dfir_rs/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr index 29bb4627a538..56c29d354aac 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr +++ b/dfir_rs/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/dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs b/dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs new file mode 100644 index 000000000000..1d2f0f5aaafb --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs @@ -0,0 +1,10 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + source_iter([1,2,3,4,5]) + -> lattice_reduce::<'static, dfir_rs::lattices::set_union::SetUnionHashSet>() + -> for_each(|x| println!("Least upper bound: {:?}", x)); + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr b/dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr similarity index 62% rename from hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr rename to dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr index a28bbd7dfd82..04629db217ac 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr +++ b/dfir_rs/tests/compile-fail/surface_lattice_reduce_wronggeneric.stderr @@ -1,5 +1,5 @@ error: `lattice_reduce` should have exactly 0 generic type arguments, actually has 1. --> tests/compile-fail/surface_lattice_reduce_wronggeneric.rs:6:33 | -6 | -> lattice_reduce::<'static, hydroflow::lattices::set_union::SetUnionHashSet>() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 | -> lattice_reduce::<'static, dfir_rs::lattices::set_union::SetUnionHashSet>() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/hydroflow/tests/compile-fail/surface_latticereduce_wronggeneric.stderr b/dfir_rs/tests/compile-fail/surface_latticereduce_wronggeneric.stderr similarity index 80% rename from hydroflow/tests/compile-fail/surface_latticereduce_wronggeneric.stderr rename to dfir_rs/tests/compile-fail/surface_latticereduce_wronggeneric.stderr index 714a5d8013ff..48fe8530d565 100644 --- a/hydroflow/tests/compile-fail/surface_latticereduce_wronggeneric.stderr +++ b/dfir_rs/tests/compile-fail/surface_latticereduce_wronggeneric.stderr @@ -3,7 +3,7 @@ error[E0271]: expected `Drain<'_, {integer}>` to be an iterator that yields `Set | 5 | source_iter([1,2,3,4,5]) | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `SetUnion>`, found integer -6 | -> lattice_reduce::<'static, hydroflow::lattices::set_union::SetUnionHashSet>() +6 | -> lattice_reduce::<'static, dfir_rs::lattices::set_union::SetUnionHashSet>() | ---------------------------------------------------- required by a bound introduced by this call | = note: expected struct `SetUnion>` @@ -11,5 +11,5 @@ error[E0271]: expected `Drain<'_, {integer}>` to be an iterator that yields `Set note: required by a bound in `check_inputs` --> tests/compile-fail/surface_lattice_reduce_wronggeneric.rs:6:41 | -6 | -> lattice_reduce::<'static, hydroflow::lattices::set_union::SetUnionHashSet>() +6 | -> lattice_reduce::<'static, dfir_rs::lattices::set_union::SetUnionHashSet>() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check_inputs` diff --git a/hydroflow/tests/compile-fail/surface_loop_cycle.rs b/dfir_rs/tests/compile-fail/surface_loop_cycle.rs similarity index 76% rename from hydroflow/tests/compile-fail/surface_loop_cycle.rs rename to dfir_rs/tests/compile-fail/surface_loop_cycle.rs index 0ddf384b4564..81e8f6b9a229 100644 --- a/hydroflow/tests/compile-fail/surface_loop_cycle.rs +++ b/dfir_rs/tests/compile-fail/surface_loop_cycle.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { loop { a = identity() -> identity() -> identity() -> identity(); a -> a; diff --git a/hydroflow/tests/compile-fail/surface_loop_cycle.stderr b/dfir_rs/tests/compile-fail/surface_loop_cycle.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_loop_cycle.stderr rename to dfir_rs/tests/compile-fail/surface_loop_cycle.stderr diff --git a/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs b/dfir_rs/tests/compile-fail/surface_loop_missing_unwindowing.rs similarity index 76% rename from hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs rename to dfir_rs/tests/compile-fail/surface_loop_missing_unwindowing.rs index 808bfae7a0e2..f88ba9616755 100644 --- a/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs +++ b/dfir_rs/tests/compile-fail/surface_loop_missing_unwindowing.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { a = source_iter(0..10); loop { b = a -> batch(); diff --git a/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.stderr b/dfir_rs/tests/compile-fail/surface_loop_missing_unwindowing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.stderr rename to dfir_rs/tests/compile-fail/surface_loop_missing_unwindowing.stderr diff --git a/hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs b/dfir_rs/tests/compile-fail/surface_loop_missing_windowing.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs rename to dfir_rs/tests/compile-fail/surface_loop_missing_windowing.rs index 2177d2ad0e8c..2794887b5656 100644 --- a/hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs +++ b/dfir_rs/tests/compile-fail/surface_loop_missing_windowing.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { a = source_iter(0..10); loop { a -> null(); diff --git a/hydroflow/tests/compile-fail/surface_loop_missing_windowing.stderr b/dfir_rs/tests/compile-fail/surface_loop_missing_windowing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_loop_missing_windowing.stderr rename to dfir_rs/tests/compile-fail/surface_loop_missing_windowing.stderr diff --git a/hydroflow/tests/compile-fail/surface_loop_multiple_window.rs b/dfir_rs/tests/compile-fail/surface_loop_multiple_window.rs similarity index 78% rename from hydroflow/tests/compile-fail/surface_loop_multiple_window.rs rename to dfir_rs/tests/compile-fail/surface_loop_multiple_window.rs index eb0eb775bf29..1ee9423253b7 100644 --- a/hydroflow/tests/compile-fail/surface_loop_multiple_window.rs +++ b/dfir_rs/tests/compile-fail/surface_loop_multiple_window.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { a = source_iter(0..10); loop { loop { diff --git a/hydroflow/tests/compile-fail/surface_loop_multiple_window.stderr b/dfir_rs/tests/compile-fail/surface_loop_multiple_window.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_loop_multiple_window.stderr rename to dfir_rs/tests/compile-fail/surface_loop_multiple_window.stderr diff --git a/hydroflow/tests/compile-fail/surface_loop_source.rs b/dfir_rs/tests/compile-fail/surface_loop_source.rs similarity index 70% rename from hydroflow/tests/compile-fail/surface_loop_source.rs rename to dfir_rs/tests/compile-fail/surface_loop_source.rs index edea1a7ad958..b4c94b11eae1 100644 --- a/hydroflow/tests/compile-fail/surface_loop_source.rs +++ b/dfir_rs/tests/compile-fail/surface_loop_source.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { loop { source_iter(0..10) -> null(); } diff --git a/hydroflow/tests/compile-fail/surface_loop_source.stderr b/dfir_rs/tests/compile-fail/surface_loop_source.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_loop_source.stderr rename to dfir_rs/tests/compile-fail/surface_loop_source.stderr diff --git a/hydroflow/tests/compile-fail/surface_map_badtypes.rs b/dfir_rs/tests/compile-fail/surface_map_badtypes.rs similarity index 64% rename from hydroflow/tests/compile-fail/surface_map_badtypes.rs rename to dfir_rs/tests/compile-fail/surface_map_badtypes.rs index 07a6a72c36b9..4a337fa068f9 100644 --- a/hydroflow/tests/compile-fail/surface_map_badtypes.rs +++ b/dfir_rs/tests/compile-fail/surface_map_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_map_badtypes.stderr b/dfir_rs/tests/compile-fail/surface_map_badtypes.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_map_badtypes.stderr rename to dfir_rs/tests/compile-fail/surface_map_badtypes.stderr diff --git a/hydroflow/tests/compile-fail/surface_merge_badtypes.rs b/dfir_rs/tests/compile-fail/surface_merge_badtypes.rs similarity index 70% rename from hydroflow/tests/compile-fail/surface_merge_badtypes.rs rename to dfir_rs/tests/compile-fail/surface_merge_badtypes.rs index bb5a6438fa9d..c5d1553a1c91 100644 --- a/hydroflow/tests/compile-fail/surface_merge_badtypes.rs +++ b/dfir_rs/tests/compile-fail/surface_merge_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_merge_badtypes.stderr b/dfir_rs/tests/compile-fail/surface_merge_badtypes.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_merge_badtypes.stderr rename to dfir_rs/tests/compile-fail/surface_merge_badtypes.stderr diff --git a/hydroflow/tests/compile-fail/surface_missing_args.rs b/dfir_rs/tests/compile-fail/surface_missing_args.rs similarity index 54% rename from hydroflow/tests/compile-fail/surface_missing_args.rs rename to dfir_rs/tests/compile-fail/surface_missing_args.rs index 9d2200c46285..f390d807fed7 100644 --- a/hydroflow/tests/compile-fail/surface_missing_args.rs +++ b/dfir_rs/tests/compile-fail/surface_missing_args.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_missing_args.stderr b/dfir_rs/tests/compile-fail/surface_missing_args.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_missing_args.stderr rename to dfir_rs/tests/compile-fail/surface_missing_args.stderr diff --git a/hydroflow/tests/compile-fail/surface_negative_loop.rs b/dfir_rs/tests/compile-fail/surface_negative_loop.rs similarity index 66% rename from hydroflow/tests/compile-fail/surface_negative_loop.rs rename to dfir_rs/tests/compile-fail/surface_negative_loop.rs index 4aeb9501eddd..012468c732d8 100644 --- a/hydroflow/tests/compile-fail/surface_negative_loop.rs +++ b/dfir_rs/tests/compile-fail/surface_negative_loop.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_negative_loop.stderr b/dfir_rs/tests/compile-fail/surface_negative_loop.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_negative_loop.stderr rename to dfir_rs/tests/compile-fail/surface_negative_loop.stderr diff --git a/dfir_rs/tests/compile-fail/surface_null.rs b/dfir_rs/tests/compile-fail/surface_null.rs new file mode 100644 index 000000000000..21d2da868e9a --- /dev/null +++ b/dfir_rs/tests/compile-fail/surface_null.rs @@ -0,0 +1,8 @@ +use dfir_rs::dfir_syntax; + +fn main() { + let mut df = dfir_syntax! { + null(); + }; + df.run_available(); +} diff --git a/hydroflow/tests/compile-fail/surface_null.stderr b/dfir_rs/tests/compile-fail/surface_null.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_null.stderr rename to dfir_rs/tests/compile-fail/surface_null.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_badarg.rs b/dfir_rs/tests/compile-fail/surface_partition_badarg.rs similarity index 79% rename from hydroflow/tests/compile-fail/surface_partition_badarg.rs rename to dfir_rs/tests/compile-fail/surface_partition_badarg.rs index 524bcde38291..ccf8348f9112 100644 --- a/hydroflow/tests/compile-fail/surface_partition_badarg.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_badarg.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_badarg.stderr b/dfir_rs/tests/compile-fail/surface_partition_badarg.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_badarg.stderr rename to dfir_rs/tests/compile-fail/surface_partition_badarg.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_badclosure.rs b/dfir_rs/tests/compile-fail/surface_partition_badclosure.rs similarity index 85% rename from hydroflow/tests/compile-fail/surface_partition_badclosure.rs rename to dfir_rs/tests/compile-fail/surface_partition_badclosure.rs index 925aa694300f..d7f2569ad922 100644 --- a/hydroflow/tests/compile-fail/surface_partition_badclosure.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_badclosure.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_badclosure.stderr b/dfir_rs/tests/compile-fail/surface_partition_badclosure.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_badclosure.stderr rename to dfir_rs/tests/compile-fail/surface_partition_badclosure.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs b/dfir_rs/tests/compile-fail/surface_partition_port_duplicate.rs similarity index 86% rename from hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_duplicate.rs index c7afe955aae4..019f9a7f2236 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_duplicate.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_duplicate.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_duplicate.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_duplicate.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_duplicate.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_elided.rs b/dfir_rs/tests/compile-fail/surface_partition_port_elided.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_partition_port_elided.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_elided.rs index f321a41e4b3c..89c7b09bf260 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_elided.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_elided.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_elided.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_elided.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_elided.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_elided.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_extra.rs b/dfir_rs/tests/compile-fail/surface_partition_port_extra.rs similarity index 86% rename from hydroflow/tests/compile-fail/surface_partition_port_extra.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_extra.rs index 4527062c70db..ef6da0534a7b 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_extra.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_extra.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_extra.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_extra.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_extra.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs b/dfir_rs/tests/compile-fail/surface_partition_port_extramissing.rs similarity index 85% rename from hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_extramissing.rs index 2ca2226319a0..0d730f3887f1 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_extramissing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_extramissing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_extramissing.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_extramissing.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs b/dfir_rs/tests/compile-fail/surface_partition_port_inconsistent.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_inconsistent.rs index feb2f89fb24b..e7495d68bcdd 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_inconsistent.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_inconsistent.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_inconsistent.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_inconsistent.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_inconsistent.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs b/dfir_rs/tests/compile-fail/surface_partition_port_indexgap.rs similarity index 80% rename from hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_indexgap.rs index 6f6de1401a82..b1b1932554fe 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_indexgap.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_indexgap.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_indexgap.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_indexgap.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_indexgap.stderr diff --git a/hydroflow/tests/compile-fail/surface_partition_port_missing.rs b/dfir_rs/tests/compile-fail/surface_partition_port_missing.rs similarity index 83% rename from hydroflow/tests/compile-fail/surface_partition_port_missing.rs rename to dfir_rs/tests/compile-fail/surface_partition_port_missing.rs index 8e03ec0d8ec6..970d7efe7f20 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_missing.rs +++ b/dfir_rs/tests/compile-fail/surface_partition_port_missing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_missing.stderr b/dfir_rs/tests/compile-fail/surface_partition_port_missing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_partition_port_missing.stderr rename to dfir_rs/tests/compile-fail/surface_partition_port_missing.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_conflict.rs b/dfir_rs/tests/compile-fail/surface_port_conflict.rs similarity index 70% rename from hydroflow/tests/compile-fail/surface_port_conflict.rs rename to dfir_rs/tests/compile-fail/surface_port_conflict.rs index da351a482a6f..492b94c03003 100644 --- a/hydroflow/tests/compile-fail/surface_port_conflict.rs +++ b/dfir_rs/tests/compile-fail/surface_port_conflict.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_conflict.stderr b/dfir_rs/tests/compile-fail/surface_port_conflict.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_conflict.stderr rename to dfir_rs/tests/compile-fail/surface_port_conflict.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_join.rs b/dfir_rs/tests/compile-fail/surface_port_join.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_port_join.rs rename to dfir_rs/tests/compile-fail/surface_port_join.rs index 2df6eebe4cf4..00b207dfd169 100644 --- a/hydroflow/tests/compile-fail/surface_port_join.rs +++ b/dfir_rs/tests/compile-fail/surface_port_join.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_port_join.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_join.stderr rename to dfir_rs/tests/compile-fail/surface_port_join.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_join_forwardref.rs b/dfir_rs/tests/compile-fail/surface_port_join_forwardref.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_port_join_forwardref.rs rename to dfir_rs/tests/compile-fail/surface_port_join_forwardref.rs index c89bb4ff16a6..ae40b5d33845 100644 --- a/hydroflow/tests/compile-fail/surface_port_join_forwardref.rs +++ b/dfir_rs/tests/compile-fail/surface_port_join_forwardref.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_join_forwardref.stderr b/dfir_rs/tests/compile-fail/surface_port_join_forwardref.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_join_forwardref.stderr rename to dfir_rs/tests/compile-fail/surface_port_join_forwardref.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs similarity index 78% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs index d9b7f782b949..00dc2bc5ddb3 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs +++ b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.stderr rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs similarity index 78% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs index 302e3af1d7a9..ec3b5c47c99f 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs +++ b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_a_forwardref.stderr b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.stderr rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs similarity index 74% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs index 0d4c8a978b25..9546ccfa92b7 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs +++ b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_inn.stderr b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.stderr rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs similarity index 74% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs index 0489c6572485..9b65ed7e0422 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs +++ b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_knot_b_out.stderr b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.stderr rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_simple.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_simple.rs index 611ec16c4c2b..b81e3f18201e 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs +++ b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_simple.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_naked_overwrite_simple.stderr b/dfir_rs/tests/compile-fail/surface_port_naked_overwrite_simple.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.stderr rename to dfir_rs/tests/compile-fail/surface_port_naked_overwrite_simple.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_unused_both.rs b/dfir_rs/tests/compile-fail/surface_port_unused_both.rs similarity index 66% rename from hydroflow/tests/compile-fail/surface_port_unused_both.rs rename to dfir_rs/tests/compile-fail/surface_port_unused_both.rs index 5afcf7ab60b2..43534ae42511 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_both.rs +++ b/dfir_rs/tests/compile-fail/surface_port_unused_both.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_port_unused_both.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_unused_both.stderr rename to dfir_rs/tests/compile-fail/surface_port_unused_both.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs b/dfir_rs/tests/compile-fail/surface_port_unused_both_indirect.rs similarity index 72% rename from hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs rename to dfir_rs/tests/compile-fail/surface_port_unused_both_indirect.rs index c5a6ab9131fc..a8850c95f777 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs +++ b/dfir_rs/tests/compile-fail/surface_port_unused_both_indirect.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_indirect.stderr b/dfir_rs/tests/compile-fail/surface_port_unused_both_indirect.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_unused_both_indirect.stderr rename to dfir_rs/tests/compile-fail/surface_port_unused_both_indirect.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs b/dfir_rs/tests/compile-fail/surface_port_unused_both_parens.rs similarity index 66% rename from hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs rename to dfir_rs/tests/compile-fail/surface_port_unused_both_parens.rs index 5a07cf07491c..ff55cb6ff098 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs +++ b/dfir_rs/tests/compile-fail/surface_port_unused_both_parens.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_both_parens.stderr b/dfir_rs/tests/compile-fail/surface_port_unused_both_parens.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_unused_both_parens.stderr rename to dfir_rs/tests/compile-fail/surface_port_unused_both_parens.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_unused_in.rs b/dfir_rs/tests/compile-fail/surface_port_unused_in.rs similarity index 61% rename from hydroflow/tests/compile-fail/surface_port_unused_in.rs rename to dfir_rs/tests/compile-fail/surface_port_unused_in.rs index 24a54093a6ed..c26fd34a5bca 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_in.rs +++ b/dfir_rs/tests/compile-fail/surface_port_unused_in.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_in.stderr b/dfir_rs/tests/compile-fail/surface_port_unused_in.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_unused_in.stderr rename to dfir_rs/tests/compile-fail/surface_port_unused_in.stderr diff --git a/hydroflow/tests/compile-fail/surface_port_unused_out.rs b/dfir_rs/tests/compile-fail/surface_port_unused_out.rs similarity index 61% rename from hydroflow/tests/compile-fail/surface_port_unused_out.rs rename to dfir_rs/tests/compile-fail/surface_port_unused_out.rs index cdb75c51229c..45d3c1a00866 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_out.rs +++ b/dfir_rs/tests/compile-fail/surface_port_unused_out.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_port_unused_out.stderr b/dfir_rs/tests/compile-fail/surface_port_unused_out.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_port_unused_out.stderr rename to dfir_rs/tests/compile-fail/surface_port_unused_out.stderr diff --git a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs b/dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_int.rs similarity index 79% rename from hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs rename to dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_int.rs index 995fa5c09bb6..ac8f07ed9d8a 100644 --- a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs +++ b/dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_int.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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_int.stderr b/dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_int.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.stderr rename to dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_int.stderr diff --git a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs b/dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_option.rs similarity index 81% rename from hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs rename to dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_option.rs index 82f30d2aa8f6..f98eb6a10e6d 100644 --- a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs +++ b/dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_option.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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_reduce_keyed_badtype_option.stderr b/dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_option.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.stderr rename to dfir_rs/tests/compile-fail/surface_reduce_keyed_badtype_option.stderr diff --git a/hydroflow/tests/compile-fail/surface_singleton_badexpr.rs b/dfir_rs/tests/compile-fail/surface_singleton_badexpr.rs similarity index 87% rename from hydroflow/tests/compile-fail/surface_singleton_badexpr.rs rename to dfir_rs/tests/compile-fail/surface_singleton_badexpr.rs index a29d0151d082..f91299952a01 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_badexpr.rs +++ b/dfir_rs/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 = dfir_rs::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_badexpr.stderr b/dfir_rs/tests/compile-fail/surface_singleton_badexpr.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_singleton_badexpr.stderr rename to dfir_rs/tests/compile-fail/surface_singleton_badexpr.stderr diff --git a/hydroflow/tests/compile-fail/surface_singleton_nostate.rs b/dfir_rs/tests/compile-fail/surface_singleton_nostate.rs similarity index 86% rename from hydroflow/tests/compile-fail/surface_singleton_nostate.rs rename to dfir_rs/tests/compile-fail/surface_singleton_nostate.rs index 1f9de7e17dbd..307564c95cf4 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_nostate.rs +++ b/dfir_rs/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 = dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_singleton_nostate.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_singleton_nostate.stderr rename to dfir_rs/tests/compile-fail/surface_singleton_nostate.stderr diff --git a/hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs b/dfir_rs/tests/compile-fail/surface_singleton_nostate_undefined.rs similarity index 85% rename from hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs rename to dfir_rs/tests/compile-fail/surface_singleton_nostate_undefined.rs index 97731ca3a7d4..ce45df67147d 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs +++ b/dfir_rs/tests/compile-fail/surface_singleton_nostate_undefined.rs @@ -1,5 +1,5 @@ pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_singleton_nostate_undefined.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.stderr rename to dfir_rs/tests/compile-fail/surface_singleton_nostate_undefined.stderr diff --git a/hydroflow/tests/compile-fail/surface_singleton_undefined.rs b/dfir_rs/tests/compile-fail/surface_singleton_undefined.rs similarity index 80% rename from hydroflow/tests/compile-fail/surface_singleton_undefined.rs rename to dfir_rs/tests/compile-fail/surface_singleton_undefined.rs index f0eeacd5e7b4..fd33e2ad35a3 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_undefined.rs +++ b/dfir_rs/tests/compile-fail/surface_singleton_undefined.rs @@ -1,5 +1,5 @@ pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_singleton_undefined.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_singleton_undefined.stderr rename to dfir_rs/tests/compile-fail/surface_singleton_undefined.stderr diff --git a/hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs b/dfir_rs/tests/compile-fail/surface_singleton_undefined_nostate.rs similarity index 85% rename from hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs rename to dfir_rs/tests/compile-fail/surface_singleton_undefined_nostate.rs index 93dbcdb85581..7c6a25201cee 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs +++ b/dfir_rs/tests/compile-fail/surface_singleton_undefined_nostate.rs @@ -1,5 +1,5 @@ pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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_nostate.stderr b/dfir_rs/tests/compile-fail/surface_singleton_undefined_nostate.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.stderr rename to dfir_rs/tests/compile-fail/surface_singleton_undefined_nostate.stderr diff --git a/hydroflow/tests/compile-fail/surface_source_interval_badarg.rs b/dfir_rs/tests/compile-fail/surface_source_interval_badarg.rs similarity index 61% rename from hydroflow/tests/compile-fail/surface_source_interval_badarg.rs rename to dfir_rs/tests/compile-fail/surface_source_interval_badarg.rs index e0c1629e53b9..d8973d2b4d09 100644 --- a/hydroflow/tests/compile-fail/surface_source_interval_badarg.rs +++ b/dfir_rs/tests/compile-fail/surface_source_interval_badarg.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::dfir_syntax; -#[hydroflow::main] +#[dfir_rs::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_interval_badarg.stderr b/dfir_rs/tests/compile-fail/surface_source_interval_badarg.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_source_interval_badarg.stderr rename to dfir_rs/tests/compile-fail/surface_source_interval_badarg.stderr diff --git a/hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore b/dfir_rs/tests/compile-fail/surface_source_iter_badtype.rs.ignore similarity index 58% rename from hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore rename to dfir_rs/tests/compile-fail/surface_source_iter_badtype.rs.ignore index f97ad44dfcf2..8e0851ce80a9 100644 --- a/hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore +++ b/dfir_rs/tests/compile-fail/surface_source_iter_badtype.rs.ignore @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_source_iter_badtype.stderr b/dfir_rs/tests/compile-fail/surface_source_iter_badtype.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_source_iter_badtype.stderr rename to dfir_rs/tests/compile-fail/surface_source_iter_badtype.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs b/dfir_rs/tests/compile-fail/surface_syntax_eol_arrow.rs similarity index 52% rename from hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs rename to dfir_rs/tests/compile-fail/surface_syntax_eol_arrow.rs index 8bf5ac542013..640e33f7e5b5 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_eol_arrow.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/compile-fail/surface_syntax_eol_arrow.stderr similarity index 59% rename from hydroflow/tests/compile-fail/surface_syntax_eol_arrow.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_eol_arrow.stderr index 7eaa1562265e..c887f33e5cd9 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.stderr +++ b/dfir_rs/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/dfir_rs/tests/compile-fail/surface_syntax_eol_indexing.rs similarity index 53% rename from hydroflow/tests/compile-fail/surface_syntax_eol_indexing.rs rename to dfir_rs/tests/compile-fail/surface_syntax_eol_indexing.rs index d232a24458a5..96af7116cdf1 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_eol_indexing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/compile-fail/surface_syntax_eol_indexing.stderr similarity index 58% rename from hydroflow/tests/compile-fail/surface_syntax_eol_indexing.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_eol_indexing.stderr index bbdf02f4a573..3ea5335c1836 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.stderr +++ b/dfir_rs/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/dfir_rs/tests/compile-fail/surface_syntax_eol_missingop.rs similarity index 52% rename from hydroflow/tests/compile-fail/surface_syntax_eol_missingop.rs rename to dfir_rs/tests/compile-fail/surface_syntax_eol_missingop.rs index 229787ac1005..5276af5589ff 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_missingop.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_eol_missingop.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_missingop.stderr b/dfir_rs/tests/compile-fail/surface_syntax_eol_missingop.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_eol_missingop.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_eol_missingop.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_op.rs b/dfir_rs/tests/compile-fail/surface_syntax_eol_op.rs similarity index 59% rename from hydroflow/tests/compile-fail/surface_syntax_eol_op.rs rename to dfir_rs/tests/compile-fail/surface_syntax_eol_op.rs index 28b5b7809c6b..2ba32d51c88b 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_op.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_eol_op.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/compile-fail/surface_syntax_eol_op.stderr similarity index 53% rename from hydroflow/tests/compile-fail/surface_syntax_eol_op.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_eol_op.stderr index 12c34360bfdd..24552a95e2d8 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_op.stderr +++ b/dfir_rs/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/dfir_rs/tests/compile-fail/surface_syntax_indexing_empty.rs similarity index 54% rename from hydroflow/tests/compile-fail/surface_syntax_indexing_empty.rs rename to dfir_rs/tests/compile-fail/surface_syntax_indexing_empty.rs index 1fa55a7d164d..65fe978414d3 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_indexing_empty.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_indexing_empty.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_indexing_empty.stderr b/dfir_rs/tests/compile-fail/surface_syntax_indexing_empty.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_indexing_empty.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_indexing_empty.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_indexing.rs similarity index 62% rename from hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs rename to dfir_rs/tests/compile-fail/surface_syntax_noarrow_indexing.rs index 4905da0918e7..8caa3b3d926c 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_indexing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_indexing.stderr b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_indexing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_noarrow_indexing.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_op.rs similarity index 58% rename from hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs rename to dfir_rs/tests/compile-fail/surface_syntax_noarrow_op.rs index bf815568cde2..2ba74b77237d 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_op.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_op.stderr b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_op.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_noarrow_op.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_noarrow_op.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_paren.rs similarity index 59% rename from hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs rename to dfir_rs/tests/compile-fail/surface_syntax_noarrow_paren.rs index 34857dbf5de0..c7ade304c619 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_paren.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_syntax_noarrow_paren.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_noarrow_paren.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren.rs similarity index 58% rename from hydroflow/tests/compile-fail/surface_syntax_paren.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren.rs index e8b1731df7b1..089199421b52 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren_arrow.rs similarity index 53% rename from hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren_arrow.rs index caa6b9df6943..f868d85f07b6 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren_arrow.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_arrow.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren_arrow.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren_arrow.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren_arrow.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren_indexing.rs similarity index 54% rename from hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren_indexing.rs index 45662485bbe0..2ceee9559785 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren_indexing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_indexing.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren_indexing.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren_indexing.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren_indexing.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren_missingop.rs similarity index 53% rename from hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren_missingop.rs index 19e6bec9f186..1da0c2f0e515 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren_missingop.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_missingop.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren_missingop.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren_missingop.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren_missingop.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_op.rs similarity index 59% rename from hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_op.rs index 1ff2d2d8f705..fff2a7a823b1 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_op.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_op.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_op.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_op.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs similarity index 59% rename from hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs index 139ca6cbf593..2409cabb4500 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_paren.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren_noarrow_paren.stderr diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs b/dfir_rs/tests/compile-fail/surface_syntax_paren_semicolon.rs similarity index 52% rename from hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs rename to dfir_rs/tests/compile-fail/surface_syntax_paren_semicolon.rs index 806ac064ae27..d043129522b3 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs +++ b/dfir_rs/tests/compile-fail/surface_syntax_paren_semicolon.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_semicolon.stderr b/dfir_rs/tests/compile-fail/surface_syntax_paren_semicolon.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.stderr rename to dfir_rs/tests/compile-fail/surface_syntax_paren_semicolon.stderr diff --git a/hydroflow/tests/compile-fail/surface_unknown_operators.rs b/dfir_rs/tests/compile-fail/surface_unknown_operators.rs similarity index 57% rename from hydroflow/tests/compile-fail/surface_unknown_operators.rs rename to dfir_rs/tests/compile-fail/surface_unknown_operators.rs index a2fb0888830f..269719096369 100644 --- a/hydroflow/tests/compile-fail/surface_unknown_operators.rs +++ b/dfir_rs/tests/compile-fail/surface_unknown_operators.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_unknown_operators.stderr b/dfir_rs/tests/compile-fail/surface_unknown_operators.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_unknown_operators.stderr rename to dfir_rs/tests/compile-fail/surface_unknown_operators.stderr diff --git a/hydroflow/tests/compile-fail/surface_use_bad1.rs b/dfir_rs/tests/compile-fail/surface_use_bad1.rs similarity index 63% rename from hydroflow/tests/compile-fail/surface_use_bad1.rs rename to dfir_rs/tests/compile-fail/surface_use_bad1.rs index 09a005b9ae57..d1214a9c767b 100644 --- a/hydroflow/tests/compile-fail/surface_use_bad1.rs +++ b/dfir_rs/tests/compile-fail/surface_use_bad1.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_bad1.stderr b/dfir_rs/tests/compile-fail/surface_use_bad1.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_use_bad1.stderr rename to dfir_rs/tests/compile-fail/surface_use_bad1.stderr diff --git a/hydroflow/tests/compile-fail/surface_use_bad2.rs b/dfir_rs/tests/compile-fail/surface_use_bad2.rs similarity index 62% rename from hydroflow/tests/compile-fail/surface_use_bad2.rs rename to dfir_rs/tests/compile-fail/surface_use_bad2.rs index 4cb2cf288f99..8203011e0264 100644 --- a/hydroflow/tests/compile-fail/surface_use_bad2.rs +++ b/dfir_rs/tests/compile-fail/surface_use_bad2.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_bad2.stderr b/dfir_rs/tests/compile-fail/surface_use_bad2.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_use_bad2.stderr rename to dfir_rs/tests/compile-fail/surface_use_bad2.stderr diff --git a/hydroflow/tests/compile-fail/surface_use_bad3.rs b/dfir_rs/tests/compile-fail/surface_use_bad3.rs similarity index 62% rename from hydroflow/tests/compile-fail/surface_use_bad3.rs rename to dfir_rs/tests/compile-fail/surface_use_bad3.rs index 64024c337cf7..763635811a20 100644 --- a/hydroflow/tests/compile-fail/surface_use_bad3.rs +++ b/dfir_rs/tests/compile-fail/surface_use_bad3.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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.stderr b/dfir_rs/tests/compile-fail/surface_use_bad3.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_use_bad3.stderr rename to dfir_rs/tests/compile-fail/surface_use_bad3.stderr diff --git a/hydroflow/tests/compile-fail/surface_use_unknown.rs b/dfir_rs/tests/compile-fail/surface_use_unknown.rs similarity index 62% rename from hydroflow/tests/compile-fail/surface_use_unknown.rs rename to dfir_rs/tests/compile-fail/surface_use_unknown.rs index 67049c34a3d9..48b16e88a86e 100644 --- a/hydroflow/tests/compile-fail/surface_use_unknown.rs +++ b/dfir_rs/tests/compile-fail/surface_use_unknown.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_unknown.stderr b/dfir_rs/tests/compile-fail/surface_use_unknown.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_use_unknown.stderr rename to dfir_rs/tests/compile-fail/surface_use_unknown.stderr diff --git a/hydroflow/tests/compile-fail/surface_varname_undefined.rs b/dfir_rs/tests/compile-fail/surface_varname_undefined.rs similarity index 57% rename from hydroflow/tests/compile-fail/surface_varname_undefined.rs rename to dfir_rs/tests/compile-fail/surface_varname_undefined.rs index 3f928c5c0a6b..fa73ff35c617 100644 --- a/hydroflow/tests/compile-fail/surface_varname_undefined.rs +++ b/dfir_rs/tests/compile-fail/surface_varname_undefined.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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_varname_undefined.stderr b/dfir_rs/tests/compile-fail/surface_varname_undefined.stderr similarity index 100% rename from hydroflow/tests/compile-fail/surface_varname_undefined.stderr rename to dfir_rs/tests/compile-fail/surface_varname_undefined.stderr diff --git a/hydroflow/tests/datalog_compile_fail.rs b/dfir_rs/tests/datalog_compile_fail.rs similarity index 100% rename from hydroflow/tests/datalog_compile_fail.rs rename to dfir_rs/tests/datalog_compile_fail.rs diff --git a/hydroflow/tests/datalog_frontend.rs b/dfir_rs/tests/datalog_frontend.rs similarity index 76% rename from hydroflow/tests/datalog_frontend.rs rename to dfir_rs/tests/datalog_frontend.rs index 86bc845fe42e..80692420ac63 100644 --- a/hydroflow/tests/datalog_frontend.rs +++ b/dfir_rs/tests/datalog_frontend.rs @@ -1,12 +1,12 @@ -use hydroflow::datalog; -use hydroflow::util::collect_ready; -use hydroflow::util::multiset::HashMultiSet; +use dfir_rs::datalog; +use dfir_rs::util::collect_ready; +use dfir_rs::util::multiset::HashMultiSet; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_minimal() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 2)).unwrap(); @@ -26,7 +26,7 @@ pub fn test_minimal() { #[multiplatform_test] pub fn test_minimal_static() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -51,8 +51,8 @@ pub fn test_minimal_static() { #[multiplatform_test] pub fn test_duplicated_facts() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 2)).unwrap(); @@ -73,8 +73,8 @@ pub fn test_duplicated_facts() { #[multiplatform_test] pub fn test_join_with_self() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 2)).unwrap(); in_send.send((2, 1)).unwrap(); @@ -99,8 +99,8 @@ pub fn test_join_with_self() { #[multiplatform_test] pub fn test_wildcard_fields() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize,)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize,)>(); let mut flow = datalog!( r#" @@ -121,8 +121,8 @@ pub fn test_wildcard_fields() { #[multiplatform_test] pub fn test_multi_use_intermediate() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 2)).unwrap(); in_send.send((2, 1)).unwrap(); @@ -148,9 +148,9 @@ pub fn test_multi_use_intermediate() { #[multiplatform_test] pub fn test_join_with_other() { - let (in1_send, in1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in2_send, in2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in1_send, in1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in2_send, in2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -182,9 +182,9 @@ pub fn test_join_with_other() { #[multiplatform_test] pub fn test_multiple_contributors() { - let (in1_send, in1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in2_send, in2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in1_send, in1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in2_send, in2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in1_send.send((1, 2)).unwrap(); in2_send.send((3, 1)).unwrap(); @@ -210,9 +210,9 @@ pub fn test_multiple_contributors() { #[multiplatform_test] pub fn test_transitive_closure() { - let (edges_send, edges) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (seed_reachable_send, seed_reachable) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (reachable, mut reachable_recv) = hydroflow::util::unbounded_channel::<(usize,)>(); + let (edges_send, edges) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (seed_reachable_send, seed_reachable) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (reachable, mut reachable_recv) = dfir_rs::util::unbounded_channel::<(usize,)>(); seed_reachable_send.send((1,)).unwrap(); edges_send.send((3, 4)).unwrap(); @@ -240,10 +240,10 @@ pub fn test_transitive_closure() { #[multiplatform_test] pub fn test_triple_relation_join() { - let (in1_send, in1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in2_send, in2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in3_send, in3) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize, usize, usize)>(); + let (in1_send, in1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in2_send, in2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in3_send, in3) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize, usize, usize)>(); in1_send.send((1, 2)).unwrap(); in2_send.send((2, 1)).unwrap(); @@ -273,8 +273,8 @@ pub fn test_triple_relation_join() { #[multiplatform_test] pub fn test_local_constraints() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 2)).unwrap(); in_send.send((1, 1)).unwrap(); @@ -295,8 +295,8 @@ pub fn test_local_constraints() { #[multiplatform_test] pub fn test_boolean_relation_eq() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 1)).unwrap(); in_send.send((1, 2)).unwrap(); @@ -318,8 +318,8 @@ pub fn test_boolean_relation_eq() { #[multiplatform_test] pub fn test_boolean_relation_lt() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 1)).unwrap(); in_send.send((1, 2)).unwrap(); @@ -341,8 +341,8 @@ pub fn test_boolean_relation_lt() { #[multiplatform_test] pub fn test_boolean_relation_le() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 1)).unwrap(); in_send.send((1, 2)).unwrap(); @@ -367,8 +367,8 @@ pub fn test_boolean_relation_le() { #[multiplatform_test] pub fn test_boolean_relation_gt() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 1)).unwrap(); in_send.send((1, 2)).unwrap(); @@ -390,8 +390,8 @@ pub fn test_boolean_relation_gt() { #[multiplatform_test] pub fn test_boolean_relation_ge() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 1)).unwrap(); in_send.send((1, 2)).unwrap(); @@ -416,10 +416,10 @@ pub fn test_boolean_relation_ge() { #[multiplatform_test] pub fn test_join_multiple_and_relation() { - let (in1_send, in1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in2_send, in2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in3_send, in3) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize, usize, usize)>(); + let (in1_send, in1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in2_send, in2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in3_send, in3) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize, usize, usize)>(); in1_send.send((1, 2)).unwrap(); @@ -452,10 +452,10 @@ pub fn test_join_multiple_and_relation() { pub fn test_join_multiple_then_relation() { // Same test as test_join_multiple_and_relation, except with a filter on top instead of a // filter in the join. - let (in1_send, in1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in2_send, in2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (in3_send, in3) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize, usize, usize)>(); + let (in1_send, in1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in2_send, in2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (in3_send, in3) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize, usize, usize)>(); in1_send.send((1, 2)).unwrap(); @@ -487,9 +487,9 @@ pub fn test_join_multiple_then_relation() { #[multiplatform_test] pub fn test_defer_tick() { - let (ints_1_send, ints_1) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (ints_2_send, ints_2) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize,)>(); + let (ints_1_send, ints_1) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (ints_2_send, ints_2) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize,)>(); ints_1_send.send((1,)).unwrap(); ints_1_send.send((2,)).unwrap(); @@ -524,10 +524,10 @@ pub fn test_defer_tick() { #[multiplatform_test] pub fn test_anti_join() { - let (ints_1_send, ints_1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (ints_2_send, ints_2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (ints_3_send, ints_3) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_1_send, ints_1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (ints_2_send, ints_2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (ints_3_send, ints_3) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -563,10 +563,10 @@ pub fn test_anti_join() { #[multiplatform_test] pub fn test_anti_join_defer_tick() { - let (ints_1_send, ints_1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (ints_2_send, ints_2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (ints_3_send, ints_3) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_1_send, ints_1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (ints_2_send, ints_2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (ints_3_send, ints_3) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -606,10 +606,10 @@ pub fn test_anti_join_defer_tick() { #[multiplatform_test] pub fn test_anti_join_defer_cycle() { - let (ints_1_send, ints_1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (ints_2_send, ints_2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (ints_3_send, ints_3) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_1_send, ints_1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (ints_2_send, ints_2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (ints_3_send, ints_3) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -648,8 +648,8 @@ pub fn test_anti_join_defer_cycle() { #[multiplatform_test] fn test_max() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -677,8 +677,8 @@ fn test_max() { #[multiplatform_test] fn test_max_all() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -700,8 +700,8 @@ fn test_max_all() { #[multiplatform_test] fn test_max_defer_tick() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -727,16 +727,16 @@ fn test_max_defer_tick() { #[multiplatform_test] fn test_send_to_node() { - let (ints_send_1, ints_1) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (_ints_send_2, ints_2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_send_1, ints_1) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (_ints_send_2, ints_2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); - let (result_1, mut result_recv_1) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (result_2, mut result_recv_2) = hydroflow::util::unbounded_channel::<(usize,)>(); + let (result_1, mut result_recv_1) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (result_2, mut result_recv_2) = dfir_rs::util::unbounded_channel::<(usize,)>(); let (_async_send_result_1, async_receive_result_1) = - hydroflow::util::unbounded_channel::<(usize,)>(); + dfir_rs::util::unbounded_channel::<(usize,)>(); let (async_send_result_2, async_receive_result_2) = - hydroflow::util::unbounded_channel::<(usize,)>(); + dfir_rs::util::unbounded_channel::<(usize,)>(); let mut flow_1 = { let ints = ints_1; @@ -790,9 +790,9 @@ fn test_send_to_node() { #[multiplatform_test] fn test_aggregations_and_comments() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (result2, mut result_recv2) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (result2, mut result_recv2) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -832,8 +832,8 @@ fn test_aggregations_and_comments() { #[multiplatform_test] fn test_aggregations_fold_keyed_expr() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); let mut flow = datalog!( r#" @@ -857,8 +857,8 @@ fn test_aggregations_fold_keyed_expr() { #[multiplatform_test] fn test_choose_strings() { - let (strings_send, strings) = hydroflow::util::unbounded_channel::<(String,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(String,)>(); + let (strings_send, strings) = dfir_rs::util::unbounded_channel::<(String,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(String,)>(); let mut flow = datalog!( r#" @@ -881,8 +881,8 @@ fn test_choose_strings() { #[multiplatform_test] fn test_non_copy_but_clone() { - let (strings_send, strings) = hydroflow::util::unbounded_channel::<(String, String)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(String, String)>(); + let (strings_send, strings) = dfir_rs::util::unbounded_channel::<(String, String)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(String, String)>(); let mut flow = datalog!( r#" @@ -907,8 +907,8 @@ fn test_non_copy_but_clone() { #[multiplatform_test] fn test_expr_lhs() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64,)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64,)>(); let mut flow = datalog!( r#" @@ -936,8 +936,8 @@ fn test_expr_lhs() { #[multiplatform_test] fn test_less_than_relation() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64,)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64,)>(); let mut flow = datalog!( r#" @@ -960,8 +960,8 @@ fn test_less_than_relation() { #[multiplatform_test] fn test_expr_predicate() { - let (ints_send, ints) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64,)>(); + let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64,)>(); let mut flow = datalog!( r#" @@ -987,13 +987,13 @@ fn test_expr_predicate() { #[multiplatform_test] fn test_persist() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (ints2_send, ints2) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (ints3_send, ints3) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64, i64)>(); - let (result2, mut result2_recv) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result3, mut result3_recv) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result4, mut result4_recv) = hydroflow::util::unbounded_channel::<(i64,)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (ints2_send, ints2) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (ints3_send, ints3) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64, i64)>(); + let (result2, mut result2_recv) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result3, mut result3_recv) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result4, mut result4_recv) = dfir_rs::util::unbounded_channel::<(i64,)>(); let mut flow = datalog!( r#" @@ -1059,8 +1059,8 @@ fn test_persist() { #[multiplatform_test] fn test_persist_uniqueness() { - let (ints2_send, ints2) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize,)>(); + let (ints2_send, ints2) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize,)>(); let mut flow = datalog!( r#" @@ -1097,10 +1097,10 @@ fn test_persist_uniqueness() { #[multiplatform_test] fn test_wildcard_join_count() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<(i64, i64)>(); - let (ints2_send, ints2) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(usize,)>(); - let (result2, mut result2_recv) = hydroflow::util::unbounded_channel::<(usize,)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<(i64, i64)>(); + let (ints2_send, ints2) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize,)>(); + let (result2, mut result2_recv) = dfir_rs::util::unbounded_channel::<(usize,)>(); let mut flow = datalog!( r#" @@ -1127,9 +1127,9 @@ fn test_wildcard_join_count() { #[multiplatform_test] fn test_collect_vec() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (ints2_send, ints2) = hydroflow::util::unbounded_channel::<(i64,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(Vec<(i64, i64)>,)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (ints2_send, ints2) = dfir_rs::util::unbounded_channel::<(i64,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(Vec<(i64, i64)>,)>(); let mut flow = datalog!( r#" @@ -1163,8 +1163,8 @@ fn test_collect_vec() { #[multiplatform_test] fn test_flatten() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<(i64, Vec)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<(i64, Vec)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64)>(); let mut flow = datalog!( r#" @@ -1189,8 +1189,8 @@ fn test_flatten() { #[test] fn test_detuple() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<((i64, i64),)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<((i64, i64),)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64)>(); let mut flow = datalog!( r#" @@ -1215,8 +1215,8 @@ fn test_detuple() { #[test] fn test_multi_detuple() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<((i64, i64), (i64, i64))>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64, i64, i64)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<((i64, i64), (i64, i64))>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64, i64, i64)>(); let mut flow = datalog!( r#" @@ -1241,8 +1241,8 @@ fn test_multi_detuple() { #[test] fn test_flat_then_detuple() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<(Vec<(i64, i64)>,)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<(Vec<(i64, i64)>,)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64)>(); let mut flow = datalog!( r#" @@ -1267,8 +1267,8 @@ fn test_flat_then_detuple() { #[test] fn test_detuple_then_flat() { - let (ints1_send, ints1) = hydroflow::util::unbounded_channel::<((Vec, Vec),)>(); - let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64)>(); + let (ints1_send, ints1) = dfir_rs::util::unbounded_channel::<((Vec, Vec),)>(); + let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64)>(); let mut flow = datalog!( r#" @@ -1294,13 +1294,13 @@ fn test_detuple_then_flat() { // #[ignore] // This test depends on the ordering of specific tuples which is undefined. // #[multiplatform_test] // fn test_index() { -// let (ints_send, ints) = hydroflow::util::unbounded_channel::<(i64, i64)>(); -// let (result, mut result_recv) = hydroflow::util::unbounded_channel::<(i64, i64, i32)>(); -// let (result2, mut result2_recv) = hydroflow::util::unbounded_channel::<(i64, usize, usize)>(); +// let (ints_send, ints) = dfir_rs::util::unbounded_channel::<(i64, i64)>(); +// let (result, mut result_recv) = dfir_rs::util::unbounded_channel::<(i64, i64, i32)>(); +// let (result2, mut result2_recv) = dfir_rs::util::unbounded_channel::<(i64, usize, usize)>(); -// let (result3, mut result3_recv) = hydroflow::util::unbounded_channel::<(i64, i64, usize)>(); -// let (result4, mut result4_recv) = hydroflow::util::unbounded_channel::<(i64, usize, usize)>(); -// let (result5, mut result5_recv) = hydroflow::util::unbounded_channel::<(i64, i64, usize)>(); +// let (result3, mut result3_recv) = dfir_rs::util::unbounded_channel::<(i64, i64, usize)>(); +// let (result4, mut result4_recv) = dfir_rs::util::unbounded_channel::<(i64, usize, usize)>(); +// let (result5, mut result5_recv) = dfir_rs::util::unbounded_channel::<(i64, i64, usize)>(); // let mut flow = datalog!( // r#" diff --git a/hydroflow/tests/datalog_minimal.rs b/dfir_rs/tests/datalog_minimal.rs similarity index 64% rename from hydroflow/tests/datalog_minimal.rs rename to dfir_rs/tests/datalog_minimal.rs index daf13b16cce2..ecd8ebb10d7d 100644 --- a/hydroflow/tests/datalog_minimal.rs +++ b/dfir_rs/tests/datalog_minimal.rs @@ -1,11 +1,11 @@ -use hydroflow::datalog; -use hydroflow::util::collect_ready; +use dfir_rs::datalog; +use dfir_rs::util::collect_ready; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_minimal() { - let (in_send, input) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (in_send, input) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); in_send.send((1, 2)).unwrap(); diff --git a/hydroflow/tests/groupby.rs b/dfir_rs/tests/groupby.rs similarity index 97% rename from hydroflow/tests/groupby.rs rename to dfir_rs/tests/groupby.rs index 0bed8bc1785e..d4b50f075805 100644 --- a/hydroflow/tests/groupby.rs +++ b/dfir_rs/tests/groupby.rs @@ -2,9 +2,9 @@ use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::{Iter, VecHandoff}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::{Iter, VecHandoff}; use multiplatform_test::multiplatform_test; #[derive(Clone, Copy, Debug)] @@ -92,7 +92,7 @@ const BATCH_C: &[Employee] = &[ /// SQL: SELECT department FROM employees WHERE 20_000 <= SUM(salary) GROUP BY department #[multiplatform_test] fn fold_keyed_monotonic_core() { - let mut hf = Hydroflow::new(); + let mut hf = Dfir::new(); let (source_send, source_recv) = hf.make_edge::<_, VecHandoff>("source handoff"); let input = hf.add_input("source", source_send); @@ -147,7 +147,7 @@ fn fold_keyed_monotonic_core() { // #[test] // #[multiplatform_test] // fn fold_keyed_monotonic_surface() { -// use hydroflow::builder::prelude::*; +// use dfir_rs::builder::prelude::*; // let mut hf_builder = HydroflowBuilder::new(); // let (input, source_recv) = hf_builder.add_channel_input::<_, _, VecHandoff>("source"); @@ -200,7 +200,7 @@ fn fold_keyed_monotonic_core() { // #[test] // #[multiplatform_test] // fn fold_keyed_nonmon_surface() { -// use hydroflow::builder::prelude::*; +// use dfir_rs::builder::prelude::*; // let mut hf_builder = HydroflowBuilder::new(); // let (input, source_recv) = hf_builder.add_channel_input::<_, _, VecHandoff>("source"); diff --git a/hydroflow/tests/scheduled_teeing_handoff.rs b/dfir_rs/tests/scheduled_teeing_handoff.rs similarity index 96% rename from hydroflow/tests/scheduled_teeing_handoff.rs rename to dfir_rs/tests/scheduled_teeing_handoff.rs index a4b86b8d1d16..db443245fd74 100644 --- a/hydroflow/tests/scheduled_teeing_handoff.rs +++ b/dfir_rs/tests/scheduled_teeing_handoff.rs @@ -1,14 +1,14 @@ use std::cell::RefCell; use std::rc::Rc; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::TeeingHandoff; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::TeeingHandoff; use multiplatform_test::multiplatform_test; #[multiplatform_test] fn test_basic() { - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let mut data = vec![1, 2, 3, 4]; let (source, sink1) = df.make_edge::<_, TeeingHandoff>("ok"); let sink2 = sink1.tee(&mut df); @@ -57,7 +57,7 @@ fn test_scheduling() { use std::cell::RefCell; use std::rc::Rc; - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let input = Rc::new(RefCell::new(vec![1, 2, 3, 4])); let input_recv = Rc::clone(&input); @@ -115,7 +115,7 @@ fn test_scheduling_tee_after() { use std::cell::RefCell; use std::rc::Rc; - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let input = Rc::new(RefCell::new(vec![1, 2, 3, 4])); let input_recv = Rc::clone(&input); @@ -174,7 +174,7 @@ fn test_scheduling_drop() { use std::cell::RefCell; use std::rc::Rc; - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let input = Rc::new(RefCell::new(vec![1, 2, 3, 4])); let input_recv = Rc::clone(&input); diff --git a/hydroflow/tests/scheduled_test.rs b/dfir_rs/tests/scheduled_test.rs similarity index 92% rename from hydroflow/tests/scheduled_test.rs rename to dfir_rs/tests/scheduled_test.rs index 36e90d52232e..84cbc3127ae0 100644 --- a/hydroflow/tests/scheduled_test.rs +++ b/dfir_rs/tests/scheduled_test.rs @@ -3,19 +3,19 @@ use std::collections::{HashMap, HashSet}; use std::rc::Rc; use std::sync::mpsc; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::VecHandoff; -use hydroflow::scheduled::port::{RecvCtx, SendCtx}; -use hydroflow::{var_args, var_expr}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::VecHandoff; +use dfir_rs::scheduled::port::{RecvCtx, SendCtx}; +use dfir_rs::{var_args, var_expr}; use multiplatform_test::multiplatform_test; #[multiplatform_test] fn map_filter() { - use hydroflow::scheduled::handoff::VecHandoff; + use dfir_rs::scheduled::handoff::VecHandoff; // A simple dataflow with one source feeding into one sink with some processing in the middle. - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (source, map_in) = df.make_edge::<_, VecHandoff>("source -> map_in"); let (map_out, filter_in) = df.make_edge::<_, VecHandoff>("map_out -> filter_in"); @@ -77,7 +77,7 @@ fn map_filter() { #[multiplatform_test] fn test_basic_variadic() { - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (source_send, sink_recv) = df.make_edge::<_, VecHandoff>("handoff"); df.add_subgraph_source("source", source_send, move |_ctx, send| { send.give(Some(5)); @@ -100,7 +100,7 @@ fn test_basic_variadic() { #[multiplatform_test] fn test_basic_n_m() { - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (source_send, sink_recv) = df.make_edge::<_, VecHandoff>("handoff"); @@ -151,7 +151,7 @@ fn test_cycle() { edges.entry(from).or_default().push(to); } - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (reachable, union_lhs) = df.make_edge::<_, VecHandoff>("reachable -> union_lhs"); let (neighbors_out, union_rhs) = @@ -243,10 +243,10 @@ fn test_cycle() { fn test_input_handle() { use std::cell::RefCell; - use hydroflow::scheduled::graph_ext::GraphExt; - use hydroflow::scheduled::handoff::VecHandoff; + use dfir_rs::scheduled::graph_ext::GraphExt; + use dfir_rs::scheduled::handoff::VecHandoff; - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (send_port, recv_port) = df.make_edge::<_, VecHandoff>("input handoff"); let input = df.add_input("input", send_port); @@ -283,10 +283,10 @@ fn test_input_handle() { fn test_input_handle_thread() { use std::cell::RefCell; - use hydroflow::scheduled::graph_ext::GraphExt; - use hydroflow::scheduled::handoff::VecHandoff; + use dfir_rs::scheduled::graph_ext::GraphExt; + use dfir_rs::scheduled::handoff::VecHandoff; - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (send_port, recv_port) = df.make_edge::<_, VecHandoff>("channel handoff"); let input = df.add_channel_input("channel", send_port); @@ -324,9 +324,9 @@ fn test_input_channel() { use std::cell::Cell; + use dfir_rs::scheduled::graph_ext::GraphExt; + use dfir_rs::scheduled::handoff::VecHandoff; use futures::channel::mpsc::channel; - use hydroflow::scheduled::graph_ext::GraphExt; - use hydroflow::scheduled::handoff::VecHandoff; let (s1, r1) = channel(8000); let (s2, r2) = channel(8000); @@ -343,7 +343,7 @@ fn test_input_channel() { std::thread::spawn(move || { let done = Rc::new(Cell::new(false)); let done_inner = done.clone(); - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let (in_chan, input) = df.make_edge("stream input handoff"); df.add_input_from_stream::<_, _, VecHandoff, _>( diff --git a/hydroflow/tests/snapshots/surface_async__echo@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_async__echo@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_async__echo@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_async__echo@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_async__echo@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_async__echo@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_async__echo@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_async__echo@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_batch__basic_2@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_batch__basic_2@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_batch__basic_2@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_batch__basic_2@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_batch__basic_2@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_batch__basic_2@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_batch__basic_2@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_batch__basic_2@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_book__surface_flows_1@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_book__surface_flows_1@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_book__surface_flows_1@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_book__surface_flows_1@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_book__surface_flows_1@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_book__surface_flows_1@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_book__surface_flows_1@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_book__surface_flows_1@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__basic_2@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__basic_2@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__basic_2@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__basic_2@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__basic_2@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__basic_2@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__basic_2@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__basic_2@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__basic_3@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__basic_3@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__basic_3@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__basic_3@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__basic_3@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__basic_3@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__basic_3@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__basic_3@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__basic_union@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__basic_union@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__basic_union@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__basic_union@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__basic_union@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__basic_union@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__basic_union@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__basic_union@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__covid_tracing@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__covid_tracing@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__covid_tracing@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__covid_tracing@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__covid_tracing@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__covid_tracing@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__covid_tracing@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__covid_tracing@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__recv_expr@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__recv_expr@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__recv_expr@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__recv_expr@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__recv_expr@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__recv_expr@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__recv_expr@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__recv_expr@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__sort@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__sort@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__sort@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__sort@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__sort@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__sort@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__sort@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__sort@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__sort_by_key@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__sort_by_key@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__sort_by_key@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__sort_by_key@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__sort_by_key@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__sort_by_key@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__sort_by_key@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__sort_by_key@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__surface_syntax_reachability_generated@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__transitive_closure@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_codegen__transitive_closure@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__transitive_closure@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_codegen__transitive_closure@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_codegen__transitive_closure@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_codegen__transitive_closure@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_codegen__transitive_closure@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_codegen__transitive_closure@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap similarity index 81% rename from hydroflow/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap index 95e059373182..a8c5c11f1ef5 100644 --- a/hydroflow/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap +++ b/dfir_rs/tests/snapshots/surface_context__context_current_tick_start@graphvis_dot.snap @@ -8,8 +8,8 @@ digraph { n1v1 [label="(n1v1) source_iter([()])", shape=invhouse, fillcolor="#88aaff"] n2v1 [label="(n2v1) map(|_| context.current_tick_start())", shape=invhouse, fillcolor="#88aaff"] n3v1 [label="(n3v1) defer_tick()", shape=invhouse, fillcolor="#88aaff"] - n4v1 [label="(n4v1) assert(|t: &hydroflow::web_time::SystemTime| t.elapsed().unwrap().as_nanos() > 0)", shape=invhouse, fillcolor="#88aaff"] - n5v1 [label="(n5v1) for_each(|t: hydroflow::web_time::SystemTime| {\l println!(\"Time between ticks: {:?}\", t.elapsed())\l})\l", shape=house, fillcolor="#ffff88"] + n4v1 [label="(n4v1) assert(|t: &dfir_rs::web_time::SystemTime| t.elapsed().unwrap().as_nanos() > 0)", shape=invhouse, fillcolor="#88aaff"] + n5v1 [label="(n5v1) for_each(|t: dfir_rs::web_time::SystemTime| {\l println!(\"Time between ticks: {:?}\", t.elapsed())\l})\l", shape=house, fillcolor="#ffff88"] n6v1 [label="(n6v1) handoff", shape=parallelogram, fillcolor="#ddddff"] n7v1 [label="(n7v1) identity()", shape=invhouse, fillcolor="#88aaff"] n8v1 [label="(n8v1) handoff", shape=parallelogram, fillcolor="#ddddff"] diff --git a/hydroflow/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap similarity index 81% rename from hydroflow/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap index ef98ed8cea68..1270d4f3b754 100644 --- a/hydroflow/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap +++ b/dfir_rs/tests/snapshots/surface_context__context_current_tick_start@graphvis_mermaid.snap @@ -11,8 +11,8 @@ linkStyle default stroke:#aaa 1v1[\"(1v1) source_iter([()])"/]:::pullClass 2v1[\"(2v1) map(|_| context.current_tick_start())"/]:::pullClass 3v1[\"(3v1) defer_tick()"/]:::pullClass -4v1[\"(4v1) assert(|t: &hydroflow::web_time::SystemTime| t.elapsed().unwrap().as_nanos() > 0)"/]:::pullClass -5v1[/"
(5v1)
for_each(|t: hydroflow::web_time::SystemTime| {
println!("Time between ticks: {:?}", t.elapsed())
})
"\]:::pushClass +4v1[\"(4v1) assert(|t: &dfir_rs::web_time::SystemTime| t.elapsed().unwrap().as_nanos() > 0)"/]:::pullClass +5v1[/"
(5v1)
for_each(|t: dfir_rs::web_time::SystemTime| {
println!("Time between ticks: {:?}", t.elapsed())
})
"\]:::pushClass 6v1["(6v1) handoff"]:::otherClass 7v1[\"(7v1) identity()"/]:::pullClass 8v1["(8v1) handoff"]:::otherClass diff --git a/hydroflow/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_context__context_current_tick_start_does_not_count_time_between_ticks_async@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_context__context_mut@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_context__context_mut@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_context__context_mut@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_context__context_mut@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_context__context_mut@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_context__context_mut@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_context__context_mut@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_context__context_mut@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_context__context_ref@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_context__context_ref@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_context__context_ref@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_context__context_ref@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_context__context_ref@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_context__context_ref@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_context__context_ref@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_context__context_ref@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_cross_singleton__basic@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_cross_singleton__basic@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_cross_singleton__basic@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_cross_singleton__basic@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_cross_singleton__basic@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_cross_singleton__basic@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_cross_singleton__basic@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_cross_singleton__basic@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_cross_singleton__union_defer_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_static_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_tick_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_multiset_timing@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_difference__diff_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_difference__diff_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_timing@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_difference__diff_timing@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_timing@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_timing@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_difference__diff_timing@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_difference__diff_timing@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_difference__diff_timing@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_difference__diff_timing@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_1_simplest.snap b/dfir_rs/tests/snapshots/surface_examples__example_1_simplest.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_1_simplest.snap rename to dfir_rs/tests/snapshots/surface_examples__example_1_simplest.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_2_simple_1.snap b/dfir_rs/tests/snapshots/surface_examples__example_2_simple_1.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_2_simple_1.snap rename to dfir_rs/tests/snapshots/surface_examples__example_2_simple_1.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_2_simple_2.snap b/dfir_rs/tests/snapshots/surface_examples__example_2_simple_2.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_2_simple_2.snap rename to dfir_rs/tests/snapshots/surface_examples__example_2_simple_2.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_3_stream.snap b/dfir_rs/tests/snapshots/surface_examples__example_3_stream.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_3_stream.snap rename to dfir_rs/tests/snapshots/surface_examples__example_3_stream.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_4_neighbors.snap b/dfir_rs/tests/snapshots/surface_examples__example_4_neighbors.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_4_neighbors.snap rename to dfir_rs/tests/snapshots/surface_examples__example_4_neighbors.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_5_reachability.snap b/dfir_rs/tests/snapshots/surface_examples__example_5_reachability.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_5_reachability.snap rename to dfir_rs/tests/snapshots/surface_examples__example_5_reachability.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_6_unreachability.snap b/dfir_rs/tests/snapshots/surface_examples__example_6_unreachability.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_6_unreachability.snap rename to dfir_rs/tests/snapshots/surface_examples__example_6_unreachability.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_naturals.snap b/dfir_rs/tests/snapshots/surface_examples__example_naturals.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_naturals.snap rename to dfir_rs/tests/snapshots/surface_examples__example_naturals.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_surface_flows_1_basic.snap b/dfir_rs/tests/snapshots/surface_examples__example_surface_flows_1_basic.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_surface_flows_1_basic.snap rename to dfir_rs/tests/snapshots/surface_examples__example_surface_flows_1_basic.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_surface_flows_2_varname.snap b/dfir_rs/tests/snapshots/surface_examples__example_surface_flows_2_varname.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_surface_flows_2_varname.snap rename to dfir_rs/tests/snapshots/surface_examples__example_surface_flows_2_varname.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap b/dfir_rs/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap rename to dfir_rs/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_surface_flows_4_context.snap b/dfir_rs/tests/snapshots/surface_examples__example_surface_flows_4_context.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_surface_flows_4_context.snap rename to dfir_rs/tests/snapshots/surface_examples__example_surface_flows_4_context.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_syntax_empty.snap b/dfir_rs/tests/snapshots/surface_examples__example_syntax_empty.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_syntax_empty.snap rename to dfir_rs/tests/snapshots/surface_examples__example_syntax_empty.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_syntax_hello_world.snap b/dfir_rs/tests/snapshots/surface_examples__example_syntax_hello_world.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_syntax_hello_world.snap rename to dfir_rs/tests/snapshots/surface_examples__example_syntax_hello_world.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_syntax_input.snap b/dfir_rs/tests/snapshots/surface_examples__example_syntax_input.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_syntax_input.snap rename to dfir_rs/tests/snapshots/surface_examples__example_syntax_input.snap diff --git a/hydroflow/tests/snapshots/surface_examples__example_syntax_output.snap b/dfir_rs/tests/snapshots/surface_examples__example_syntax_output.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_examples__example_syntax_output.snap rename to dfir_rs/tests/snapshots/surface_examples__example_syntax_output.snap diff --git a/hydroflow/tests/snapshots/surface_flow_props__basic@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_flow_props__basic@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_flow_props__basic@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_flow_props__basic@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_flow_props__basic@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_flow_props__basic@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_flow_props__basic@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_flow_props__basic@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_flow_props__union_warning@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_flow_props__union_warning@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_flow_props__union_warning@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_flow_props__union_warning@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_flow_props__union_warning@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_flow_props__union_warning@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_flow_props__union_warning@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_flow_props__union_warning@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_sort@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold__fold_sort@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_sort@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_sort@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_sort@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold__fold_sort@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_sort@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_sort@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold__fold_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold__fold_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_static_join@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold__fold_static_join@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_static_join@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_static_join@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_static_join@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold__fold_static_join@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_static_join@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_static_join@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold__fold_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold__fold_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold__fold_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold__fold_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold__fold_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_infer_basic@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_fold_keyed__fold_keyed_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_backward@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_forward@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_forwardref__forwardref_basic_middle@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join__static_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join__static_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__static_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join__static_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join__static_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join__static_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__static_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join__static_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join__static_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join__static_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__static_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join__static_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join__static_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join__static_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__static_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join__static_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join__tick_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join__tick_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__tick_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join__tick_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join__tick_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join__tick_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__tick_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join__tick_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join__tick_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join__tick_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__tick_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join__tick_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join__tick_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join__tick_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join__tick_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join__tick_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_blocking_rhs_streaming@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_static_lhs_streaming_rhs_blocking@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__static_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_blocking_rhs_streaming@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_fold_rhs_reduce@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_join_fused__tick_tick_lhs_streaming_rhs_blocking@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_1401@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__cartesian_product_tick_state@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__join@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__join@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__join@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__join@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism__join@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism__join@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism__join@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism__join@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_identity@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_lattice_bimorphism_persist_insertion__cartesian_product_multi_tick_tee@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_loop__flo_nested@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_loop__flo_nested@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_loop__flo_nested@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_loop__flo_nested@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_loop__flo_nested@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_loop__flo_nested@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_loop__flo_nested@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_loop__flo_nested@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_loop__flo_syntax@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_loop__flo_syntax@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_loop__flo_syntax@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_loop__flo_syntax@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_loop__flo_syntax@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_loop__flo_syntax@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_loop__flo_syntax@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_loop__flo_syntax@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_multiset_delta__multiset_delta@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_basic@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist_basic@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_basic@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_basic@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_basic@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist_basic@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_basic@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_basic@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_mut@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist_mut@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_mut@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_mut@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_mut@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist_mut@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_mut@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_mut@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_mut_keyed@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_pull@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist_pull@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_pull@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_pull@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_pull@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist_pull@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_pull@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_pull@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_push@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist_push@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_push@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_push@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_push@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist_push@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_push@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_push@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_replay_join@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_persist__persist_replay_join@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_replay_join@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_replay_join@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_persist__persist_replay_join@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_persist__persist_replay_join@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_persist__persist_replay_join@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_persist__persist_replay_join@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_python__python_basic@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_python__python_basic@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_python__python_basic@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_python__python_basic@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_python__python_basic@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_python__python_basic@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_python__python_basic@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_python__python_basic@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_python__python_too_many_args@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_python__python_too_many_args@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_python__python_too_many_args@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_python__python_too_many_args@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_python__python_too_many_args@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_python__python_too_many_args@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_python__python_too_many_args@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_python__python_too_many_args@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_python__python_two_args@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_python__python_two_args@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_python__python_two_args@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_python__python_two_args@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_python__python_two_args@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_python__python_two_args@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_python__python_two_args@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_python__python_two_args@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce_static@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce_static@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce_static@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce_static@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce_static@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce_static@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce_static@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce_static@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce_sum@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce_sum@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce_sum@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce_sum@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce_sum@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce_sum@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce_sum@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce_sum@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_reduce__reduce_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_reduce__reduce_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_reduce__reduce_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_reduce__reduce_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_fold_keyed@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_persist@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__issue_800_1050_reduce_keyed@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__nospin_issue_961_complicated@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_async@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__persist_stratum_run_available@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__stratum_loop@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__stratum_loop@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__stratum_loop@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__stratum_loop@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__stratum_loop@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__stratum_loop@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__stratum_loop@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__stratum_loop@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__tick_loop@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_scheduling__tick_loop@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__tick_loop@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_scheduling__tick_loop@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_scheduling__tick_loop@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_scheduling__tick_loop@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_scheduling__tick_loop@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_scheduling__tick_loop@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__fold_cross@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__fold_cross@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__fold_cross@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__fold_cross@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__fold_cross@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__fold_cross@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__fold_cross@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__fold_cross@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__fold_singleton@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__fold_singleton@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__fold_singleton@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__fold_singleton@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__fold_singleton@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__fold_singleton@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__fold_singleton@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__fold_singleton@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__fold_singleton_push@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__multi_tick@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__multi_tick@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__multi_tick@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__multi_tick@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__multi_tick@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__multi_tick@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__multi_tick@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__multi_tick@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__reduce_singleton@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__reduce_singleton@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__reduce_singleton@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__reduce_singleton@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__reduce_singleton@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__reduce_singleton@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__reduce_singleton@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__reduce_singleton@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__reduce_singleton_push@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__state@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__state@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__state@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__state@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__state@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__state@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__state@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__state@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__state_unused@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_singleton__state_unused@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__state_unused@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_singleton__state_unused@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_singleton__state_unused@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_singleton__state_unused@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_singleton__state_unused@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_singleton__state_unused@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__defer_lazy@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__defer_lazy@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__defer_lazy@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__defer_lazy@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__defer_lazy@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__defer_lazy@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__defer_lazy@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__defer_lazy@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__difference_a@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__difference_a@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__difference_a@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__difference_a@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__difference_a@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__difference_a@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__difference_a@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__difference_a@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__difference_b@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__difference_b@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__difference_b@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__difference_b@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__difference_b@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__difference_b@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__difference_b@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__difference_b@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__subgraph_stratum_consolidation@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__surface_syntax_graph_unreachability@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__tick_loop_1@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__tick_loop_1@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__tick_loop_1@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__tick_loop_1@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__tick_loop_1@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__tick_loop_1@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__tick_loop_1@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__tick_loop_1@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__tick_loop_2@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__tick_loop_2@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__tick_loop_2@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__tick_loop_2@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__tick_loop_2@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__tick_loop_2@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__tick_loop_2@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__tick_loop_2@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__tick_loop_3@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_stratum__tick_loop_3@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__tick_loop_3@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_stratum__tick_loop_3@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_stratum__tick_loop_3@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_stratum__tick_loop_3@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_stratum__tick_loop_3@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_stratum__tick_loop_3@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_unique__unique@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_unique__unique@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_unique__unique@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_unique__unique@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_static_pull@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_unique__unique_static_pull@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_static_pull@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_static_pull@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_static_pull@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_unique__unique_static_pull@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_static_pull@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_static_pull@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_static_push@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_unique__unique_static_push@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_static_push@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_static_push@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_static_push@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_unique__unique_static_push@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_static_push@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_static_push@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_tick_pull@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_unique__unique_tick_pull@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_tick_pull@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_tick_pull@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_tick_pull@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_unique__unique_tick_pull@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_tick_pull@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_tick_pull@graphvis_mermaid.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_tick_push@graphvis_dot.snap b/dfir_rs/tests/snapshots/surface_unique__unique_tick_push@graphvis_dot.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_tick_push@graphvis_dot.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_tick_push@graphvis_dot.snap diff --git a/hydroflow/tests/snapshots/surface_unique__unique_tick_push@graphvis_mermaid.snap b/dfir_rs/tests/snapshots/surface_unique__unique_tick_push@graphvis_mermaid.snap similarity index 100% rename from hydroflow/tests/snapshots/surface_unique__unique_tick_push@graphvis_mermaid.snap rename to dfir_rs/tests/snapshots/surface_unique__unique_tick_push@graphvis_mermaid.snap diff --git a/hydroflow/tests/surface_async.rs b/dfir_rs/tests/surface_async.rs similarity index 80% rename from hydroflow/tests/surface_async.rs rename to dfir_rs/tests/surface_async.rs index ac18db158cb7..ddd427092eaf 100644 --- a/hydroflow/tests/surface_async.rs +++ b/dfir_rs/tests/surface_async.rs @@ -8,16 +8,16 @@ use std::net::{Ipv4Addr, SocketAddr}; 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 dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{collect_ready_async, ready_iter, tcp_lines}; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax, rassert, rassert_eq}; use multiplatform_test::multiplatform_test; use tokio::net::{TcpListener, TcpStream, UdpSocket}; use tokio::task::LocalSet; use tokio_util::codec::{BytesCodec, FramedWrite, LinesCodec}; use tracing::Instrument; -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] pub async fn test_echo_udp() -> Result<(), Box> { let local = LocalSet::new(); @@ -28,12 +28,12 @@ pub async fn test_echo_udp() -> Result<(), Box> { // Server: let serv = local.spawn_local(async { let socket = server_socket; - let (udp_send, udp_recv, _) = hydroflow::util::udp_lines(socket); + let (udp_send, udp_recv, _) = dfir_rs::util::udp_lines(socket); println!("Server live!"); - let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); + let (seen_send, seen_recv) = dfir_rs::util::unbounded_channel(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Dfir = dfir_syntax! { recv = source_stream(udp_recv) -> map(|r| r.unwrap()) -> tee(); @@ -63,11 +63,11 @@ pub async fn test_echo_udp() -> Result<(), Box> { let socket = UdpSocket::bind((Ipv4Addr::UNSPECIFIED, 0)) .await .unwrap(); - let (send_udp, recv_udp, _) = hydroflow::util::udp_lines(socket); + let (send_udp, recv_udp, _) = dfir_rs::util::udp_lines(socket); - let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); + let (seen_send, seen_recv) = dfir_rs::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(recv_udp) -> map(|r| r.unwrap()) -> tee(); @@ -94,11 +94,11 @@ pub async fn test_echo_udp() -> Result<(), Box> { let socket = UdpSocket::bind((Ipv4Addr::UNSPECIFIED, 0)) .await .unwrap(); - let (send_udp, recv_udp, _) = hydroflow::util::udp_lines(socket); + let (send_udp, recv_udp, _) = dfir_rs::util::udp_lines(socket); - let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); + let (seen_send, seen_recv) = dfir_rs::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(recv_udp) -> map(|r| r.unwrap()) -> tee(); @@ -128,7 +128,7 @@ pub async fn test_echo_udp() -> Result<(), Box> { Ok(()) } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] pub async fn test_echo_tcp() -> Result<(), Box> { let local = LocalSet::new(); @@ -143,9 +143,9 @@ pub async fn test_echo_tcp() -> Result<(), Box> { println!("Server accepted connection!"); - let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); + let (seen_send, seen_recv) = dfir_rs::util::unbounded_channel(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Dfir = dfir_syntax! { rev = source_stream(server_recv) -> map(|x| x.unwrap()) -> tee(); @@ -170,9 +170,9 @@ pub async fn test_echo_tcp() -> Result<(), Box> { println!("Client connected!"); - let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); + let (seen_send, seen_recv) = dfir_rs::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(client_recv) -> map(|x| x.unwrap()) -> tee(); @@ -205,15 +205,15 @@ pub async fn test_echo_tcp() -> Result<(), Box> { Ok(()) } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] pub async fn test_echo() { // An edge in the input data = a pair of `usize` vertex IDs. - let (lines_send, lines_recv) = hydroflow::util::unbounded_channel::(); + let (lines_send, lines_recv) = dfir_rs::util::unbounded_channel::(); // 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: Dfir = dfir_syntax! { source_stream(lines_recv) -> dest_sink(stdout_lines); }; assert_graphvis_snapshots!(df); @@ -231,16 +231,16 @@ pub async fn test_echo() { tokio::time::sleep(Duration::from_secs(1)).await; } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] pub async fn test_futures_stream_sink() { const MAX: usize = 20; let (mut send, recv) = futures::channel::mpsc::channel::(5); send.try_send(0).unwrap(); - let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); + let (seen_send, seen_recv) = dfir_rs::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) @@ -256,16 +256,16 @@ pub async fn test_futures_stream_sink() { assert_eq!(&std::array::from_fn::<_, MAX, _>(|i| i), &*seen); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_dest_sink_bounded_channel() { // In this example we use a _bounded_ channel for our `Sink`. This is for demonstration only, - // instead you should use [`hydroflow::util::unbounded_channel`]. A bounded channel results in + // instead you should use [`dfir_rs::util::unbounded_channel`]. A bounded channel results in // `Hydroflow` buffering items internally instead of within the channel. let (send, recv) = tokio::sync::mpsc::channel::(5); 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()) @@ -282,7 +282,7 @@ async fn asynctest_dest_sink_bounded_channel() { assert_eq!(&[5, 6, 7, 8, 9], &*out); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_dest_sink_duplex() { use bytes::Bytes; use tokio::io::AsyncReadExt; @@ -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"), @@ -312,7 +312,7 @@ async fn asynctest_dest_sink_duplex() { assert_eq!(b"\x05hello\x05world", &*buf); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_dest_asyncwrite_duplex() { use tokio::io::AsyncReadExt; @@ -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()), @@ -337,20 +337,20 @@ async fn asynctest_dest_asyncwrite_duplex() { assert_eq!(b"helloworld", &*buf); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_source_stream() { - let (a_send, a_recv) = hydroflow::util::unbounded_channel::(); - let (b_send, b_recv) = hydroflow::util::unbounded_channel::(); - let (c_send, c_recv) = hydroflow::util::unbounded_channel::(); + let (a_send, a_recv) = dfir_rs::util::unbounded_channel::(); + let (b_send, b_recv) = dfir_rs::util::unbounded_channel::(); + let (c_send, c_recv) = dfir_rs::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(); @@ -378,10 +378,10 @@ async fn asynctest_source_stream() { /// /// This test is a little bit race-ey... if for some insane reason a tick (task_b) runs longer than /// the send loop delay (task_a). -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_check_state_yielding() { - let (a_send, a_recv) = hydroflow::util::unbounded_channel::(); - let (b_send, mut b_recv) = hydroflow::util::unbounded_channel::(); + let (a_send, a_recv) = dfir_rs::util::unbounded_channel::(); + let (b_send, mut b_recv) = dfir_rs::util::unbounded_channel::(); let task_a = tokio::task::spawn_local( async move { @@ -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()); @@ -423,11 +423,11 @@ async fn asynctest_check_state_yielding() { task_b.await.unwrap(); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_repeat_iter() { - let (b_send, b_recv) = hydroflow::util::unbounded_channel::(); + let (b_send, b_recv) = dfir_rs::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()); }; @@ -437,12 +437,12 @@ async fn asynctest_repeat_iter() { assert_eq!(&[0, 1, 2], &*seen); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] 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 (a_send, a_recv) = dfir_rs::util::unbounded_channel::(); + let (b_send, b_recv) = dfir_rs::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()); @@ -469,20 +469,19 @@ async fn asynctest_event_repeat_iter() { assert_eq!(&[0, 1, 2, 0, 1, 2, 10], &*seen); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_tcp() { - let (tx_out, rx_out) = hydroflow::util::unbounded_channel::(); + let (tx_out, rx_out) = dfir_rs::util::unbounded_channel::(); - 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 (tx, rx, server_addr) = dfir_rs::util::bind_tcp_lines("127.0.0.1:0".parse().unwrap()).await; + 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 (tx, rx) = dfir_rs::util::connect_tcp_lines(); + let mut echo_client = dfir_syntax! { source_iter([("Hello".to_owned(), server_addr)]) -> dest_sink(tx); @@ -503,20 +502,19 @@ async fn asynctest_tcp() { assert_eq!(&["Hello".to_owned()], &*seen); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn asynctest_udp() { - let (tx_out, rx_out) = hydroflow::util::unbounded_channel::(); + let (tx_out, rx_out) = dfir_rs::util::unbounded_channel::(); - 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 (tx, rx, server_addr) = dfir_rs::util::bind_udp_lines("127.0.0.1:0".parse().unwrap()).await; + 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 (tx, rx, _) = dfir_rs::util::bind_udp_lines("127.0.0.1:0".parse().unwrap()).await; + 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/dfir_rs/tests/surface_batch.rs similarity index 66% rename from hydroflow/tests/surface_batch.rs rename to dfir_rs/tests/surface_batch.rs index 9837ec241675..f4329bf28920 100644 --- a/hydroflow/tests/surface_batch.rs +++ b/dfir_rs/tests/surface_batch.rs @@ -1,13 +1,13 @@ -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::util::collect_ready; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] 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 (signal_tx, signal_rx) = dfir_rs::util::unbounded_channel::<()>(); + let (egress_tx, mut egress_rx) = dfir_rs::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/dfir_rs/tests/surface_book.rs similarity index 82% rename from hydroflow/tests/surface_book.rs rename to dfir_rs/tests/surface_book.rs index e946f6542fa7..289d60155754 100644 --- a/hydroflow/tests/surface_book.rs +++ b/dfir_rs/tests/surface_book.rs @@ -1,10 +1,10 @@ -use hydroflow::assert_graphvis_snapshots; +use dfir_rs::assert_graphvis_snapshots; use multiplatform_test::multiplatform_test; use tokio::time::Instant; #[multiplatform_test] fn test_surface_flows_1() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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; @@ -14,13 +14,13 @@ fn test_surface_flows_1() { df.run_available(); } -#[hydroflow::test] +#[dfir_rs::test] async fn test_source_interval() { use std::time::Duration; - use hydroflow::hydroflow_syntax; + use dfir_rs::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/dfir_rs/tests/surface_codegen.rs similarity index 81% rename from hydroflow/tests/surface_codegen.rs rename to dfir_rs/tests/surface_codegen.rs index 09153afebad6..a3f295093b27 100644 --- a/hydroflow/tests/surface_codegen.rs +++ b/dfir_rs/tests/surface_codegen.rs @@ -1,10 +1,10 @@ use std::collections::HashSet; -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 dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::util::collect_ready; +use dfir_rs::util::multiset::HashMultiSet; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; // TODO(mingwei): custom operators? How to handle in syntax? How to handle state? @@ -18,7 +18,7 @@ use multiplatform_test::multiplatform_test; // TODO(joe): QOL: make a way to generate/print the mermaid graph. -// TODO(mingwei): Prevent unused variable warnings when hydroflow code is not generated. +// TODO(mingwei): Prevent unused variable warnings when dfir code is not generated. // Joe: // TODO(mingwei): Documentation articles. @@ -26,9 +26,9 @@ use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_basic_2() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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); @@ -39,9 +39,9 @@ pub fn test_basic_2() { #[multiplatform_test] pub fn test_basic_3() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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); @@ -52,9 +52,9 @@ pub fn test_basic_3() { #[multiplatform_test] pub fn test_basic_union() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -67,10 +67,10 @@ pub fn test_basic_union() { #[multiplatform_test] pub fn test_basic_tee() { - let (out_send_a, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send_a, mut out_recv) = dfir_rs::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: Dfir = 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; @@ -131,9 +131,9 @@ pub fn test_large_diamond() { /// Test that source_stream can handle "complex" expressions. #[multiplatform_test] pub fn test_recv_expr() { - let send_recv = hydroflow::util::unbounded_channel::(); + let send_recv = dfir_rs::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; @@ -165,11 +165,11 @@ pub fn test_join_order() { pub fn test_multiset_join() { // HalfJoinStateSetUnion { - use hydroflow::compiled::pull::HalfSetJoinState; + use dfir_rs::compiled::pull::HalfSetJoinState; - let (out_tx, mut out_rx) = hydroflow::util::unbounded_channel::<(usize, (usize, usize))>(); + let (out_tx, mut out_rx) = dfir_rs::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; @@ -183,10 +183,10 @@ pub fn test_multiset_join() { // HalfMultisetJoinState lhs biased { - use hydroflow::compiled::pull::HalfMultisetJoinState; - let (out_tx, mut out_rx) = hydroflow::util::unbounded_channel::<(usize, (usize, usize))>(); + use dfir_rs::compiled::pull::HalfMultisetJoinState; + let (out_tx, mut out_rx) = dfir_rs::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; @@ -200,10 +200,10 @@ pub fn test_multiset_join() { // HalfMultisetJoinState rhs biased { - use hydroflow::compiled::pull::HalfMultisetJoinState; - let (out_tx, mut out_rx) = hydroflow::util::unbounded_channel::<(usize, (usize, usize))>(); + use dfir_rs::compiled::pull::HalfMultisetJoinState; + let (out_tx, mut out_rx) = dfir_rs::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; @@ -218,9 +218,9 @@ pub fn test_multiset_join() { #[multiplatform_test] pub fn test_cross_join() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, &str)>(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -247,9 +247,9 @@ pub fn test_cross_join() { #[multiplatform_test] pub fn test_cross_join_multiset() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, &str)>(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -283,9 +283,9 @@ pub fn test_cross_join_multiset() { #[multiplatform_test] 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 (inp_send, inp_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::(); + let mut flow = dfir_rs::dfir_syntax! { inp = source_stream(inp_recv) -> tee(); diff = difference() -> for_each(|x| out_send.send(x).unwrap()); inp -> [pos]diff; @@ -311,9 +311,9 @@ pub fn test_defer_tick() { #[multiplatform_test] 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 (inp_send, inp_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { inp = source_stream(inp_recv) -> tee(); diff = anti_join() -> sort() -> for_each(|x| out_send.send(x).unwrap()); inp -> [pos]diff; @@ -340,10 +340,10 @@ pub fn test_anti_join() { #[multiplatform_test] 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 (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -370,10 +370,10 @@ pub fn test_anti_join_static() { #[multiplatform_test] 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 (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -402,10 +402,10 @@ pub fn test_anti_join_tick_static() { #[multiplatform_test] 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 (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -434,10 +434,10 @@ pub fn test_anti_join_multiset_tick_static() { #[multiplatform_test] 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 (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -464,9 +464,9 @@ pub fn test_anti_join_multiset_static() { #[multiplatform_test] 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 (inp_send, inp_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { inp = source_stream(inp_recv) -> tee(); diff = anti_join_multiset() -> sort() -> for_each(|x| out_send.send(x).unwrap()); inp -> [pos]diff; @@ -493,9 +493,9 @@ pub fn test_anti_join_multiset() { #[multiplatform_test] pub fn test_sort() { - let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); + let (items_send, items_recv) = dfir_rs::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)); @@ -542,7 +542,7 @@ fn test_sort_by_owned() { y: i8, } - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::(); let dummies: Vec = vec![ Dummy { @@ -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(); @@ -569,15 +569,15 @@ fn test_sort_by_owned() { #[multiplatform_test] pub fn test_channel_minimal() { - let (send, recv) = hydroflow::util::unbounded_channel::(); + let (send, recv) = dfir_rs::util::unbounded_channel::(); - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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()); }; @@ -597,11 +597,11 @@ pub fn test_channel_minimal() { #[multiplatform_test] pub fn test_surface_syntax_reachability_generated() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (pairs_send, pairs_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Dfir = dfir_syntax! { reached_vertices = union() -> map(|v| (v, ())); source_iter(vec![0]) -> [0]reached_vertices; @@ -651,11 +651,11 @@ pub fn test_surface_syntax_reachability_generated() { #[multiplatform_test] pub fn test_transitive_closure() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (pairs_send, pairs_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (out_send, mut out_recv) = dfir_rs::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(); @@ -704,7 +704,7 @@ pub fn test_transitive_closure() { #[multiplatform_test] pub fn test_covid_tracing() { - use hydroflow::util::unbounded_channel; + use dfir_rs::util::unbounded_channel; const TRANSMISSIBLE_DURATION: usize = 14; // Days. @@ -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(); }; @@ -854,14 +854,14 @@ pub fn test_assert_failures() { pub fn test_iter_stream_batches() { const ITEMS: usize = 100; const BATCH: usize = 5; - let stream = hydroflow::util::iter_batches_stream(0..ITEMS, BATCH); + let stream = dfir_rs::util::iter_batches_stream(0..ITEMS, BATCH); // expect 5 items per tick. let expected: Vec<_> = (0..ITEMS) .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_compile_fail.rs b/dfir_rs/tests/surface_compile_fail.rs similarity index 100% rename from hydroflow/tests/surface_compile_fail.rs rename to dfir_rs/tests/surface_compile_fail.rs diff --git a/hydroflow/tests/surface_context.rs b/dfir_rs/tests/surface_context.rs similarity index 88% rename from hydroflow/tests/surface_context.rs rename to dfir_rs/tests/surface_context.rs index 77cdbc178610..0358529da6a4 100644 --- a/hydroflow/tests/surface_context.rs +++ b/dfir_rs/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 dfir_rs::{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() @@ -30,13 +30,13 @@ pub fn test_context_mut() { df.run_available(); } -#[multiplatform_test(hydroflow)] +#[multiplatform_test(dfir)] pub async fn test_context_current_tick_start_does_not_count_time_between_ticks_async() { let time = Rc::new(Cell::new(None)); 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/dfir_rs/tests/surface_cross_singleton.rs similarity index 79% rename from hydroflow/tests/surface_cross_singleton.rs rename to dfir_rs/tests/surface_cross_singleton.rs index 497670a28dcc..3fa12975ab82 100644 --- a/hydroflow/tests/surface_cross_singleton.rs +++ b/dfir_rs/tests/surface_cross_singleton.rs @@ -1,13 +1,13 @@ -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::util::collect_ready; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test(test, wasm, env_tracing)] pub fn test_basic() { - let (single_tx, single_rx) = hydroflow::util::unbounded_channel::<()>(); - let (egress_tx, mut egress_rx) = hydroflow::util::unbounded_channel(); + let (single_tx, single_rx) = dfir_rs::util::unbounded_channel::<()>(); + let (egress_tx, mut egress_rx) = dfir_rs::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; @@ -29,10 +29,10 @@ pub fn test_basic() { #[multiplatform_test(test, wasm, env_tracing)] 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 (cross_tx, cross_rx) = dfir_rs::util::unbounded_channel::(); + let (egress_tx, mut egress_rx) = dfir_rs::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/dfir_rs/tests/surface_demux_enum.rs similarity index 92% rename from hydroflow/tests/surface_demux_enum.rs rename to dfir_rs/tests/surface_demux_enum.rs index ffbb1ac69c6f..b39188818f35 100644 --- a/hydroflow/tests/surface_demux_enum.rs +++ b/dfir_rs/tests/surface_demux_enum.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::demux_enum::{DemuxEnum, DemuxEnumBase}; +use dfir_rs::dfir_syntax; +use dfir_rs::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 }, @@ -128,9 +128,9 @@ pub fn test_demux_enum_generic() { fn test_zero_variants() { #[derive(DemuxEnum)] enum Never {} - let (_tx, rx) = hydroflow::util::unbounded_channel::(); + let (_tx, rx) = dfir_rs::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/dfir_rs/tests/surface_demux_partition.rs similarity index 91% rename from hydroflow/tests/surface_demux_partition.rs rename to dfir_rs/tests/surface_demux_partition.rs index f59b3f8fbd57..3e46f56a5ce3 100644 --- a/hydroflow/tests/surface_demux_partition.rs +++ b/dfir_rs/tests/surface_demux_partition.rs @@ -1,5 +1,5 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::collect_ready; +use dfir_rs::dfir_syntax; +use dfir_rs::util::collect_ready; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -10,9 +10,9 @@ pub fn test_demux_1() { Square(f64), } - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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/dfir_rs/tests/surface_difference.rs similarity index 79% rename from hydroflow/tests/surface_difference.rs rename to dfir_rs/tests/surface_difference.rs index 4630a574d245..7594b14e3718 100644 --- a/hydroflow/tests/surface_difference.rs +++ b/dfir_rs/tests/surface_difference.rs @@ -1,14 +1,14 @@ -use hydroflow::assert_graphvis_snapshots; -use hydroflow::util::collect_ready; +use dfir_rs::assert_graphvis_snapshots; +use dfir_rs::util::collect_ready; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_diff_timing() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); - let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); + let (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { diff = difference() -> for_each(|x| println!("diff: {:?}", x)); poss = source_stream(pos_recv); //-> tee(); @@ -45,12 +45,12 @@ pub fn test_diff_timing() { #[multiplatform_test] pub fn test_diff_static() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); - let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); + let (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); - let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { diff = difference::<'tick, 'static>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); @@ -88,10 +88,10 @@ pub fn test_diff_static() { #[multiplatform_test] pub fn test_diff_multiset_timing() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); - let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); + let (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { diff = difference_multiset() -> for_each(|x| println!("diff: {:?}", x)); poss = source_stream(pos_recv); //-> tee(); @@ -128,12 +128,12 @@ pub fn test_diff_multiset_timing() { #[multiplatform_test] pub fn test_diff_multiset_static() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); - let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); + let (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); - let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { diff = difference_multiset::<'static>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); @@ -174,12 +174,12 @@ pub fn test_diff_multiset_static() { #[multiplatform_test] pub fn test_diff_multiset_tick_static() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); - let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); + let (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); - let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { diff = difference_multiset::<'tick, 'static>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); @@ -217,12 +217,12 @@ pub fn test_diff_multiset_tick_static() { #[multiplatform_test] pub fn test_diff_multiset_static_tick() { // An edge in the input data = a pair of `usize` vertex IDs. - let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); - let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); + let (pos_send, pos_recv) = dfir_rs::util::unbounded_channel::(); + let (neg_send, neg_recv) = dfir_rs::util::unbounded_channel::(); - let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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_examples.rs b/dfir_rs/tests/surface_examples.rs similarity index 87% rename from hydroflow/tests/surface_examples.rs rename to dfir_rs/tests/surface_examples.rs index 2543ae76ae47..36acb582b6c6 100644 --- a/hydroflow/tests/surface_examples.rs +++ b/dfir_rs/tests/surface_examples.rs @@ -4,7 +4,7 @@ use std::process::Command; use insta::assert_snapshot; -/// Bit of a jank test, runs `cargo run -p hydroflow --example ` for all the +/// Bit of a jank test, runs `cargo run -p dfir --example ` for all the /// `example_*.rs` examples and uses `insta` to snapshot tests the stdout. #[test] fn test_all() { @@ -25,7 +25,7 @@ fn test_all() { let name = example_file.strip_suffix(".rs").unwrap(); let output = Command::new("cargo") - .args(["run", "-p", "hydroflow", "--example"]) + .args(["run", "-p", "dfir_rs", "--example"]) .arg(name) .output() .expect("Failed to run example."); diff --git a/hydroflow/tests/surface_fold.rs b/dfir_rs/tests/surface_fold.rs similarity index 83% rename from hydroflow/tests/surface_fold.rs rename to dfir_rs/tests/surface_fold.rs index 3c00610e3246..97355ecc6a5a 100644 --- a/hydroflow/tests/surface_fold.rs +++ b/dfir_rs/tests/surface_fold.rs @@ -1,16 +1,16 @@ use std::collections::{HashMap, HashSet}; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::util::collect_ready; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::>(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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()); @@ -53,10 +53,10 @@ pub fn test_fold_tick() { #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::>(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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()); @@ -99,10 +99,10 @@ pub fn test_fold_static() { #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { teed_fold = source_iter(Vec::::new()) -> fold::<'tick>(|| 0, |old: &mut usize, _: usize| { *old += 1; }) -> tee(); @@ -143,8 +143,8 @@ pub fn test_fold_static_join() { #[multiplatform_test] 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 (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(u8, u8)>(); + 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); @@ -170,8 +170,8 @@ 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 (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(u8, u8)>(); + 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); @@ -202,9 +202,9 @@ pub fn test_fold_flatten() { #[multiplatform_test] pub fn test_fold_sort() { - let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); + let (items_send, items_recv) = dfir_rs::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 }) @@ -252,9 +252,9 @@ pub fn test_fold_sort() { #[multiplatform_test] pub fn test_fold_inference() { - let (_items_send, items_recv) = hydroflow::util::unbounded_channel::(); + let (_items_send, items_recv) = dfir_rs::util::unbounded_channel::(); - let _ = hydroflow::hydroflow_syntax! { + let _ = dfir_rs::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/dfir_rs/tests/surface_fold_keyed.rs similarity index 79% rename from hydroflow/tests/surface_fold_keyed.rs rename to dfir_rs/tests/surface_fold_keyed.rs index 18392bc3611b..9001a4088884 100644 --- a/hydroflow/tests/surface_fold_keyed.rs +++ b/dfir_rs/tests/surface_fold_keyed.rs @@ -1,7 +1,7 @@ use std::collections::BTreeSet; -use hydroflow::assert_graphvis_snapshots; -use hydroflow::scheduled::ticks::TickInstant; +use dfir_rs::assert_graphvis_snapshots; +use dfir_rs::scheduled::ticks::TickInstant; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -10,10 +10,9 @@ pub fn test_fold_keyed_infer_basic() { pub xid: &'static str, pub mtype: u32, } - let (result_send, mut result_recv) = - hydroflow::util::unbounded_channel::<(&'static str, u32)>(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::<(&'static str, u32)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { source_iter([ SubordResponse { xid: "123", mtype: 33 }, SubordResponse { xid: "123", mtype: 52 }, @@ -40,16 +39,16 @@ pub fn test_fold_keyed_infer_basic() { assert_eq!( &[("123", 318), ("123", 318)], - &*hydroflow::util::collect_ready::, _>(&mut result_recv) + &*dfir_rs::util::collect_ready::, _>(&mut result_recv) ); } #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::<(u32, Vec)>(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::<(u32, Vec)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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()); @@ -79,7 +78,7 @@ pub fn test_fold_keyed_tick() { [(0, vec![1, 2, 3, 4]), (1, vec![1, 1, 2])] .into_iter() .collect::>(), - hydroflow::util::collect_ready::, _>(&mut result_recv) + dfir_rs::util::collect_ready::, _>(&mut result_recv) ); items_send.send((0, vec![5, 6])).unwrap(); @@ -96,7 +95,7 @@ pub fn test_fold_keyed_tick() { [(0, vec![5, 6, 7, 8]), (1, vec![10, 11, 12])] .into_iter() .collect::>(), - hydroflow::util::collect_ready::, _>(&mut result_recv) + dfir_rs::util::collect_ready::, _>(&mut result_recv) ); df.run_available(); // Should return quickly and not hang @@ -104,10 +103,10 @@ pub fn test_fold_keyed_tick() { #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::<(u32, Vec)>(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::<(u32, Vec)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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()); @@ -137,7 +136,7 @@ pub fn test_fold_keyed_static() { [(0, vec![1, 2, 3, 4]), (1, vec![1, 1, 2])] .into_iter() .collect::>(), - hydroflow::util::collect_ready::, _>(&mut result_recv) + dfir_rs::util::collect_ready::, _>(&mut result_recv) ); items_send.send((0, vec![5, 6])).unwrap(); @@ -157,7 +156,7 @@ pub fn test_fold_keyed_static() { ] .into_iter() .collect::>(), - hydroflow::util::collect_ready::, _>(&mut result_recv) + dfir_rs::util::collect_ready::, _>(&mut result_recv) ); df.run_available(); // Should return quickly and not hang diff --git a/hydroflow/tests/surface_forwardref.rs b/dfir_rs/tests/surface_forwardref.rs similarity index 71% rename from hydroflow/tests/surface_forwardref.rs rename to dfir_rs/tests/surface_forwardref.rs index c35c14620842..146e425d2210 100644 --- a/hydroflow/tests/surface_forwardref.rs +++ b/dfir_rs/tests/surface_forwardref.rs @@ -1,12 +1,12 @@ -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::util::collect_ready; +use dfir_rs::{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 (out_send, mut out_recv) = dfir_rs::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()); }; @@ -21,9 +21,9 @@ pub fn test_forwardref_basic_forward() { #[multiplatform_test] pub fn test_forwardref_basic_backward() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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); }; @@ -38,9 +38,9 @@ pub fn test_forwardref_basic_backward() { #[multiplatform_test] pub fn test_forwardref_basic_middle() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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/dfir_rs/tests/surface_join.rs similarity index 94% rename from hydroflow/tests/surface_join.rs rename to dfir_rs/tests/surface_join.rs index 5f07620bc77b..303e95ed1d63 100644 --- a/hydroflow/tests/surface_join.rs +++ b/dfir_rs/tests/surface_join.rs @@ -2,8 +2,8 @@ use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::{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/dfir_rs/tests/surface_join_fused.rs similarity index 95% rename from hydroflow/tests/surface_join_fused.rs rename to dfir_rs/tests/surface_join_fused.rs index fc7d5beb8b91..2903508c8504 100644 --- a/hydroflow/tests/surface_join_fused.rs +++ b/dfir_rs/tests/surface_join_fused.rs @@ -2,9 +2,9 @@ use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; -use hydroflow::lattices::set_union::SetUnionSingletonSet; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::lattices::set_union::SetUnionSingletonSet; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::{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/dfir_rs/tests/surface_lattice_batch.rs similarity index 94% rename from hydroflow/tests/surface_lattice_batch.rs rename to dfir_rs/tests/surface_lattice_batch.rs index c04bd0d98570..90795d041c7e 100644 --- a/hydroflow/tests/surface_lattice_batch.rs +++ b/dfir_rs/tests/surface_lattice_batch.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use dfir_rs::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/dfir_rs/tests/surface_lattice_bimorphism.rs similarity index 89% rename from hydroflow/tests/surface_lattice_bimorphism.rs rename to dfir_rs/tests/surface_lattice_bimorphism.rs index 9909bc0832a5..7d33cea65f47 100644 --- a/hydroflow/tests/surface_lattice_bimorphism.rs +++ b/dfir_rs/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 dfir_rs::util::collect_ready; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use lattices::ght::lattice::{DeepJoinLatticeBimorphism, GhtBimorphism}; use lattices::ght::GeneralizedHashTrieNode; use lattices::map_union::{KeyedBimorphism, MapUnionHashMap, MapUnionSingletonMap}; @@ -13,9 +13,9 @@ use variadics::CloneVariadic; #[multiplatform_test] pub fn test_cartesian_product() { - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::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>(); @@ -48,9 +48,9 @@ pub fn test_cartesian_product() { #[multiplatform_test(test, wasm, env_tracing)] pub fn test_cartesian_product_1401() { - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::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>(); @@ -75,9 +75,9 @@ pub fn test_cartesian_product_1401() { #[multiplatform_test] pub fn test_join() { - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::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>>(); @@ -114,11 +114,11 @@ pub fn test_join() { /// Test for https://github.com/hydro-project/hydroflow/issues/1298 #[multiplatform_test] pub fn test_cartesian_product_tick_state() { - let (lhs_send, lhs_recv) = hydroflow::util::unbounded_channel::(); - let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::(); - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (lhs_send, lhs_recv) = dfir_rs::util::unbounded_channel::(); + let (rhs_send, rhs_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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/dfir_rs/tests/surface_lattice_bimorphism_persist_insertion.rs similarity index 78% rename from hydroflow/tests/surface_lattice_bimorphism_persist_insertion.rs rename to dfir_rs/tests/surface_lattice_bimorphism_persist_insertion.rs index 25186872247b..78db5eb4138f 100644 --- a/hydroflow/tests/surface_lattice_bimorphism_persist_insertion.rs +++ b/dfir_rs/tests/surface_lattice_bimorphism_persist_insertion.rs @@ -1,8 +1,8 @@ use std::collections::HashSet; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::collect_ready; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use lattices::set_union::{CartesianProductBimorphism, SetUnionHashSet, SetUnionSingletonSet}; use multiplatform_test::multiplatform_test; use tokio::sync::mpsc::UnboundedSender; @@ -10,7 +10,7 @@ use tokio_stream::wrappers::UnboundedReceiverStream; /// Check that the following tests all behave the same. fn check_cartesian_product_multi_tick( - mut df: Hydroflow, + mut df: Dfir, lhs_send: UnboundedSender, rhs_send: UnboundedSender, mut out_recv: UnboundedReceiverStream>, @@ -43,11 +43,11 @@ fn check_cartesian_product_multi_tick( #[multiplatform_test] pub fn test_cartesian_product_multi_tick() { - let (lhs_send, lhs_recv) = hydroflow::util::unbounded_channel::<_>(); - let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::<_>(); - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (lhs_send, lhs_recv) = dfir_rs::util::unbounded_channel::<_>(); + let (rhs_send, rhs_recv) = dfir_rs::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::util::unbounded_channel::<_>(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { lhs = source_stream(lhs_recv) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); @@ -69,11 +69,11 @@ pub fn test_cartesian_product_multi_tick() { #[multiplatform_test] pub fn test_cartesian_product_multi_tick_tee() { - let (lhs_send, lhs_recv) = hydroflow::util::unbounded_channel::<_>(); - let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::<_>(); - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (lhs_send, lhs_recv) = dfir_rs::util::unbounded_channel::<_>(); + let (rhs_send, rhs_recv) = dfir_rs::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::util::unbounded_channel::<_>(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { lhs = source_stream(lhs_recv) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); @@ -97,11 +97,11 @@ pub fn test_cartesian_product_multi_tick_tee() { #[multiplatform_test] pub fn test_cartesian_product_multi_tick_identity() { - let (lhs_send, lhs_recv) = hydroflow::util::unbounded_channel::<_>(); - let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::<_>(); - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (lhs_send, lhs_recv) = dfir_rs::util::unbounded_channel::<_>(); + let (rhs_send, rhs_recv) = dfir_rs::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::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/dfir_rs/tests/surface_lattice_fold.rs similarity index 79% rename from hydroflow/tests/surface_lattice_fold.rs rename to dfir_rs/tests/surface_lattice_fold.rs index 9cd06ce9dd22..de2750dd60e7 100644 --- a/hydroflow/tests/surface_lattice_fold.rs +++ b/dfir_rs/tests/surface_lattice_fold.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::{IsTop, Max, Merge}; -use hydroflow::util::collect_ready; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::{IsTop, Max, Merge}; +use dfir_rs::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)) @@ -15,8 +15,8 @@ fn test_basic() { #[test] fn test_fold_loop() { - let (output_send, output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let (output_send, output_recv) = dfir_rs::util::unbounded_channel::(); + let mut df = dfir_syntax! { start = source_iter([1]) -> map(Max::new) -> folder; @@ -35,8 +35,8 @@ 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 (output_send, output_recv) = dfir_rs::util::unbounded_channel::(); + 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/dfir_rs/tests/surface_lattice_generalized_hash_trie.rs similarity index 81% rename from hydroflow/tests/surface_lattice_generalized_hash_trie.rs rename to dfir_rs/tests/surface_lattice_generalized_hash_trie.rs index ece19b084ab9..5fe6a119a02c 100644 --- a/hydroflow/tests/surface_lattice_generalized_hash_trie.rs +++ b/dfir_rs/tests/surface_lattice_generalized_hash_trie.rs @@ -1,9 +1,9 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::ght::lattice::{DeepJoinLatticeBimorphism, GhtBimorphism}; -use hydroflow::lattices::ght::GeneralizedHashTrieNode; -use hydroflow::lattices::GhtType; -use hydroflow::util::collect_ready; -use hydroflow::variadics::{var_expr, var_type}; +use dfir_rs::dfir_syntax; +use dfir_rs::lattices::ght::lattice::{DeepJoinLatticeBimorphism, GhtBimorphism}; +use dfir_rs::lattices::ght::GeneralizedHashTrieNode; +use dfir_rs::lattices::GhtType; +use dfir_rs::util::collect_ready; +use dfir_rs::variadics::{var_expr, var_type}; use variadics::variadic_collections::VariadicHashSet; // Import the Insert trait #[test] @@ -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) @@ -36,7 +36,7 @@ fn test_basic() { fn test_join() { type MyGht = GhtType!(u8 => u16: VariadicHashSet); type ResultGht = GhtType!(u8 => u16, u16: VariadicHashSet); - let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); + let (out_send, out_recv) = dfir_rs::util::unbounded_channel::<_>(); let r = vec![ var_expr!(1, 10), @@ -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/dfir_rs/tests/surface_lattice_join.rs similarity index 85% rename from hydroflow/tests/surface_lattice_join.rs rename to dfir_rs/tests/surface_lattice_join.rs index 2100a150925c..cac1082547f9 100644 --- a/hydroflow/tests/surface_lattice_join.rs +++ b/dfir_rs/tests/surface_lattice_join.rs @@ -1,7 +1,7 @@ use std::collections::HashSet; -use hydroflow::util::collect_ready; -use hydroflow_macro::hydroflow_syntax; +use dfir_macro::dfir_syntax; +use dfir_rs::util::collect_ready; 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,10 +46,10 @@ 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; + use dfir_rs::lattices::Min; source_iter([(7, MapUnionHashMap::new_from([(3, Min::new(4))])), (7, MapUnionHashMap::new_from([(3, Min::new(5))]))]) -> [0]my_join; source_iter([(7, MapUnionSingletonMap::new_from((3, Min::new(5)))), (7, MapUnionSingletonMap::new_from((3, Min::new(4))))]) -> [1]my_join; @@ -72,16 +72,16 @@ pub fn test_lattice_join_fused_join_map_union() { #[multiplatform_test] pub fn test_lattice_join_fused_join() { - use hydroflow::lattices::Max; + use dfir_rs::lattices::Max; // 'static, 'tick. { let (out_tx, mut out_rx) = - hydroflow::util::unbounded_channel::>(); - let (lhs_tx, lhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); - let (rhs_tx, rhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); + dfir_rs::util::unbounded_channel::>(); + let (lhs_tx, lhs_rx) = dfir_rs::util::unbounded_channel::<(usize, Max)>(); + let (rhs_tx, rhs_rx) = dfir_rs::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; @@ -116,11 +116,11 @@ pub fn test_lattice_join_fused_join() { // 'static, 'static. { let (out_tx, mut out_rx) = - hydroflow::util::unbounded_channel::>(); - let (lhs_tx, lhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); - let (rhs_tx, rhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); + dfir_rs::util::unbounded_channel::>(); + let (lhs_tx, lhs_rx) = dfir_rs::util::unbounded_channel::<(usize, Max)>(); + let (rhs_tx, rhs_rx) = dfir_rs::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/dfir_rs/tests/surface_lattice_reduce.rs similarity index 69% rename from hydroflow/tests/surface_lattice_reduce.rs rename to dfir_rs/tests/surface_lattice_reduce.rs index 16babce11331..30ec54472b8b 100644 --- a/hydroflow/tests/surface_lattice_reduce.rs +++ b/dfir_rs/tests/surface_lattice_reduce.rs @@ -1,9 +1,9 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::lattices::Max; +use dfir_rs::dfir_syntax; +use dfir_rs::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/dfir_rs/tests/surface_loop.rs similarity index 87% rename from hydroflow/tests/surface_loop.rs rename to dfir_rs/tests/surface_loop.rs index ec026fd9d8a3..74b1758d55f1 100644 --- a/hydroflow/tests/surface_loop.rs +++ b/dfir_rs/tests/surface_loop.rs @@ -1,10 +1,10 @@ -use hydroflow::util::iter_batches_stream; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::util::iter_batches_stream; +use dfir_rs::{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/dfir_rs/tests/surface_multiset_delta.rs similarity index 79% rename from hydroflow/tests/surface_multiset_delta.rs rename to dfir_rs/tests/surface_multiset_delta.rs index feff9c813996..5f20bb43720a 100644 --- a/hydroflow/tests/surface_multiset_delta.rs +++ b/dfir_rs/tests/surface_multiset_delta.rs @@ -1,13 +1,13 @@ -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::util::collect_ready; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::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()); @@ -31,9 +31,9 @@ pub fn test_multiset_delta() { #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::(); + let mut flow = dfir_rs::dfir_syntax! { source_stream(input_recv) -> persist::<'static>() -> multiset_delta() @@ -53,10 +53,10 @@ pub fn test_persist_multiset_delta() { #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::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()); @@ -79,11 +79,11 @@ pub fn test_multiset_delta_2() { #[multiplatform_test] fn test_chat_app_replay() { - let (users_send, users) = hydroflow::util::unbounded_channel::(); - let (messages_send, messages) = hydroflow::util::unbounded_channel::(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(u32, String)>(); + let (users_send, users) = dfir_rs::util::unbounded_channel::(); + let (messages_send, messages) = dfir_rs::util::unbounded_channel::(); + let (out, mut out_recv) = dfir_rs::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; @@ -135,10 +135,10 @@ fn test_chat_app_replay() { #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(u32, String)>(); + let (result_send, mut result_recv) = dfir_rs::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/dfir_rs/tests/surface_parser.rs similarity index 88% rename from hydroflow/tests/surface_parser.rs rename to dfir_rs/tests/surface_parser.rs index ad7a137dfd50..0bc341dd7b5e 100644 --- a/hydroflow/tests/surface_parser.rs +++ b/dfir_rs/tests/surface_parser.rs @@ -1,9 +1,9 @@ -use hydroflow::hydroflow_parser; +use dfir_rs::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/dfir_rs/tests/surface_persist.rs similarity index 77% rename from hydroflow/tests/surface_persist.rs rename to dfir_rs/tests/surface_persist.rs index ca8b2a4eee95..1edb528dc61a 100644 --- a/hydroflow/tests/surface_persist.rs +++ b/dfir_rs/tests/surface_persist.rs @@ -1,16 +1,16 @@ 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 dfir_rs::compiled::pull::HalfMultisetJoinState; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::util::collect_ready; +use dfir_rs::{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 (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter([1]) -> persist::<'static>() -> persist::<'static>() @@ -31,9 +31,9 @@ pub fn test_persist_basic() { #[multiplatform_test] pub fn test_persist_pull() { - let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::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; @@ -57,9 +57,9 @@ pub fn test_persist_pull() { #[multiplatform_test] pub fn test_persist_push() { - let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::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(); @@ -80,8 +80,8 @@ 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(&str, &str)>(); + let mut flow = dfir_rs::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)); @@ -94,11 +94,11 @@ pub fn test_persist_join() { #[multiplatform_test] pub fn test_persist_replay_join() { - let (persist_input_send, persist_input) = hydroflow::util::unbounded_channel::(); - let (other_input_send, other_input) = hydroflow::util::unbounded_channel::(); - let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(u32, u32)>(); + let (persist_input_send, persist_input) = dfir_rs::util::unbounded_channel::(); + let (other_input_send, other_input) = dfir_rs::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::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) @@ -128,10 +128,10 @@ pub fn test_persist_replay_join() { #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (input_2_send, input_2_recv) = dfir_rs::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::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; @@ -157,10 +157,10 @@ pub fn test_persist_double_handoff() { #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (input_2_send, input_2_recv) = dfir_rs::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { teed_first_sg = source_stream(input_2_recv) -> tee(); teed_first_sg [0] -> null(); teed_first_sg [1] -> joined_second_sg; @@ -187,10 +187,10 @@ pub fn test_persist_single_handoff() { #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (input_2_send, input_2_recv) = dfir_rs::util::unbounded_channel::(); + let (output_send, mut output_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); + let mut flow = dfir_rs::dfir_syntax! { source_stream(input_2_recv) -> joined_second_sg; source_stream(input_recv) -> persist::<'static>() @@ -213,10 +213,10 @@ pub fn test_persist_single_subgraph() { #[multiplatform_test] 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 (pull_tx, mut pull_rx) = dfir_rs::util::unbounded_channel::(); + let (push_tx, mut push_rx) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_tee = source_iter([1, 2, 3]) -> persist::<'static>() // pull @@ -238,12 +238,12 @@ pub fn test_persist() { #[multiplatform_test] pub fn test_persist_mut() { - use hydroflow::util::Persistence::*; + use dfir_rs::util::Persistence::*; - let (pull_tx, mut pull_rx) = hydroflow::util::unbounded_channel::(); - let (push_tx, mut push_rx) = hydroflow::util::unbounded_channel::(); + let (pull_tx, mut pull_rx) = dfir_rs::util::unbounded_channel::(); + let (push_tx, mut push_rx) = dfir_rs::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 @@ -266,12 +266,12 @@ pub fn test_persist_mut() { #[multiplatform_test] pub fn test_persist_mut_keyed() { - use hydroflow::util::PersistenceKeyed::*; + use dfir_rs::util::PersistenceKeyed::*; - let (pull_tx, mut pull_rx) = hydroflow::util::unbounded_channel::(); - let (push_tx, mut push_rx) = hydroflow::util::unbounded_channel::(); + let (pull_tx, mut pull_rx) = dfir_rs::util::unbounded_channel::(); + let (push_tx, mut push_rx) = dfir_rs::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/dfir_rs/tests/surface_python.rs similarity index 89% rename from hydroflow/tests/surface_python.rs rename to dfir_rs/tests/surface_python.rs index 30ce37746aa6..d5d435ecb02f 100644 --- a/hydroflow/tests/surface_python.rs +++ b/dfir_rs/tests/surface_python.rs @@ -1,12 +1,12 @@ #![cfg(feature = "python")] -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::{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/dfir_rs/tests/surface_reduce.rs similarity index 79% rename from hydroflow/tests/surface_reduce.rs rename to dfir_rs/tests/surface_reduce.rs index e4bb460092a4..bf36be7abe89 100644 --- a/hydroflow/tests/surface_reduce.rs +++ b/dfir_rs/tests/surface_reduce.rs @@ -1,13 +1,13 @@ -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { source_stream(items_recv) -> reduce::<'tick>(|acc: &mut u32, next: u32| *acc += next) -> for_each(|v| result_send.send(v).unwrap()); @@ -28,7 +28,7 @@ pub fn test_reduce_tick() { ); assert_eq!( &[3], - &*hydroflow::util::collect_ready::, _>(&mut result_recv) + &*dfir_rs::util::collect_ready::, _>(&mut result_recv) ); items_send.send(3).unwrap(); @@ -41,16 +41,16 @@ pub fn test_reduce_tick() { ); assert_eq!( &[7], - &*hydroflow::util::collect_ready::, _>(&mut result_recv) + &*dfir_rs::util::collect_ready::, _>(&mut result_recv) ); } #[multiplatform_test] 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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { source_stream(items_recv) -> reduce::<'static>(|acc: &mut u32, next: u32| *acc += next) -> for_each(|v| result_send.send(v).unwrap()); @@ -71,7 +71,7 @@ pub fn test_reduce_static() { ); assert_eq!( &[3], - &*hydroflow::util::collect_ready::, _>(&mut result_recv) + &*dfir_rs::util::collect_ready::, _>(&mut result_recv) ); items_send.send(3).unwrap(); @@ -84,15 +84,15 @@ pub fn test_reduce_static() { ); assert_eq!( &[10], - &*hydroflow::util::collect_ready::, _>(&mut result_recv) + &*dfir_rs::util::collect_ready::, _>(&mut result_recv) ); } #[multiplatform_test] pub fn test_reduce_sum() { - let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); + let (items_send, items_recv) = dfir_rs::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)); @@ -140,9 +140,9 @@ pub fn test_reduce_sum() { #[multiplatform_test] 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 (pairs_send, pairs_recv) = dfir_rs::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/dfir_rs/tests/surface_scheduling.rs similarity index 80% rename from hydroflow/tests/surface_scheduling.rs rename to dfir_rs/tests/surface_scheduling.rs index ef7a8f72dcf8..566d9dfe75fa 100644 --- a/hydroflow/tests/surface_scheduling.rs +++ b/dfir_rs/tests/surface_scheduling.rs @@ -1,16 +1,16 @@ use std::error::Error; use std::time::Duration; -use hydroflow::scheduled::ticks::{TickDuration, TickInstant}; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax, rassert_eq}; +use dfir_rs::scheduled::ticks::{TickDuration, TickInstant}; +use dfir_rs::{assert_graphvis_snapshots, dfir_syntax, rassert_eq}; use multiplatform_test::multiplatform_test; use tokio::time::timeout; #[multiplatform_test(test, wasm, env_tracing)] pub fn test_stratum_loop() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -32,7 +32,7 @@ pub fn test_stratum_loop() { TickInstant::new(8), TickInstant::new(9) ], - &*hydroflow::util::collect_ready::, _>(&mut out_recv) + &*dfir_rs::util::collect_ready::, _>(&mut out_recv) ); assert_eq!( (TickInstant::new(10), 0), @@ -42,9 +42,9 @@ pub fn test_stratum_loop() { #[multiplatform_test(test, wasm, env_tracing)] pub fn test_tick_loop() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -66,7 +66,7 @@ pub fn test_tick_loop() { TickInstant::new(8), TickInstant::new(9) ], - &*hydroflow::util::collect_ready::, _>(&mut out_recv) + &*dfir_rs::util::collect_ready::, _>(&mut out_recv) ); assert_eq!( (TickInstant::new(10), 0), @@ -74,11 +74,11 @@ pub fn test_tick_loop() { ); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn test_persist_stratum_run_available() -> Result<(), Box> { - let (out_send, out_recv) = hydroflow::util::unbounded_channel(); + let (out_send, out_recv) = dfir_rs::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { a = source_iter([0]) -> persist::<'static>() -> next_stratum() @@ -87,7 +87,7 @@ async fn test_persist_stratum_run_available() -> Result<(), Box> { assert_graphvis_snapshots!(df); df.run_available(); - let seen: Vec<_> = hydroflow::util::collect_ready_async(out_recv).await; + let seen: Vec<_> = dfir_rs::util::collect_ready_async(out_recv).await; rassert_eq!( &[0], &*seen, @@ -98,11 +98,11 @@ async fn test_persist_stratum_run_available() -> Result<(), Box> { Ok(()) } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, env_tracing)] async fn test_persist_stratum_run_async() -> Result<(), Box> { - let (out_send, out_recv) = hydroflow::util::unbounded_channel(); + let (out_send, out_recv) = dfir_rs::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([0]) -> persist::<'static>() -> next_stratum() @@ -114,7 +114,7 @@ async fn test_persist_stratum_run_async() -> Result<(), Box> { .await .expect_err("Expected time out"); - let seen: Vec<_> = hydroflow::util::collect_ready_async(out_recv).await; + let seen: Vec<_> = dfir_rs::util::collect_ready_async(out_recv).await; rassert_eq!( &[0], &*seen, @@ -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; @@ -167,9 +167,9 @@ pub fn test_issue_800_1050_reduce_keyed() { df.run_available(); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, 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>() @@ -183,9 +183,9 @@ async fn test_nospin_issue_961() { .expect("Should not spin."); } -#[multiplatform_test(hydroflow, env_tracing)] +#[multiplatform_test(dfir, 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/dfir_rs/tests/surface_singleton.rs similarity index 82% rename from hydroflow/tests/surface_singleton.rs rename to dfir_rs/tests/surface_singleton.rs index eaa42dad5603..962dba7f0a61 100644 --- a/hydroflow/tests/surface_singleton.rs +++ b/dfir_rs/tests/surface_singleton.rs @@ -1,16 +1,15 @@ -use hydroflow::assert_graphvis_snapshots; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::util::collect_ready; +use dfir_rs::assert_graphvis_snapshots; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::util::collect_ready; use lattices::Max; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_state() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); + let (max_send, mut max_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5) -> map(Max::new); max_of_stream2 = stream2 -> state::<'static, Max<_>>(); @@ -71,7 +70,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 = dfir_rs::dfir_syntax! { stream2 = source_iter(15..=25) -> map(Max::new); max_of_stream2 = stream2 -> state::<'static, Max<_>>(); }; @@ -84,9 +83,9 @@ pub fn test_state_unused() { /// Just tests that the codegen is valid. #[multiplatform_test] 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 (input_send, input_recv) = dfir_rs::util::unbounded_channel::(); + let (max_send, mut max_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); + let mut df = dfir_rs::dfir_syntax! { stream2 = source_stream(input_recv) -> map(Max::new); max_of_stream2 = stream2 -> state::<'tick, Max<_>>(); @@ -117,11 +116,10 @@ pub fn test_state_tick() { #[multiplatform_test] pub fn test_fold_cross() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); + let (max_send, mut max_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5) -> map(Max::new); max_of_stream2 = stream2 -> lattice_reduce() -> tee(); @@ -166,11 +164,10 @@ pub fn test_fold_cross() { #[multiplatform_test] pub fn test_fold_singleton() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); + let (max_send, mut max_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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)); @@ -210,10 +207,9 @@ pub fn test_fold_singleton() { #[multiplatform_test] pub fn test_fold_singleton_push() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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)); @@ -246,11 +242,10 @@ pub fn test_fold_singleton_push() { #[multiplatform_test] pub fn test_reduce_singleton() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); + let (max_send, mut max_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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)); @@ -291,10 +286,9 @@ pub fn test_reduce_singleton() { #[multiplatform_test] pub fn test_reduce_singleton_push() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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)); @@ -327,10 +321,10 @@ pub fn test_reduce_singleton_push() { #[multiplatform_test] 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 (inn_send, inn_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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)); @@ -372,11 +366,10 @@ pub fn test_scheduling() { #[multiplatform_test] pub fn test_multi_tick() { - let (filter_send, mut filter_recv) = - hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); + let (filter_send, mut filter_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); + let (max_send, mut max_recv) = dfir_rs::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = dfir_rs::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/dfir_rs/tests/surface_state_scheduling.rs similarity index 86% rename from hydroflow/tests/surface_state_scheduling.rs rename to dfir_rs/tests/surface_state_scheduling.rs index e89eb2963057..d68a0c76d9d2 100644 --- a/hydroflow/tests/surface_state_scheduling.rs +++ b/dfir_rs/tests/surface_state_scheduling.rs @@ -1,13 +1,13 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::util::collect_ready; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::util::collect_ready; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_repeat_iter() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -37,9 +37,9 @@ pub fn test_repeat_iter() { #[multiplatform_test] pub fn test_fold_tick() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -69,9 +69,9 @@ pub fn test_fold_tick() { #[multiplatform_test] pub fn test_fold_static() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -101,9 +101,9 @@ pub fn test_fold_static() { #[multiplatform_test] pub fn test_reduce_tick() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -133,9 +133,9 @@ pub fn test_reduce_tick() { #[multiplatform_test] pub fn test_reduce_static() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -165,9 +165,9 @@ pub fn test_reduce_static() { #[multiplatform_test] pub fn test_fold_keyed_tick() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(char, usize)>(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -197,9 +197,9 @@ pub fn test_fold_keyed_tick() { #[multiplatform_test] pub fn test_fold_keyed_static() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(char, usize)>(); + let (out_send, mut out_recv) = dfir_rs::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!( @@ -234,10 +234,10 @@ pub fn test_fold_keyed_static() { /// but will resume when external events come in. #[multiplatform_test(test, wasm, env_tracing)] 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 (in_send, in_recv) = dfir_rs::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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/dfir_rs/tests/surface_stratum.rs similarity index 90% rename from hydroflow/tests/surface_stratum.rs rename to dfir_rs/tests/surface_stratum.rs index 91d88d9d4fb7..51870891d3c2 100644 --- a/hydroflow/tests/surface_stratum.rs +++ b/dfir_rs/tests/surface_stratum.rs @@ -1,9 +1,9 @@ use std::cell::RefCell; use std::rc::Rc; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::multiset::HashMultiSet; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::multiset::HashMultiSet; +use dfir_rs::{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: Dfir = dfir_syntax! { a = difference(); source_iter([1, 2, 3, 4]) -> [pos]a; source_iter([1, 3, 5, 7]) -> [neg]a; @@ -39,12 +39,12 @@ pub fn test_difference_a() { /// Take the difference of each tick of items and subtract the previous tick's items. #[multiplatform_test] pub fn test_difference_b() -> Result<(), SendError<&'static str>> { - let (inp_send, inp_recv) = hydroflow::util::unbounded_channel::<&'static str>(); + let (inp_send, inp_recv) = dfir_rs::util::unbounded_channel::<&'static str>(); let output = >>>::default(); let output_inner = Rc::clone(&output); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Dfir = 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: Dfir = 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: Dfir = 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: Dfir = 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; @@ -165,10 +165,10 @@ pub fn test_surface_syntax_graph_unreachability() { // TODO(mingwei): may need persistence if we want this to make easier to eyeball. // An edge in the input data = a pair of `usize` vertex IDs. - let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (pairs_send, pairs_recv) = dfir_rs::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: Dfir = 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: Dfir = 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/dfir_rs/tests/surface_unique.rs similarity index 83% rename from hydroflow/tests/surface_unique.rs rename to dfir_rs/tests/surface_unique.rs index 5aa32c08590f..1e73053fafb4 100644 --- a/hydroflow/tests/surface_unique.rs +++ b/dfir_rs/tests/surface_unique.rs @@ -1,12 +1,12 @@ -use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use dfir_rs::util::collect_ready; +use dfir_rs::{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 (items_send, items_recv) = dfir_rs::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(items_recv) -> unique() -> for_each(|v| print!("{:?}, ", v)); @@ -35,9 +35,9 @@ pub fn test_unique() { #[multiplatform_test] pub fn test_unique_tick_pull() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -58,9 +58,9 @@ pub fn test_unique_tick_pull() { #[multiplatform_test] pub fn test_unique_static_pull() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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; @@ -81,9 +81,9 @@ pub fn test_unique_static_pull() { #[multiplatform_test] pub fn test_unique_tick_push() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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(); @@ -104,9 +104,9 @@ pub fn test_unique_tick_push() { #[multiplatform_test] pub fn test_unique_static_push() { - let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); + let (out_send, mut out_recv) = dfir_rs::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_warnings.rs b/dfir_rs/tests/surface_warnings.rs similarity index 90% rename from hydroflow/tests/surface_warnings.rs rename to dfir_rs/tests/surface_warnings.rs index 0b73113b2717..fb29906e1562 100644 --- a/hydroflow/tests/surface_warnings.rs +++ b/dfir_rs/tests/surface_warnings.rs @@ -1,13 +1,13 @@ use std::cell::RefCell; use std::rc::Rc; -use hydroflow::hydroflow_expect_warnings; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::collect_ready; +use dfir_rs::hydroflow_expect_warnings; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::collect_ready; #[test] fn test_degenerate_union() { - let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::(); let mut df = hydroflow_expect_warnings! { { @@ -33,7 +33,7 @@ fn test_empty_union() { #[test] fn test_degenerate_tee() { - let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); + let (result_send, mut result_recv) = dfir_rs::util::unbounded_channel::(); let mut df = hydroflow_expect_warnings! { { @@ -89,7 +89,7 @@ pub fn test_warped_diamond() { #[test] pub fn test_warped_diamond_2() { - let mut hf: Hydroflow = hydroflow_expect_warnings! { + let mut hf: Dfir = hydroflow_expect_warnings! { { // active nodes nodes = union(); diff --git a/hydroflow/tests/surface_zip_unzip.rs b/dfir_rs/tests/surface_zip_unzip.rs similarity index 76% rename from hydroflow/tests/surface_zip_unzip.rs rename to dfir_rs/tests/surface_zip_unzip.rs index b79146fae105..3043ee481887 100644 --- a/hydroflow/tests/surface_zip_unzip.rs +++ b/dfir_rs/tests/surface_zip_unzip.rs @@ -1,13 +1,13 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::collect_ready; +use dfir_rs::dfir_syntax; +use dfir_rs::util::collect_ready; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_zip_basic() { let (result_send, mut result_recv) = - hydroflow::util::unbounded_channel::<(usize, &'static str)>(); + dfir_rs::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()); @@ -20,9 +20,9 @@ pub fn test_zip_basic() { #[multiplatform_test] pub fn test_zip_loop() { - let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(char, usize)>(); + let (result_send, mut result_recv) = dfir_rs::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; @@ -55,12 +55,12 @@ pub fn test_zip_loop() { #[multiplatform_test] pub fn test_zip_longest_basic() { - use hydroflow::itertools::EitherOrBoth::{self, *}; + use dfir_rs::itertools::EitherOrBoth::{self, *}; let (result_send, mut result_recv) = - hydroflow::util::unbounded_channel::>(); + dfir_rs::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()); @@ -82,9 +82,9 @@ pub fn test_zip_longest_basic() { #[multiplatform_test] 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 (send0, mut recv0) = dfir_rs::util::unbounded_channel::<&'static str>(); + let (send1, mut recv1) = dfir_rs::util::unbounded_channel::<&'static str>(); + 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/wasm.md b/dfir_rs/wasm.md similarity index 100% rename from hydroflow/wasm.md rename to dfir_rs/wasm.md diff --git a/docs/README.md b/docs/README.md index 10157567009b..87410443a84c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,7 +14,7 @@ $ npm run start ``` ## Building the Playground -By default, the Hydroflow / Datalog playgrounds are not loaded when launching the website. To build the playground, you'll need to follow a couple additional steps. This requires Rust and [wasm-pack](https://rustwasm.github.io/wasm-pack/): +By default, the DFIR / Datalog playgrounds are not loaded when launching the website. To build the playground, you'll need to follow a couple additional steps. This requires Rust and [wasm-pack](https://rustwasm.github.io/wasm-pack/): ```bash $ rustup target add wasm32-unknown-unknown diff --git a/docs/docs/deploy/your-first-deploy.md b/docs/docs/deploy/your-first-deploy.md index 1c727172341d..8372d262e17a 100644 --- a/docs/docs/deploy/your-first-deploy.md +++ b/docs/docs/deploy/your-first-deploy.md @@ -37,9 +37,9 @@ hydroflow_deploy_integration = "0.1.1" Let's open up `src/main.rs` in the generated project and write a new `main` function that initializes Hydro Deploy: ```rust -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init().await; + let ports = dfir_rs::util::deploy::init().await; } ``` @@ -78,11 +78,11 @@ 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 dfir_rs::dfir_syntax; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init().await; + let ports = dfir_rs::util::deploy::init().await; let input_recv = ports .port("input") @@ -97,7 +97,7 @@ async fn main() { .await .into_sink(); - hydroflow::util::deploy::launch_flow(hydroflow_syntax! { + dfir_rs::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/architecture/_category_.json b/docs/docs/dfir/architecture/_category_.json similarity index 66% rename from docs/docs/hydroflow/architecture/_category_.json rename to docs/docs/dfir/architecture/_category_.json index de43738975be..46438dff155b 100644 --- a/docs/docs/hydroflow/architecture/_category_.json +++ b/docs/docs/dfir/architecture/_category_.json @@ -3,6 +3,6 @@ "position": 6, "link": { "type": "doc", - "id": "hydroflow/architecture/index" + "id": "dfir/architecture/index" } } diff --git a/docs/docs/hydroflow/architecture/handoffs.md b/docs/docs/dfir/architecture/handoffs.md similarity index 100% rename from docs/docs/hydroflow/architecture/handoffs.md rename to docs/docs/dfir/architecture/handoffs.md diff --git a/docs/docs/hydroflow/architecture/in-out_trees.md b/docs/docs/dfir/architecture/in-out_trees.md similarity index 74% rename from docs/docs/hydroflow/architecture/in-out_trees.md rename to docs/docs/dfir/architecture/in-out_trees.md index d849fb7e1f8a..8800676ae483 100644 --- a/docs/docs/hydroflow/architecture/in-out_trees.md +++ b/docs/docs/dfir/architecture/in-out_trees.md @@ -50,10 +50,10 @@ a yellow pivot. And if red push -> green pull that becomes a blue handoff node, and this is a division between subgraphs. Note that a subgraph can have a handoff with itself; this forms a loop. -|| -| :---: | -| ![The graph above converted and partitioned into two in-out trees.](../img/in-out_partition.png) | -| The graph above converted and partitioned into two in-out trees. One is outlined in yellow and the other in red. For the corresponding Hydroflow graph, green nodes are _pull_, red nodes are _push_, yellow are _pivots_, and blue are _handoffs_. | +| | +|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| ![The graph above converted and partitioned into two in-out trees.](../img/in-out_partition.png) | +| The graph above converted and partitioned into two in-out trees. One is outlined in yellow and the other in red. For the corresponding DFIR graph, green nodes are _pull_, red nodes are _push_, yellow are _pivots_, and blue are _handoffs_. | In the example partitioning above, some nodes have been split into multiple and labelled with suffixes to make the pivots and handoffs more explicit. diff --git a/docs/docs/hydroflow/architecture/index.mdx b/docs/docs/dfir/architecture/index.mdx similarity index 79% rename from docs/docs/hydroflow/architecture/index.mdx rename to docs/docs/dfir/architecture/index.mdx index cbd4461d79fb..b8b5273f7b2f 100644 --- a/docs/docs/hydroflow/architecture/index.mdx +++ b/docs/docs/dfir/architecture/index.mdx @@ -1,12 +1,12 @@ -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_5_reachability.snap'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_5_reachability.snap'; import { extractMermaid } from '../../../src/util'; # Architecture -Hydroflow graphs are divided into two layers: the outer _scheduled layer_ and +DFIR graphs are divided into two layers: the outer _scheduled layer_ and inner _compiled layer_. -In the mermaid diagrams generated for Hydroflow, the scheduler is responsible for the outermost gray boxes +In the mermaid diagrams generated for DFIR, the scheduler is responsible for the outermost gray boxes (the *subgraphs*) and handoffs, while the insides of the gray boxes are compiled via the compiled layer. As a reminder, here is the graph from the @@ -14,7 +14,7 @@ here is the graph from the -The [Hydroflow Architecture Design Doc](https://hydro-project.github.io/hydroflow/design_docs/2021-10_architecture_design_doc.html) +The [DFIR Architecture Design Doc](https://hydro-project.github.io/hydroflow/design_docs/2021-10_architecture_design_doc.html) contains a more detailed explanation of this section. Note that some aspects of the design doc are not implemented (e.g. early yielding) or may become out of date as time passes. @@ -76,7 +76,7 @@ convert a graph into in-out trees. ## Surface Syntax and APIs -Hydroflow's _Surface Syntax_ hides +DFIR _Surface Syntax_ hides the distinction between these two layers. It offers a natural `Iterator`-like chaining syntax for building graphs that get parsed and compiled into a scheduled graph of one or more compiled subgraphs. Please see the [Surface Syntax](../syntax/) docs for more information. @@ -84,9 +84,9 @@ Alternatively, the _Core API_ allows you to interact with handoffs directly at a level. It doesn't provide any notion of chainable operators. You can use Rust `Iterator`s or any other arbitrary Rust code to implement the operators. -The Core API lives in [`hydroflow::scheduled`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/index.html), -mainly in methods on the [`Hydroflow` struct](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Hydroflow.html). Compiled push-based iterators live in [`hydroflow::compiled`](https://hydro-project.github.io/hydroflow/doc/hydroflow/compiled/index.html). We intend users to use the Surface Syntax as it is much more friendly, but as -Hydroflow is in active development some operators might not be available in +The Core API lives in [`dfir_rs::scheduled`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/index.html), +mainly in methods on the [`DFIR` struct](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Dfir.html). Compiled push-based iterators live in [`dfir_rs::compiled`](https://hydro-project.github.io/hydroflow/doc/hydroflow/compiled/index.html). We intend users to use the Surface Syntax as it is much more friendly, but as +DFIR is in active development some operators might not be available in the Surface Syntax, in which case the Core API can be used instead. If you find -yourself in this sitation be sure to [submit an issue](https://github.com/hydro-project/hydroflow/issues/new)! +yourself in this situation be sure to [submit an issue](https://github.com/hydro-project/hydroflow/issues/new)! diff --git a/docs/docs/hydroflow/architecture/networking.md b/docs/docs/dfir/architecture/networking.md similarity index 100% rename from docs/docs/hydroflow/architecture/networking.md rename to docs/docs/dfir/architecture/networking.md diff --git a/docs/docs/hydroflow/architecture/scheduling.md b/docs/docs/dfir/architecture/scheduling.md similarity index 100% rename from docs/docs/hydroflow/architecture/scheduling.md rename to docs/docs/dfir/architecture/scheduling.md diff --git a/docs/docs/hydroflow/concepts/_category_.json b/docs/docs/dfir/concepts/_category_.json similarity index 68% rename from docs/docs/hydroflow/concepts/_category_.json rename to docs/docs/dfir/concepts/_category_.json index 8678630d0e89..bd583e45a632 100644 --- a/docs/docs/hydroflow/concepts/_category_.json +++ b/docs/docs/dfir/concepts/_category_.json @@ -3,6 +3,6 @@ "position": 5, "link": { "type": "doc", - "id": "hydroflow/concepts/index" + "id": "dfir/concepts/index" } } diff --git a/docs/docs/hydroflow/concepts/cyclic_flows.md b/docs/docs/dfir/concepts/cyclic_flows.md similarity index 60% rename from docs/docs/hydroflow/concepts/cyclic_flows.md rename to docs/docs/dfir/concepts/cyclic_flows.md index e8ac836d52a4..1a60196e1f6c 100644 --- a/docs/docs/hydroflow/concepts/cyclic_flows.md +++ b/docs/docs/dfir/concepts/cyclic_flows.md @@ -3,14 +3,14 @@ sidebar_position: 2 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_5_reachability.rs'; -import exampleCode2 from '!!raw-loader!../../../../hydroflow/examples/example_naturals.rs'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_5_reachability.rs'; +import exampleCode2 from '!!raw-loader!../../../../dfir_rs/examples/example_naturals.rs'; import { getLines, extractOutput, extractMermaid } from '../../../src/util'; # Dataflow Cycles and Fixpoints -Many dataflow libraries only support acyclic flow graphs (DAGs); Hydroflow goes further and supports cycles. Hydroflow's semantics for cyclic flows are based on the formal foundations of recursive queries in the [Datalog](https://en.wikipedia.org/wiki/Datalog) language, which also influenced the design of recursive query features in SQL. +Many dataflow libraries only support acyclic flow graphs (DAGs); DFIR goes further and supports cycles. DFIR's semantics for cyclic flows are based on the formal foundations of recursive queries in the [Datalog](https://en.wikipedia.org/wiki/Datalog) language, which also influenced the design of recursive query features in SQL. -The basic pattern for cycles in Hydroflow looks something like this: +The basic pattern for cycles in DFIR looks something like this: ``` base = source_() -> ... -> [base]cycle; cycle = union() @@ -34,16 +34,16 @@ The cycle in that program matches our rough pattern as follows: How should we think about a cycle like this? Intuitively, we can think of the cycle beginning to compute on the data from `base` that comes in via `[0]cycle`. In the Graph Reachability example, this base data corresponds to the origin vertex, `0`. By joining [0] with the `stream_of_edges`, we generate neighbors (1 hop away) and pass them back into the cycle. When one of these is joined again with `stream_of_edges` we get a neighbor of a neighbor (2 hops away). When one of *these* is joined with `stream_of_edges` we get a vertex 3 hops away, and so on. -If you prefer to think about this program as logic, it represents [Mathematical Induction](https://en.wikipedia.org/wiki/Mathematical_induction) via dataflow: the data from `base` going into `[0]cycle` (i.e. the origin vertex, 0 hops away) is like a "base case", and the data going into `[1]cycle` represents the "induction step" (a vertex *k+1* hops away). (A graph with multiple cycles represents multiple induction, which is a relatively uncommon design pattern in both mathematics and Hydroflow!) +If you prefer to think about this program as logic, it represents [Mathematical Induction](https://en.wikipedia.org/wiki/Mathematical_induction) via dataflow: the data from `base` going into `[0]cycle` (i.e. the origin vertex, 0 hops away) is like a "base case", and the data going into `[1]cycle` represents the "induction step" (a vertex *k+1* hops away). (A graph with multiple cycles represents multiple induction, which is a relatively uncommon design pattern in both mathematics and DFIR!) -When does this process end? As with most Hydroflow questions, the answer is not in terms of control flow, but rather in terms of dataflow: *the cycle terminates when it produces no new data*, a notion called a [fixpoint](https://en.wikipedia.org/wiki/Fixed_point_(mathematics)). Our graph reachability example, it terminates when there are no new vertices to visit. Note that the `[join()](../syntax/surface_ops_gen#join)` operator is defined over the *sets* of inputs on each side, and sets +When does this process end? As with most DFIR questions, the answer is not in terms of control flow, but rather in terms of dataflow: *the cycle terminates when it produces no new data*, a notion called a [fixpoint](https://en.wikipedia.org/wiki/Fixed_point_(mathematics)). Our graph reachability example, it terminates when there are no new vertices to visit. Note that the `[join()](../syntax/surface_ops_gen#join)` operator is defined over the *sets* of inputs on each side, and sets by definition do not contain duplicate values. This prevents the Reachability dataflow from regenerating the same value multiple times. -Like many looping constructs, it is possible to write a cyclic Hydroflow program that never ``terminates``, in the sense that it produces an unbounded stream of data. If we use `[join_multiset()](../syntax/surface_ops_gen#join_multiset)` instead of `[join()](../syntax/surface_ops_gen#join)` in our Reachability dataflow, the call to `flow.run_available()` never terminates, because each time the same vertex is visited, new data is generated! +Like many looping constructs, it is possible to write a cyclic DFIR program that never ``terminates``, in the sense that it produces an unbounded stream of data. If we use `[join_multiset()](../syntax/surface_ops_gen#join_multiset)` instead of `[join()](../syntax/surface_ops_gen#join)` in our Reachability dataflow, the call to `flow.run_available()` never terminates, because each time the same vertex is visited, new data is generated! A simpler example of a non-terminating cycle is the following, which specifies the natural numbers: {exampleCode2} -Like any sufficiently powerful language, Hydroflow cannot guarantee that your programs terminate. If you're debugging a non-terminating Hydroflow program, it's a good idea to identify the dataflow cycles and insert an +Like any sufficiently powerful language, DFIR cannot guarantee that your programs terminate. If you're debugging a non-terminating DFIR program, it's a good idea to identify the dataflow cycles and insert an `[inspect()](../syntax/surface_ops_gen#inspect)` operator along an edge of the cycle to see if it's generating unbounded amounts of duplicated data. You can use the `[unique()](../syntax/surface_ops_gen#unique)` operator to ameliorate the problem. \ No newline at end of file diff --git a/docs/docs/hydroflow/concepts/debugging.md b/docs/docs/dfir/concepts/debugging.md similarity index 100% rename from docs/docs/hydroflow/concepts/debugging.md rename to docs/docs/dfir/concepts/debugging.md diff --git a/docs/docs/hydroflow/concepts/distributed_time.md b/docs/docs/dfir/concepts/distributed_time.md similarity index 61% rename from docs/docs/hydroflow/concepts/distributed_time.md rename to docs/docs/dfir/concepts/distributed_time.md index 82f5e79c4075..e7d10efacfdc 100644 --- a/docs/docs/hydroflow/concepts/distributed_time.md +++ b/docs/docs/dfir/concepts/distributed_time.md @@ -3,9 +3,9 @@ sidebar_position: 4 --- # Distributed Time -Hydroflow does not embed a particular notion of distributed time, but instead provides primitives for +DFIR does not embed a particular notion of distributed time, but instead provides primitives for you to implement one of many possible distributed time models. If you're a distributed systems aficionado, you might -be interested to read this chapter to learn about how Hydroflow's time model compares to classical distributed time models. +be interested to read this chapter to learn about how DFIR's time model compares to classical distributed time models. ## Lamport Time Lamport's paper on [Time, Clocks, and the Ordering of Events in a Distributed System](https://lamport.azurewebsites.net/pubs/time-clocks.pdf) provides a classical definition of time in a distributed system. In that paper, each single-threaded *process* has a sequential clock (a so-called [Lamport Clock](https://en.wikipedia.org/wiki/Lamport_timestamp)). The clock in a process advances by one unit of time for each *event* that the process observes. Between events, the clock is frozen and the process does local computation. @@ -18,17 +18,17 @@ In addition, to maintain Lamport Clocks, each process stamps its outbound messag The way that Lamport clocks jump ahead provides a desirable property: the timestamps provide a reasonable notion of what events *happen-before* other events in a distributed system. Lamport timestamps track not only the order of events on a single node, they also ensure that the timestamps on events reflect distributed ordering. Suppose that node `source` wants to send a message to node `dest`, and node source has current clock value *T_source*. The events that precede that message on node `source` have smaller timestamps. In addition, consider an event at node `dest` that follows the receipt of that message. That event must have a timestamp greater than *T_source* by Lamport's advancing rule above. Hence all the events on node `source` that preceded the sending of the message have lower timestamps than the events on node `dest` following the receipt of the message. This is Lamport's distributed "happens-before" relation, and the Lamport clock capture that relation. -## Hydroflow Time -As a built-in primitive, Hydroflow defines time only for a single transducer, as a sequence of consecutive ticks without any gaps. +## DFIR Time +As a built-in primitive, DFIR defines time only for a single transducer, as a sequence of consecutive ticks without any gaps. -Thus the main difference between Hydroflow events and Lamport events are: +Thus the main difference between DFIR events and Lamport events are: -1. **Batched Events**: Hydroflow treats the ingestion of a batch of multiple inbound events as a single tick. *TODO: is it possible to limit batch size to 1?* -2. **Fixpoints between Events**: Hydroflow *requires* a fixpoint computation to complete between ticks. -3. **Consecutive Ticks**: the built-in clock primitive in Hydroflow always advances sequentially and cannot skip a tick like the Lamport clock does. +1. **Batched Events**: DFIR treats the ingestion of a batch of multiple inbound events as a single tick. *TODO: is it possible to limit batch size to 1?* +2. **Fixpoints between Events**: DFIR *requires* a fixpoint computation to complete between ticks. +3. **Consecutive Ticks**: the built-in clock primitive in DFIR always advances sequentially and cannot skip a tick like the Lamport clock does. -## Implementing Distributed Time in Hydroflow +## Implementing Distributed Time in DFIR -Although Lamport clocks are not built into Hydroflow, it is straightforward to implement them in Hydroflow. Alternatively, one can implement more sophisticated distributed clocks like [vector clocks](https://en.wikipedia.org/wiki/Vector_clock) in Hydroflow instead. By leaving this decision to the user, Hydroflow can be used in a variety of distributed time models. +Although Lamport clocks are not built into DFIR, it is straightforward to implement them in DFIR. Alternatively, one can implement more sophisticated distributed clocks like [vector clocks](https://en.wikipedia.org/wiki/Vector_clock) in DFIR instead. By leaving this decision to the user, DFIR can be used in a variety of distributed time models. *TODO: add example of implementing Lamport clocks?*. \ No newline at end of file diff --git a/docs/docs/hydroflow/concepts/error_handling.md b/docs/docs/dfir/concepts/error_handling.md similarity index 100% rename from docs/docs/hydroflow/concepts/error_handling.md rename to docs/docs/dfir/concepts/error_handling.md diff --git a/docs/docs/hydroflow/concepts/index.md b/docs/docs/dfir/concepts/index.md similarity index 60% rename from docs/docs/hydroflow/concepts/index.md rename to docs/docs/dfir/concepts/index.md index 854e8d528b6c..89b34ed787cb 100644 --- a/docs/docs/hydroflow/concepts/index.md +++ b/docs/docs/dfir/concepts/index.md @@ -1,48 +1,48 @@ # Concepts -Hydroflow is different from other distributed systems infrastructure, so you probably have questions, like: -What is Hydroflow? How does it work? What is special about it, and what are the key concepts to understand? +DFIR is different from other distributed systems infrastructure, so you probably have questions, like: +What is DFIR? How does it work? What is special about it, and what are the key concepts to understand? -This chapter covers those basic questions. We start simple describing Hydroflow, and build up to an understanding of -what makes Hydroflow uniquely powerful. +This chapter covers those basic questions. We start simple describing DFIR, and build up to an understanding of +what makes DFIR uniquely powerful. -But in case you want a preview of the Hydroflow goodies, here are the main themes: -1. **Distributed Correctness**: Hydroflow's type system can prevent distributed system bugs at compile time. (One example: will your code +But in case you want a preview of the DFIR goodies, here are the main themes: +1. **Distributed Correctness**: DFIR's type system can prevent distributed system bugs at compile time. (One example: will your code produce the same results if you deploy on a single machine or replicate on a distributed cluster of machines?) -2. **Local Efficiency**: Hydroflow compiles your dataflow programs into efficient, low-latency, single-threaded executables. +2. **Local Efficiency**: DFIR compiles your dataflow programs into efficient, low-latency, single-threaded executables. -Taken together, Hydroflow provides a high-efficiency substrate on which to build powerful languages for distributed computing. +Taken together, DFIR provides a high-efficiency substrate on which to build powerful languages for distributed computing. -> Hydroflow's type system checks are not yet implemented, but they are coming soon! +> DFIR's type system checks are not yet implemented, but they are coming soon! -## Hydroflow: A Runtime Library and a DSL in Rust -Setting fanfare aside, what *is* Hydroflow? +## DFIR: A Runtime Library and a DSL in Rust +Setting fanfare aside, what *is* DFIR? -Hydroflow is a library that can be used in any Rust program. It includes two main components: +DFIR is a library that can be used in any Rust program. It includes two main components: 1. A runtime library that executes low-latency, reactive dataflow programs written in Rust. (The *core API*.) -2. A domain-specific language (DSL) for specifying dataflow programs. (The Hydroflow *surface syntax*.) +2. A domain-specific language (DSL) for specifying dataflow programs. (The DFIR *surface syntax*.) -Hydroflow's surface syntax must be embedded in a Rust program; the Rust compiler takes that Hydroflow syntax and +DFIR's surface syntax must be embedded in a Rust program; the Rust compiler takes that DFIR syntax and compiles it into an efficient binary executable. -> We call a running Hydroflow binary a *transducer*. +> We call a running DFIR binary a *transducer*. In typical usage, a developer writes a transducer as a single-threaded Rust program that is mostly composed of -Hydroflow surface syntax. Each transducer is typically responsible for a single +DFIR surface syntax. Each transducer is typically responsible for a single "node" (a machine, or a core) in a distributed system composed of many such transducers, which send and receive flows of data to each other. -> Hydroflow itself does not generate distributed code. It is a library for specifying the transducers (individual nodes) that +> DFIR itself does not generate distributed code. It is a library for specifying the transducers (individual nodes) that > participate in a distributed system. > -> In the [Hydro Project](https://hydro.run), higher-level languages are being built on top of Hydroflow to generate +> In the [Hydro Project](https://hydro.run), higher-level languages are being built on top of DFIR to generate > distributed code in the form of multiple transducers. -> Meanwhile, you can use Hydroflow to write your own distributed code, by writing individual transducers that work together, +> Meanwhile, you can use DFIR to write your own distributed code, by writing individual transducers that work together, > and deploying them manually or with a tool like [Hydroplane](https://github.com/hydro-project/hydroplane). See the [Hydro Ecosystem](../ecosystem) for more on this. -### So how might a human write distributed systems with Hydroflow? -As an illustration of how you can work at the Hydroflow layer, consider the -[Chat Server example](https://github.com/hydro-project/hydroflow/tree/main/hydroflow/examples/chat). If you run that binary +### So how might a human write distributed systems with DFIR? +As an illustration of how you can work at the DFIR layer, consider the +[Chat Server example](https://github.com/hydro-project/hydroflow/tree/main/dfir_rs/examples/chat). If you run that binary with the command-line argument `--role server` it will start a single transducer that is responsible for a chat server: receiving membership requests and messages from clients, and forwarding messages from individual clients to all other clients. If you run that binary with the argument `--role client` it will start a transducer that is responsible for a chat client, which diff --git a/docs/docs/hydroflow/concepts/life_and_times.md b/docs/docs/dfir/concepts/life_and_times.md similarity index 60% rename from docs/docs/hydroflow/concepts/life_and_times.md rename to docs/docs/dfir/concepts/life_and_times.md index 565a7b61defb..41adf78b2a48 100644 --- a/docs/docs/hydroflow/concepts/life_and_times.md +++ b/docs/docs/dfir/concepts/life_and_times.md @@ -2,19 +2,19 @@ sidebar_position: 1 --- -# The Life and Times of a Hydroflow Transducer -Time is a fundamental concept in many distributed systems. Hydroflow's model of time is very simple, but +# The Life and Times of a DFIR Transducer +Time is a fundamental concept in many distributed systems. DFIR's model of time is very simple, but also powerful enough to serve as a building block for more complex models of time. -Like most reactive services, we can envision a Hydroflow transducer running as an unbounded loop that is managed +Like most reactive services, we can envision a DFIR transducer running as an unbounded loop that is managed by the runtime library. Each iteration of the transducer's loop is called a *tick*. Associated with the transducer is a *clock* value (accessible via the `.current_tick()` method), which tells you how many ticks were executed by this transducer prior to the current tick. Each transducer produces totally ordered, sequentially increasing clock values, which you can think of as the "local logical time" at the transducer. The transducer's main loop works as follows: -1. Given events and messages buffered from the operating system, ingest a batch of data items and deliver them to the appropriate `source_xxx` operators in the Hydroflow spec. -2. Run the Hydroflow spec. If the spec has cycles, continue executing it until it reaches a "fixpoint" on the current batch; i.e. it no longer produces any new data anywhere in the flow. Along the way, any data that appears in an outbound channel is streamed to the appropriate destination. +1. Given events and messages buffered from the operating system, ingest a batch of data items and deliver them to the appropriate `source_xxx` operators in the DFIR spec. +2. Run the DFIR spec. If the spec has cycles, continue executing it until it reaches a "fixpoint" on the current batch; i.e. it no longer produces any new data anywhere in the flow. Along the way, any data that appears in an outbound channel is streamed to the appropriate destination. 3. Once the spec reaches fixpoint and messages have all been sent, advance the local clock and then start the next tick. The transducer's main loop is shown in the following diagram: @@ -26,7 +26,7 @@ flowchart LR network>"messages\n& events"\nfa:fa-telegram]-->buffer[[buffer]] end subgraph transducer[Transducer Loop] - buffer-->ingest>ingest a batch\nof data]-->loop(((run Hydroflow\nspec to fixpoint\nfa:fa-cog)))-->stream[stream out\nmsgs & events\nfa:fa-telegram]-->clock((advance\nclock\nfa:fa-clock-o))-- new tick! -->ingest + buffer-->ingest>ingest a batch\nof data]-->loop(((run DFIR\nspec to fixpoint\nfa:fa-cog)))-->stream[stream out\nmsgs & events\nfa:fa-telegram]-->clock((advance\nclock\nfa:fa-clock-o))-- new tick! -->ingest end style stream fill:#0fa,stroke:#aaa,stroke-width:2px,stroke-dasharray: 5 5 style loop fill:#0fa @@ -35,4 +35,4 @@ flowchart LR linkStyle 5 stroke:red,stroke-width:4px,color:red; ``` -In sum, an individual transducer advances sequentially through logical time; in each tick of its clock it ingests a batch of data from its inbound channels, executes the Hydroflow spec, and sends any outbound data to its outbound channels. \ No newline at end of file +In sum, an individual transducer advances sequentially through logical time; in each tick of its clock it ingests a batch of data from its inbound channels, executes the DFIR spec, and sends any outbound data to its outbound channels. \ No newline at end of file diff --git a/docs/docs/hydroflow/concepts/stratification.md b/docs/docs/dfir/concepts/stratification.md similarity index 73% rename from docs/docs/hydroflow/concepts/stratification.md rename to docs/docs/dfir/concepts/stratification.md index b06018b3bbb3..50900d709cc8 100644 --- a/docs/docs/hydroflow/concepts/stratification.md +++ b/docs/docs/dfir/concepts/stratification.md @@ -3,7 +3,7 @@ sidebar_position: 3 --- # Streaming, Blocking and Stratification -Many Hydroflow operators (e.g. `map`, `filter` and `join`) work in a streaming fashion. Streaming operators process data as it arrives, generating outputs in the midst of processing inputs. If you restrict yourself to operators that work in this streaming fashion, then your transducer may start sending data across the network mid-tick, even while it is still consuming the data in the input batch. +Many DFIR operators (e.g. `map`, `filter` and `join`) work in a streaming fashion. Streaming operators process data as it arrives, generating outputs in the midst of processing inputs. If you restrict yourself to operators that work in this streaming fashion, then your transducer may start sending data across the network mid-tick, even while it is still consuming the data in the input batch. But some operators are blocking, and must wait for all their input data to arrive before they can produce any output data. For example, a `sort` operator must wait for all its input data to arrive before it can produce a single output value. After all, the lowest value may be the last to arrive! @@ -38,7 +38,7 @@ end 4v1===o2v1 ``` -At compile time, the Hydroflow spec is *stratified*: partitioned into subflows, where each subflow is assigned a stratum number. Subsequently at runtime, each tick executes the strata one-by-one in ascending order of stratum number. In the example above, the `source_stream` operator is in stratum 0, and the `sort` and `for_each` operators are in stratum 1. The runtime executes the `source_stream` operator first, buffering output in the Handoff. The `sort` operator will not receive any data until the `source_stream` operator has finished executing. When stratum 0 is complete, the subflow in stratum 1 is scheduled and executes the `sort` and `for_each` operators to complete the tick. +At compile time, the DFIR spec is *stratified*: partitioned into subflows, where each subflow is assigned a stratum number. Subsequently at runtime, each tick executes the strata one-by-one in ascending order of stratum number. In the example above, the `source_stream` operator is in stratum 0, and the `sort` and `for_each` operators are in stratum 1. The runtime executes the `source_stream` operator first, buffering output in the Handoff. The `sort` operator will not receive any data until the `source_stream` operator has finished executing. When stratum 0 is complete, the subflow in stratum 1 is scheduled and executes the `sort` and `for_each` operators to complete the tick. Let's look back at the [`difference`](../syntax/surface_ops_gen.md#difference) operator as used in the [Graph Unreachability example](../quickstart/example_6_unreachability). ```mermaid @@ -59,7 +59,7 @@ end The `difference` operators is one with inputs of two different types. It is supposed to output all the items from its `pos` input that do not appear in its `neg` input. To achieve that, the `neg` input must be blocking, but the `pos` input can stream. Blocking on the `neg` input ensures that if the operator streams an output from the `pos` input, it will never need to retract that output. -Given these examples, we can refine our diagram of the Hydroflow transducer loop to account for stratified execution within each tick: +Given these examples, we can refine our diagram of the DFIR transducer loop to account for stratified execution within each tick: ```mermaid %%{init: {'theme':'neutral'}}%% flowchart LR @@ -79,16 +79,16 @@ flowchart LR ## Technical Details -The concept of stratification is taken directly from stratified negation in the [Datalog](https://en.wikipedia.org/wiki/Datalog) language. Hydroflow identifies a stratum boundary at any blocking input to an operator, where classical Datalog only stratifies its negation operator. +The concept of stratification is taken directly from stratified negation in the [Datalog](https://en.wikipedia.org/wiki/Datalog) language. DFIR identifies a stratum boundary at any blocking input to an operator, where classical Datalog only stratifies its negation operator. -The Hydroflow compiler performs stratification via static analysis of the Hydroflow spec. The analysis is based on the following rules: +The DFIR compiler performs stratification via static analysis of the DFIR spec. The analysis is based on the following rules: - A Handoff is interposed in front of any blocking input to an operator (as documented in the [operator definitions](../syntax/surface_ops_gen.md)). - The flow is partitioned at the Handoffs into subflows called "strata". - The resulting graph of strata and Handoffs is tested to ensure that it's acyclic. (Cycles through blocking operators are forbidden as they not have well-defined behavior—note that the blocking operators in a cycle would deadlock waiting for each other.) -Given the acyclicity test, any legal Hydroflow program consists of a directed acyclic graph (DAG) of strata and handoffs. The strata are numbered in ascending order by assigning stratum number 0 to the "leaves" of the DAG (strata with no upstream operators), and then ensuring that each stratum is assigned a number that is one larger than any of its upstream strata. +Given the acyclicity test, any legal DFIR program consists of a directed acyclic graph (DAG) of strata and handoffs. The strata are numbered in ascending order by assigning stratum number 0 to the "leaves" of the DAG (strata with no upstream operators), and then ensuring that each stratum is assigned a number that is one larger than any of its upstream strata. -As a Hydroflow operator executes, it is running on a particular transducer, in a particular tick, in a particular stratum. +As a DFIR operator executes, it is running on a particular transducer, in a particular tick, in a particular stratum. ### Determining whether an operator should block: Monotonicity @@ -100,8 +100,8 @@ Mathematically, we can think of a dataflow operator as a function *f(in) → out By contrast, consider the output of a blocking operator like `difference`. The output of `difference` is a function of both its inputs, but it is *non-monotone* with respect to its `neg` input. That is, it is *not* the case that *(A — B) ⊆ (A — C)* whenever *B ⊆ C*. -Hydroflow is designed to use the monotonicity property to determine whether an operator should block. If an operator is monotone with respect to an input, that input is streaming. If an operator is non-monotone, it is blocking. +DFIR is designed to use the monotonicity property to determine whether an operator should block. If an operator is monotone with respect to an input, that input is streaming. If an operator is non-monotone, it is blocking. Monotonicity turns out to be particularly important for distributed systems. In particular, if all your transducers are fully monotone across ticks, then they can run in parallel without any coordination—they will always stream correct prefixes of the final outputs, and eventually will deliver the complete output. This is the positive direction of the [CALM Theorem](https://cacm.acm.org/magazines/2020/9/246941-keeping-calm/fulltext). -> In future versions of Hydroflow, the type system will represent monotonicity explicitly and reason about it automatically. +> In future versions of DFIR, the type system will represent monotonicity explicitly and reason about it automatically. diff --git a/docs/docs/hydroflow/ecosystem.md b/docs/docs/dfir/ecosystem.md similarity index 62% rename from docs/docs/hydroflow/ecosystem.md rename to docs/docs/dfir/ecosystem.md index afbc7d68ecf8..09f41f071d0f 100644 --- a/docs/docs/hydroflow/ecosystem.md +++ b/docs/docs/dfir/ecosystem.md @@ -12,13 +12,13 @@ Working down from the top: - [*Hydro*](../hydro) is an end-user-facing high-level [choreographic](https://en.wikipedia.org/wiki/Choreographic_programming) [dataflow](https://en.wikipedia.org/wiki/Dataflow_programming) language. Hydro is a *global* language for programming a fleet of transducers. Programmers author dataflow pipelines that start with streams of events and data, and span boundaries across multiple `process` and (scalable) `cluster` specifications. -- *Hydrolysis* is a compiler that translates a global Hydro spec to multiple single-threaded Hydroflow IR programs, which collectively implement the global spec. +- *Hydrolysis* is a compiler that translates a global Hydro spec to multiple single-threaded DFIR programs, which collectively implement the global spec. This compilation phase is currently a part of the Hydro codebase, but will evolve into a standalone optimizing compiler inspired by database query optimizers and [e-graphs](https://en.wikipedia.org/wiki/E-graph). -- [Hydroflow IR and its compiler/runtime](https://github.com/hydro-project/hydroflow/tree/main/hydroflow) are the subject of this book. -Where Hydro is a *global* language for programming a fleet of processes, Hydroflow is a *local* language for programming a single process that participates in a distributed system. More specifically, Hydroflow is an internal representation (IR) language and runtime library that generates the low-level Rust code for an individual transducer. As a low-level IR, Hydroflow is not intended for the general-purpose programmer. For most users it is intended as a readable compiler target from Hydro; advanced developers can also use it to manually program individual transducers. +- [DFIR and its compiler/runtime](https://github.com/hydro-project/hydroflow/tree/main/hydroflow) are the subject of this book. +Where Hydro is a *global* language for programming a fleet of processes, DFIR is a *local* language for programming a single process that participates in a distributed system. More specifically, DFIR is an internal representation (IR) language and runtime library that generates the low-level Rust code for an individual transducer. As a low-level IR, DFIR is not intended for the general-purpose programmer. For most users it is intended as a readable compiler target from Hydro; advanced developers can also use it to manually program individual transducers. -- [HydroDeploy](../deploy) is a service for launching Hydroflow transducers on a variety of platforms. +- [HydroDeploy](../deploy) is a service for launching DFIR transducers on a variety of platforms. - Hydro also supports *Deterministic Simulation Testing* to aid in debugging distributed programs. Documentation on this feature is forthcoming. diff --git a/docs/docs/hydroflow/faq.md b/docs/docs/dfir/faq.md similarity index 52% rename from docs/docs/hydroflow/faq.md rename to docs/docs/dfir/faq.md index 4892fde86991..99cd641e6bb2 100644 --- a/docs/docs/hydroflow/faq.md +++ b/docs/docs/dfir/faq.md @@ -3,34 +3,34 @@ sidebar_position: 9 --- # FAQ -#### Q: How is Hydroflow different from dataflow systems like Spark, Flink, or MapReduce? -**A:** Hydroflow is designed as a substrate for building a wide range of distributed systems; traditional software dataflow systems -like the ones mentioned are targeted more narrowly at large-scale data processing. As such, Hydroflow differs from these systems in several ways: +#### Q: How is DFIR different from dataflow systems like Spark, Flink, or MapReduce? +**A:** DFIR is designed as a substrate for building a wide range of distributed systems; traditional software dataflow systems +like the ones mentioned are targeted more narrowly at large-scale data processing. As such, DFIR differs from these systems in several ways: -First, Hydroflow is a lower-level abstraction than the systems mentioned. Hydroflow adopts a dataflow abstraction for specifying a transducer -running on a *single core*; one implementes a distributed system out of multiple Hydroflow transducers. By contrast, Spark, Flink and MapReduce are +First, DFIR is a lower-level abstraction than the systems mentioned. DFIR adopts a dataflow abstraction for specifying a transducer +running on a *single core*; one implementes a distributed system out of multiple DFIR transducers. By contrast, Spark, Flink and MapReduce are distributed systems, which make specific choices for implementing issues like scheduling, fault tolerance, and so on. Second, the systems mentioned above were designed specifically for distributed data processing tasks. -By contrast, Hydroflow is designed as a compiler target for many possible language models. Distributed -dataflow systems like those mentioned above are one possible higher-level model one could build with Hydroflow, +By contrast, DFIR is designed as a compiler target for many possible language models. Distributed +dataflow systems like those mentioned above are one possible higher-level model one could build with DFIR, but there are many others. -Third, Hydroflow is a *reactive* dataflow engine, optimized for low-latency handling of +Third, DFIR is a *reactive* dataflow engine, optimized for low-latency handling of asynchronous events and messages in a long-lived service. For example, one can build -low-level protocol handlers in Hydroflow for implementing distributed protocols +low-level protocol handlers in DFIR for implementing distributed protocols like Paxos or Two-Phase Commit with low latency. -#### Q: What model of parallelism does Hydroflow use? SPMD? MPMD? Actors? MPI? -**A:** As a substrate for building individual nodes in a distributed systems, Hydroflow does not make any -assumptions about the model of parallelism used. One can construct a distributed system out of Hydroflow +#### Q: What model of parallelism does DFIR use? SPMD? MPMD? Actors? MPI? +**A:** As a substrate for building individual nodes in a distributed systems, DFIR does not make any +assumptions about the model of parallelism used. One can construct a distributed system out of DFIR transducers that use any model of parallelism, including [SPMD](https://en.wikipedia.org/wiki/Flynn%27s_taxonomy#Single_program,_multiple_data_streams_(SPMD)), [MPMD](https://en.wikipedia.org/wiki/Flynn%27s_taxonomy#Multiple_programs,_multiple_data_streams_(MPMD)), [Actors](https://en.wikipedia.org/wiki/Actor_model) or [MPI Collective Operations](https://en.wikipedia.org/wiki/Collective_operation). -Hydroflow provides abstractions for implementing individual transducers to handle inputs, computing, and emitting outputs in +DFIR provides abstractions for implementing individual transducers to handle inputs, computing, and emitting outputs in a general-purpose manner. -That said, it is common practice to deploy many instance of the same Hydroflow transducer; most distributed systems built in Hydroflow +That said, it is common practice to deploy many instance of the same DFIR transducer; most distributed systems built in DFIR therefore have some form of SPMD parallelism. (This is true of most distributed systems in general.) \ No newline at end of file diff --git a/docs/docs/hydroflow/img/hydro_stack.png b/docs/docs/dfir/img/hydro_stack.png similarity index 100% rename from docs/docs/hydroflow/img/hydro_stack.png rename to docs/docs/dfir/img/hydro_stack.png diff --git a/docs/docs/hydroflow/img/in-out_example.png b/docs/docs/dfir/img/in-out_example.png similarity index 100% rename from docs/docs/hydroflow/img/in-out_example.png rename to docs/docs/dfir/img/in-out_example.png diff --git a/docs/docs/hydroflow/img/in-out_partition.png b/docs/docs/dfir/img/in-out_partition.png similarity index 100% rename from docs/docs/hydroflow/img/in-out_partition.png rename to docs/docs/dfir/img/in-out_partition.png diff --git a/docs/docs/hydroflow/img/in-out_tree.png b/docs/docs/dfir/img/in-out_tree.png similarity index 100% rename from docs/docs/hydroflow/img/in-out_tree.png rename to docs/docs/dfir/img/in-out_tree.png diff --git a/docs/docs/hydroflow/img/max-int-ord.png b/docs/docs/dfir/img/max-int-ord.png similarity index 100% rename from docs/docs/hydroflow/img/max-int-ord.png rename to docs/docs/dfir/img/max-int-ord.png diff --git a/docs/docs/hydroflow/img/oaklandish_logo.jpg b/docs/docs/dfir/img/oaklandish_logo.jpg similarity index 100% rename from docs/docs/hydroflow/img/oaklandish_logo.jpg rename to docs/docs/dfir/img/oaklandish_logo.jpg diff --git a/docs/docs/hydroflow/img/set-union-ord.png b/docs/docs/dfir/img/set-union-ord.png similarity index 100% rename from docs/docs/hydroflow/img/set-union-ord.png rename to docs/docs/dfir/img/set-union-ord.png diff --git a/docs/docs/dfir/index.mdx b/docs/docs/dfir/index.mdx new file mode 100644 index 000000000000..cc04ff714c23 --- /dev/null +++ b/docs/docs/dfir/index.mdx @@ -0,0 +1,16 @@ +--- +sidebar_position: 1 +--- + +import DFIRDocs from '../../../dfir_rs/README.md' + +# Introduction + + + +## This Book +This book will teach you how to set up your environment to get started with DFIR, and how to program in the DFIR surface syntax. + +Keep in mind that DFIR is under active development. However the code in this book is tested with the DFIR library so should always be up-to-date. + +If you have any questions, feel free to [create an issue on Github](https://github.com/hydro-project/hydroflow/issues/new). diff --git a/docs/docs/hydroflow/lattices_crate/_category_.json b/docs/docs/dfir/lattices_crate/_category_.json similarity index 67% rename from docs/docs/hydroflow/lattices_crate/_category_.json rename to docs/docs/dfir/lattices_crate/_category_.json index 5721bdb5bd52..925f9dc81248 100644 --- a/docs/docs/hydroflow/lattices_crate/_category_.json +++ b/docs/docs/dfir/lattices_crate/_category_.json @@ -3,6 +3,6 @@ "position": 6, "link": { "type": "doc", - "id": "hydroflow/lattices_crate/index" + "id": "dfir/lattices_crate/index" } } diff --git a/docs/docs/hydroflow/lattices_crate/index.mdx b/docs/docs/dfir/lattices_crate/index.mdx similarity index 100% rename from docs/docs/hydroflow/lattices_crate/index.mdx rename to docs/docs/dfir/lattices_crate/index.mdx diff --git a/docs/docs/hydroflow/lattices_crate/lattice_math.md b/docs/docs/dfir/lattices_crate/lattice_math.md similarity index 100% rename from docs/docs/hydroflow/lattices_crate/lattice_math.md rename to docs/docs/dfir/lattices_crate/lattice_math.md diff --git a/docs/docs/hydroflow/quickstart/_category_.json b/docs/docs/dfir/quickstart/_category_.json similarity index 67% rename from docs/docs/hydroflow/quickstart/_category_.json rename to docs/docs/dfir/quickstart/_category_.json index 236670b3c838..de7d455195b4 100644 --- a/docs/docs/hydroflow/quickstart/_category_.json +++ b/docs/docs/dfir/quickstart/_category_.json @@ -3,6 +3,6 @@ "position": 2, "link": { "type": "doc", - "id": "hydroflow/quickstart/index" + "id": "dfir/quickstart/index" } } diff --git a/docs/docs/hydroflow/quickstart/example_1_simplest.mdx b/docs/docs/dfir/quickstart/example_1_simplest.mdx similarity index 72% rename from docs/docs/hydroflow/quickstart/example_1_simplest.mdx rename to docs/docs/dfir/quickstart/example_1_simplest.mdx index 394367386a0d..35f993d04da4 100644 --- a/docs/docs/hydroflow/quickstart/example_1_simplest.mdx +++ b/docs/docs/dfir/quickstart/example_1_simplest.mdx @@ -2,25 +2,25 @@ sidebar_position: 2 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_1_simplest.rs'; -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_1_simplest.snap'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_1_simplest.rs'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_1_simplest.snap'; import { getLines, extractOutput } from '../../../src/util'; # Simplest Example > In this example we will cover: -> - Modifying the Hydroflow template project -> - How Hydroflow program specs are embedded inside Rust -> - How to execute a simple Hydroflow program -> - Two Hydroflow operators: `source_iter` and `for_each` +> - Modifying the DFIR template project +> - How DFIR program specs are embedded inside Rust +> - How to execute a simple DFIR program +> - Two DFIR operators: `source_iter` and `for_each` -Lets start out with the simplest possible Hydroflow program, which prints out +Lets start out with the simplest possible DFIR program, which prints out the numbers in `0..10`. Create a clean template project: ```console #shell-command-next-line -cargo generate gh:hydro-project/hydroflow template/hydroflow +cargo generate gh:hydro-project/hydroflow template/dfir ⚠️ Favorite `gh:hydro-project/hydroflow` not found in config, using it as a git repository: https://github.com/hydro-project/hydroflow.git 🤷 Project Name: simple 🔧 Destination: /Users/me/code/simple ... @@ -54,15 +54,15 @@ Although this is a trivial program, it's useful to go through it line by line. {getLines(exampleCode, 'use')} -This import gives you the macro you need from Hydroflow to write code in Hydroflow's +This import gives you the macro you need from DFIR to write code in DFIR's [_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 `Dfir` instance to a mutable variable `flow`––mutable because we will be changing its status when we run it. {getLines(exampleCode, 'macro_call')} -Hydroflow surface syntax defines a "flow" consisting of *operators* connected via `->` arrows. +DFIR surface syntax defines a "flow" consisting of *operators* connected via `->` arrows. This simplest example uses a simple two-step linear flow. It starts with a [`source_iter`](../syntax/surface_ops_gen#source_iter) operator that takes the Rust iterator `0..10` and iterates it to emit the @@ -70,22 +70,22 @@ numbers 0 through 9. That operator then passes those numbers along the `->` arro [`for_each`](../syntax/surface_ops_gen#for_each) operator that invokes its closure argument to print each item passed in. -The Hydroflow surface syntax is merely a *specification*; it does not actually do anything +The DFIR surface syntax is merely a *specification*; it does not actually do anything until we run it. We can run this flow from within Rust via the [`run_available()` method](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Hydroflow.html#method.run_available). {getLines(exampleCode, 'run')} -Note that `run_available()` runs the Hydroflow graph until no more work is immediately +Note that `run_available()` runs the DFIR graph until no more work is immediately available. In this example flow, running the graph drains the iterator completely, so no more work will *ever* be available. In future examples we will use external inputs such as network ingress, in which case more work might appear at any time. In server applications that use network ingress for inputs, new work can appear at any time. In these application -we may need a different method than `run_available()`, e.g. the [`run_async()`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Hydroflow.html#method.run_async) method, check [the networking +we may need a different method than `run_available()`, e.g. the [`run_async()`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Dfir.html#method.run_async) method, check [the networking examples](./example_7_networking) for more. ### A Note on Project Structure -The template project is intended to be a starting point for your own Hydroflow project, and you can add files and directories as you see fit. The only requirement is that the `src/main.rs` file exists and contains a `main()` function. +The template project is intended to be a starting point for your own DFIR project, and you can add files and directories as you see fit. The only requirement is that the `src/main.rs` file exists and contains a `main()` function. In this simplest example we did not use a number of the files in the template: notably everything in the `src/` subdirectory other than `src/main.rs`. If you'd like to delete those extraneous files you can do so, but it's not necessary, and we'll use them in subsequent examples. \ No newline at end of file diff --git a/docs/docs/hydroflow/quickstart/example_2_simple.mdx b/docs/docs/dfir/quickstart/example_2_simple.mdx similarity index 78% rename from docs/docs/hydroflow/quickstart/example_2_simple.mdx rename to docs/docs/dfir/quickstart/example_2_simple.mdx index 830f73b3fb12..434af0ae7742 100644 --- a/docs/docs/hydroflow/quickstart/example_2_simple.mdx +++ b/docs/docs/dfir/quickstart/example_2_simple.mdx @@ -3,14 +3,14 @@ sidebar_position: 3 --- import CodeBlock from '@theme/CodeBlock'; import { InlineMath } from 'react-katex'; -import exampleCode1 from '!!raw-loader!../../../../hydroflow/examples/example_2_simple_1.rs'; -import exampleOutput1 from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_2_simple_1.snap'; -import exampleCode2 from '!!raw-loader!../../../../hydroflow/examples/example_2_simple_2.rs'; -import exampleOutput2 from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_2_simple_2.snap'; +import exampleCode1 from '!!raw-loader!../../../../dfir_rs/examples/example_2_simple_1.rs'; +import exampleOutput1 from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_2_simple_1.snap'; +import exampleCode2 from '!!raw-loader!../../../../dfir_rs/examples/example_2_simple_2.rs'; +import exampleOutput2 from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_2_simple_2.snap'; import { getLines, extractOutput } from '../../../src/util'; # Simple Example -> In this example we will cover some additional standard Hydroflow operators: +> In this example we will cover some additional standard DFIR operators: > - [`map`](../syntax/surface_ops_gen.md#map) > - [`filter`](../syntax/surface_ops_gen.md#filter) > - [`flatten`](../syntax/surface_ops_gen.md#flatten) @@ -18,10 +18,10 @@ import { getLines, extractOutput } from '../../../src/util'; > - [`flat_map`](../syntax/surface_ops_gen.md#flat_map) Lets build on the simplest example to explore some of the operators available -in Hydroflow. You may be familiar with operators such as [`map(...)`](../syntax/surface_ops_gen.md#map), +in DFIR. You may be familiar with operators such as [`map(...)`](../syntax/surface_ops_gen.md#map), [`filter(...)`](../syntax/surface_ops_gen.md#filter), [`flatten`(...)](../syntax/surface_ops_gen.md#flatten), etc. from Rust iterators or from other programming languages, and these are -also available in Hydroflow. +also available in DFIR. In your `simple` project, replace the contents of `src/main.rs` with the following: @@ -54,7 +54,7 @@ Now let's run the program: ## Rewriting with Composite Operators We can also express the same program with more aggressive use of composite operators like -[`filter_map()`](../syntax/surface_ops_gen.md#filtermap) and [`flat_map()`](../syntax/surface_ops_gen.md#flat_map). Hydroflow will compile these down to the same +[`filter_map()`](../syntax/surface_ops_gen.md#filtermap) and [`flat_map()`](../syntax/surface_ops_gen.md#flat_map). DFIR will compile these down to the same machine code. Replace the contents of `src/main.rs` with the following: diff --git a/docs/docs/hydroflow/quickstart/example_3_stream.mdx b/docs/docs/dfir/quickstart/example_3_stream.mdx similarity index 69% rename from docs/docs/hydroflow/quickstart/example_3_stream.mdx rename to docs/docs/dfir/quickstart/example_3_stream.mdx index 8ec6856c8766..44119a45fbc4 100644 --- a/docs/docs/hydroflow/quickstart/example_3_stream.mdx +++ b/docs/docs/dfir/quickstart/example_3_stream.mdx @@ -2,41 +2,41 @@ sidebar_position: 4 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_3_stream.rs'; -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_3_stream.snap'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_3_stream.rs'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_3_stream.snap'; import { getLines, extractOutput } from '../../../src/util'; # An Example With Streaming Input > In this example we will cover: -> - the input `channel` concept, which streams data in from outside the Hydroflow spec -> - the [`source_stream`](../syntax/surface_ops_gen.md#source_stream) operator that brings channel input into Hydroflow +> - the input `channel` concept, which streams data in from outside the DFIR spec +> - the [`source_stream`](../syntax/surface_ops_gen.md#source_stream) operator that brings channel input into DFIR > - Rust syntax to programmatically send data to a (local) channel -In our previous examples, data came from within the Hydroflow spec, via Rust iterators and the [`source_iter`](../syntax/surface_ops_gen.md#source_iter) operator. In most cases, however, data comes from outside the Hydroflow spec. In this example, we'll see a simple version of this idea, with data being generated on the same thread and sent into the channel programmatically via Rust. +In our previous examples, data came from within the DFIR spec, via Rust iterators and the [`source_iter`](../syntax/surface_ops_gen.md#source_iter) operator. In most cases, however, data comes from outside the DFIR spec. In this example, we'll see a simple version of this idea, with data being generated on the same thread and sent into the channel programmatically via Rust. For discussion, we start with a skeleton much like before: ```rust showLineNumbers -use hydroflow::hydroflow_syntax; +use dfir_rs::dfir_syntax; pub fn main() { - let mut hydroflow = hydroflow_syntax! { + let mut dfir = dfir_syntax! { // code will go here }; - hydroflow.run_available(); + dfir.run_available(); } ``` **TODO:** Make the following less intimidating to users who are not Tokio experts. To add a new external input -channel, we can use the `hydroflow::util::unbounded_channel()` function in Rust before we declare the Hydroflow spec: +channel, we can use the `dfir_rs::util::unbounded_channel()` function in Rust before we declare the DFIR spec: {getLines(exampleCode, 4, 5)} Under the covers, this is a [multiple-producer/single-consumer (`mpsc`) channel](https://docs.rs/tokio/latest/tokio/sync/mpsc/fn.unbounded_channel.html) -provided by the [tokio](https://docs.rs/tokio/latest/tokio) library for Rust, which is usually the appropriate choice for an inbound Hydroflow stream. +provided by the [tokio](https://docs.rs/tokio/latest/tokio) library for Rust, which is usually the appropriate choice for an inbound DFIR stream. Think of it as a high-performance "mailbox" that any sender can fill with well-typed data. The Rust `::` syntax uses what is affectionately @@ -44,7 +44,7 @@ called the ["turbofish"](https://turbo.fish/about), which is how type parameters supplied to generic types and functions. In this case it specifies that this tokio channel transmits items of type `usize`. The returned `example_recv` value can be used via a [`source_stream`](../syntax/surface_ops_gen.md#source_stream) -to build a Hydroflow subgraph just like before. +to build a DFIR subgraph just like before. Here is the same program as before, but using the input channel. Back in the `simple` project, replace the contents of `src/main.rs` with the following: diff --git a/docs/docs/hydroflow/quickstart/example_4_neighbors.mdx b/docs/docs/dfir/quickstart/example_4_neighbors.mdx similarity index 85% rename from docs/docs/hydroflow/quickstart/example_4_neighbors.mdx rename to docs/docs/dfir/quickstart/example_4_neighbors.mdx index 2f755c35131b..cdc5d09c8373 100644 --- a/docs/docs/hydroflow/quickstart/example_4_neighbors.mdx +++ b/docs/docs/dfir/quickstart/example_4_neighbors.mdx @@ -2,8 +2,8 @@ sidebar_position: 5 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_4_neighbors.rs'; -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_4_neighbors.snap'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_4_neighbors.rs'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_4_neighbors.snap'; import { getLines, extractOutput, extractMermaid } from '../../../src/util'; # Graph Neighbors @@ -12,10 +12,10 @@ import { getLines, extractOutput, extractMermaid } from '../../../src/util'; > * Our first multi-input operator, [`join`](../syntax/surface_ops_gen.md#join) > * Indexing multi-input operators by prepending a bracket expression > * The [`unique`](../syntax/surface_ops_gen.md#unique) operator for removing duplicates from a stream -> * Visualizing hydroflow code via `flow.meta_graph().expect(...).to_mermaid()` +> * Visualizing DFIR code via `flow.meta_graph().expect(...).to_mermaid()` So far, all the operators we've used have one input and one output and therefore -create a linear flow of operators. Let's now take a look at a Hydroflow program containing +create a linear flow of operators. Let's now take a look at a DFIR program containing an operator which has multiple inputs; in the following examples we'll extend this to multiple outputs. @@ -25,17 +25,17 @@ Given an abstract graph—represented as data in the form of a streaming list of vertices can be reached from a vertex passed in as the `origin`? It turns out this is fairly naturally represented as a dataflow program. -> **Note on terminology**: In each of the next few examples, we're going to write a Hydroflow program (a dataflow graph) to process data that itself represents some other graph! To avoid confusion, in these examples, we'll refer to the Hydroflow program as a "flow" or "program", and the data as a "graph" of "edges" and "vertices". +> **Note on terminology**: In each of the next few examples, we're going to write a DFIR program (a dataflow graph) to process data that itself represents some other graph! To avoid confusion, in these examples, we'll refer to the DFIR program as a "flow" or "program", and the data as a "graph" of "edges" and "vertices". ## But First: Graph Neighbors Graph reachability exercises a bunch of concepts at once, so we'll start here with a simpler flow that finds graph *neighbors*: vertices that are just one hop away. -Our graph neighbors Hydroflow program will take +Our graph neighbors DFIR program will take our initial `origin` vertex as one input, and join it another input that streams in all the edges—this join will stream out the vertices that are one hop (edge) away from the starting vertex. -Here is an *intuitive* diagram of that dataflow program (we'll see complete, autogenerated Hydroflow diagrams +Here is an *intuitive* diagram of that dataflow program (we'll see complete, autogenerated DFIR diagrams below): ```mermaid graph TD @@ -55,7 +55,7 @@ graph TD end ``` -Lets take a look at some Hydroflow code that implements the program. In your `simple` project, +Lets take a look at some DFIR code that implements the program. In your `simple` project, replace the contents of `src/main.rs` with the following: {exampleCode} @@ -69,7 +69,7 @@ That looks right: the edges we "sent" into the flow that start at `0` are > Note: When you run the program you may see the lines printed out in a different order. That's OK; the flow we're defining here uses the [`join()`](../syntax/surface_ops_gen.md#join) operator, which deals in `sets` of data items, so the order in which a `join()`'s output items are generated is not specified or guaranteed. The [`sort_by_key`](../syntax/surface_ops_gen.md#sort_by_key) operator can always be used to sort the output of a flow if needed. -## Examining the Hydroflow Code +## Examining the DFIR Code In the code, we want to start out with the origin vertex, `0`, and the stream of edges coming in. Because this flow is a bit more complex than our earlier examples, we break it down into named "subflows", assigning them variable @@ -89,7 +89,7 @@ First, note the syntax for passing data into a subflow with multiple inputs requ an input index (starting at `0`) in square brackets to the multi-input variable name or operator. In this example we have `-> [0]my_join` and `-> [1]my_join`. -Hydroflow's `join()` API requires +DFIR's `join()` API requires a little massaging of its inputs to work properly. The inputs must be of the form of a pair of elements `(K, V1)` and `(K, V2)`, and the operator joins them on equal keys `K` and produces an @@ -112,7 +112,7 @@ The [unique](../syntax/surface_ops_gen.md#unique) operator removes duplicates fr There's also some extra code here, `flow.meta_graph().expect(...).to_mermaid()`, which tells -Hydroflow to +DFIR to generate a diagram rendered by [Mermaid](https://mermaid-js.github.io/) showing the structure of the graph, and print it to stdout. You can copy that text and paste it into the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) @@ -121,13 +121,13 @@ to see the graph, which should look as follows: You may be wondering why the nodes in the graph have different colors (and shapes, for readers who cannot distinguish -colors easily). The answer has nothing to do with the meaning of the program, only with the way that Hydroflow compiles -operators into Rust. Simply put, blue (wide-topped) boxes _pull_ data, yellow (wide-bottomed) boxes _push_ data, and the `handoff` is a special operator that buffers pushed data for subsequent pulling. Hydroflow always places a handoff +colors easily). The answer has nothing to do with the meaning of the program, only with the way that DFIR compiles +operators into Rust. Simply put, blue (wide-topped) boxes _pull_ data, yellow (wide-bottomed) boxes _push_ data, and the `handoff` is a special operator that buffers pushed data for subsequent pulling. DFIR always places a handoff between a push producer and a pull consumer, for reasons explained in the [Architecture](../architecture/index.mdx) chapter. Returning to the code, if you read the `edges_send` calls carefully, you'll see that the example data has vertices (`2`, `4`) that are more than one hop away from `0`, which were not output by our simple program. To extend this example to graph *reachability*, -we need to recurse: find neighbors of our neighbors, neighbors of our neighbors' neighbors, and so on. In Hydroflow, +we need to recurse: find neighbors of our neighbors, neighbors of our neighbors' neighbors, and so on. In DFIR, this is done by adding a loop to the flow, as we'll see in our [next example](example_5_reachability). diff --git a/docs/docs/hydroflow/quickstart/example_5_reachability.mdx b/docs/docs/dfir/quickstart/example_5_reachability.mdx similarity index 87% rename from docs/docs/hydroflow/quickstart/example_5_reachability.mdx rename to docs/docs/dfir/quickstart/example_5_reachability.mdx index 6a652b3bb697..380196baa068 100644 --- a/docs/docs/hydroflow/quickstart/example_5_reachability.mdx +++ b/docs/docs/dfir/quickstart/example_5_reachability.mdx @@ -2,8 +2,8 @@ sidebar_position: 6 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_5_reachability.rs'; -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_5_reachability.snap'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_5_reachability.rs'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_5_reachability.snap'; import { getLines, extractOutput, extractMermaid } from '../../../src/util'; # Graph Reachability @@ -19,9 +19,9 @@ one of two cases: 1. a neighbor of `origin` *or* 2. a neighbor of some other vertex that is itself reachable from `origin`. -It turns out this is a very small change to our Hydroflow program! Essentially we want to take *all* the reached vertices we found in our graph neighbors program, +It turns out this is a very small change to our DFIR program! Essentially we want to take *all* the reached vertices we found in our graph neighbors program, and treat them recursively just as we treated `origin`. -To do this in a language like Hydroflow, we introduce a cycle in the flow: +To do this in a language like DFIR, we introduce a cycle in the flow: we take the join output and have it flow back into the join input. The modified intuitive graph looks like this: @@ -49,7 +49,7 @@ Note that we added a `Reached Vertices` box to the diagram to union the two inbo two cases above. Similarly note that the join box `V ⨝ E` now has two _outbound_ edges; the sketch omits the operator to copy ("tee") the output along two paths. -Now lets look at a modified version of our [graph neighbor](example_4_neighbors) code that implements this full program, including the loop as well as the Hydroflow [`union`](../syntax/surface_ops_gen.md#union) and [`tee`](../syntax/surface_ops_gen.md#tee). +Now lets look at a modified version of our [graph neighbor](example_4_neighbors) code that implements this full program, including the loop as well as the DFIR [`union`](../syntax/surface_ops_gen.md#union) and [`tee`](../syntax/surface_ops_gen.md#tee). Modify src/main.rs to look like this: {exampleCode} @@ -58,7 +58,7 @@ And now we get the full set of vertices reachable from `0`: {extractOutput(exampleOutput)} -## Examining the Hydroflow Code +## Examining the DFIR Code Let's review the significant changes here. First, in setting up the inputs we have the addition of the `reached_vertices` variable, which uses the [union()](../syntax/surface_ops_gen.md#union) op to union the output of two operators into one. @@ -93,4 +93,4 @@ more complex. In particular, it includes the `union` and `tee` operators, and a There is also an auto-generated `handoff` operator that enforces the rule that a push producer and a pull consumer must be separated by a `handoff` (see the [Architecture section](../architecture/handoffs)). # Cyclic Dataflow -Many dataflow and workflow systems are restricted to acyclic graphs (DAGs), but Hydroflow supports cycles, as we see in this example. \ No newline at end of file +Many dataflow and workflow systems are restricted to acyclic graphs (DAGs), but DFIR supports cycles, as we see in this example. \ No newline at end of file diff --git a/docs/docs/hydroflow/quickstart/example_6_unreachability.mdx b/docs/docs/dfir/quickstart/example_6_unreachability.mdx similarity index 77% rename from docs/docs/hydroflow/quickstart/example_6_unreachability.mdx rename to docs/docs/dfir/quickstart/example_6_unreachability.mdx index 18a1cdbcd5d2..398bc37197e2 100644 --- a/docs/docs/hydroflow/quickstart/example_6_unreachability.mdx +++ b/docs/docs/dfir/quickstart/example_6_unreachability.mdx @@ -2,14 +2,14 @@ sidebar_position: 7 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_6_unreachability.rs'; -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_6_unreachability.snap'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_6_unreachability.rs'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_6_unreachability.snap'; import { getLines, extractOutput, extractMermaid } from '../../../src/util'; # Graph Un-Reachability > In this example we cover: > * Extending a program with additional downstream logic. -> * Hydroflow's ([`difference`](../syntax/surface_ops_gen.md#difference)) operator +> * DFIR's ([`difference`](../syntax/surface_ops_gen.md#difference)) operator > * A first exposure to the concepts of _strata_ and _ticks_ > * An example of how a cyclic dataflow in one stratum executes to completion before starting the next stratum. @@ -65,27 +65,27 @@ The auto-generated mermaid looks like so: ## Strata and Ticks -Notice in the mermaid graph how Hydroflow separates the `difference` operator and its downstream dependencies into its own +Notice in the mermaid graph how DFIR separates the `difference` operator and its downstream dependencies into its own _stratum_ (plural: _strata_). Note also the edge coming into the `neg` input to `difference` is bold and ends in a ball: this is because that input to `difference` is "blocking", meaning that `difference` should not run until all of the input on that edge has been received. The stratum boundary before `difference` ensures that the blocking property is respected. -Hydroflow runs each stratum +DFIR runs each stratum in order, one at a time, ensuring all values are computed before moving on to the next stratum. Between strata we see a _handoff_, which logically buffers the output of the first stratum, and delineates the separation of execution between the 2 strata. If you look carefully, you'll see two subgraphs labeled with `stratum 0`. The reason that stratum 0 was broken into subgraphs has nothing to do with -correctness, but rather the way that Hydroflow graphs are compiled and scheduled (as +correctness, but rather the way that DFIR graphs are compiled and scheduled (as discussed in the section on [In-Out Trees](../architecture/in-out_trees). We need not concern ourselves with this detail other than to look carefully at the `stratum` labels on the grey boxes in our Mermaid diagrams. All the subgraphs labeled `stratum 0` are run first to completion, and then all the subgraphs labeled `stratum 1` are run. This captures the requirements of the `difference` operator: it has to wait for its full negative input before it can start producing output. Note how the `difference` operator has two inputs (labeled `pos` and `neg`), and only the `neg` input shows up as blocking (with the bold edge ending in a ball). -In this Mermaid graph, note that stratum 0 has a recursive loop back through `my_join`, and `tee`s off output to the `difference` operator in stratum 1 via the handoff and the blocking `neg` input. This means that Hydroflow will first run the loop of stratum 0 repeatedly until all the transitive reached vertices are passed to the handoff (a [fixpoint](../concepts/cyclic_flows)), before moving on to compute the unreached vertices via stratum 1. +In this Mermaid graph, note that stratum 0 has a recursive loop back through `my_join`, and `tee`s off output to the `difference` operator in stratum 1 via the handoff and the blocking `neg` input. This means that DFIR will first run the loop of stratum 0 repeatedly until all the transitive reached vertices are passed to the handoff (a [fixpoint](../concepts/cyclic_flows)), before moving on to compute the unreached vertices via stratum 1. -After all strata are run, Hydroflow returns to stratum 0; this begins the next _tick_. This doesn't really matter for this example, but it is important for long-running Hydroflow services that accept input from the outside world. More on this topic in the chapter on [time](../concepts/life_and_times.md). +After all strata are run, DFIR returns to stratum 0; this begins the next _tick_. This doesn't really matter for this example, but it is important for long-running DFIR services that accept input from the outside world. More on this topic in the chapter on [time](../concepts/life_and_times.md). diff --git a/docs/docs/hydroflow/quickstart/example_7_networking.mdx b/docs/docs/dfir/quickstart/example_7_networking.mdx similarity index 55% rename from docs/docs/hydroflow/quickstart/example_7_networking.mdx rename to docs/docs/dfir/quickstart/example_7_networking.mdx index 027804991d86..fccebd5d865a 100644 --- a/docs/docs/hydroflow/quickstart/example_7_networking.mdx +++ b/docs/docs/dfir/quickstart/example_7_networking.mdx @@ -2,17 +2,17 @@ sidebar_position: 8 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_6_unreachability.rs'; -import exampleOutput from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_6_unreachability.snap'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_6_unreachability.rs'; +import exampleOutput from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_6_unreachability.snap'; import { getLines, extractOutput, extractMermaid } from '../../../src/util'; # Networked Services -Hydroflow provides a robust framework for developing networked services. The best way to get started is to use -the Hydroflow template. +DFIR provides a robust framework for developing networked services. The best way to get started is to use +the DFIR template. ```bash -cargo generate gh:hydro-project/hydroflow template/hydroflow +cargo generate gh:hydro-project/hydroflow template/dfir ``` `cd` into the generated folder, ensure the correct nightly version of rust is installed, and test the generated project: @@ -29,19 +29,19 @@ The template contains a chat server & client implementation using UDP. You can s the client and connect to the same server. ## Things to Check -* [README](https://github.com/hydro-project/hydroflow/tree/main/template/hydroflow#readme) - Contains instructions on building the template and +* [README](https://github.com/hydro-project/hydroflow/tree/main/template/dfir#readme) - Contains instructions on building the template and running the client and server examples. -* [server.rs](https://github.com/hydro-project/hydroflow/blob/main/template/hydroflow/src/server.rs) - Contains the chat server -implementation. The inline rust documentation explains the networking-related hydroflow operators and their usage. -* [client.rs](https://github.com/hydro-project/hydroflow/blob/main/template/hydroflow/src/client.rs) - Contains the chat client -implementation. The inline rust documentation explains the networking-related hydroflow operators and their usage. +* [server.rs](https://github.com/hydro-project/hydroflow/blob/main/template/dfir/src/server.rs) - Contains the chat server +implementation. The inline rust documentation explains the networking-related DFIR operators and their usage. +* [client.rs](https://github.com/hydro-project/hydroflow/blob/main/template/dfir/src/client.rs) - Contains the chat client +implementation. The inline rust documentation explains the networking-related DFIR operators and their usage. -Hydroflow also supports TCP for reliable, connection-oriented communication. Understanding the differences and use +DFIR also supports TCP for reliable, connection-oriented communication. Understanding the differences and use cases of these protocols can help you choose the right one for your networked service. ## Additional Examples -The Hydroflow examples directory contains additional examples that deal with networking. For example, the [Randomized -Gossip Server](https://github.com/hydro-project/hydroflow/blob/main/hydroflow/examples/chat/randomized_gossiping_server.rs) +The DFIR examples directory contains additional examples that deal with networking. For example, the [Randomized +Gossip Server](https://github.com/hydro-project/hydroflow/blob/main/dfir_rs/examples/chat/randomized_gossiping_server.rs) example extends the chat example to work with a cluster of redundant servers that use gossip for sharing chat-related state between themselves. \ No newline at end of file diff --git a/docs/docs/dfir/quickstart/index.md b/docs/docs/dfir/quickstart/index.md new file mode 100644 index 000000000000..ac8436b5984a --- /dev/null +++ b/docs/docs/dfir/quickstart/index.md @@ -0,0 +1,8 @@ +# Quickstart +This section will get you up and running with Rust and DFIR, and work you through a set of concrete examples illustrating much of what you need to know to get productive with DFIR. + +:::tip + +DFIR is the low-level IR that forms the foundation of the Hydro stack. If you're looking for a higher-level API, check out [Hydro](../../hydro/index.mdx). + +::: diff --git a/docs/docs/hydroflow/quickstart/setup.md b/docs/docs/dfir/quickstart/setup.md similarity index 76% rename from docs/docs/hydroflow/quickstart/setup.md rename to docs/docs/dfir/quickstart/setup.md index 0c363510806a..602ec047a600 100644 --- a/docs/docs/hydroflow/quickstart/setup.md +++ b/docs/docs/dfir/quickstart/setup.md @@ -4,7 +4,7 @@ sidebar_position: 1 # Setup -This section explains how to get Hydroflow running, either for development or +This section explains how to get DFIR running, either for development or usage, even if you are not familiar with Rust development. ## Installing Rust @@ -27,8 +27,8 @@ The following `cargo` commands will come in handy: * `cargo clean` - Cleans the build cache, sometimes needed if the build is acting up. * `cargo test` - Runs tests in the workspace. -* `cargo run -p hydroflow --example ` - Run an example program in - `hydroflow/examples`. +* `cargo run -p dfir_rs --example ` - Run an example program in + `dfir_rs/examples`. To learn Rust see the official [Learn Rust page](https://www.rust-lang.org/learn). Here are some good resources: @@ -37,8 +37,8 @@ Here are some good resources: is a good way to learn Rust's ownership system and its implications. -In this book we will be using the Hydroflow template generator, which we recommend -as a starting point for your Hydroflow projects. For this purpose you +In this book we will be using the DFIR template generator, which we recommend +as a starting point for your DFIR projects. For this purpose you will need to install the `cargo-generate` tool: ```bash #shell-command-next-line @@ -50,12 +50,12 @@ cargo install cargo-generate We recommend using VS Code with the `rust-analyzer` extension (and NOT the `Rust` extension). -## Setting up a Hydroflow Project -The easiest way to get started with Hydroflow is to begin with a template project. +## Setting up a DFIR Project +The easiest way to get started with DFIR is to begin with a template project. Create a directory where you'd like to put that project, direct your terminal there and run: ```bash #shell-command-next-line -cargo generate gh:hydro-project/hydroflow template/hydroflow +cargo generate gh:hydro-project/hydroflow template/dfir ``` You will be prompted to name your project. The `cargo generate` command will create a subdirectory with the relevant files and folders. @@ -68,7 +68,7 @@ cd rustup update ``` -As part of generating the project, the `hydroflow` library will be downloaded as a dependency. +As part of generating the project, the `dfir_rs` library will be downloaded as a dependency. You can then open the project in VS Code or IDE of your choice, or you can simply build the template project with `cargo build`. ```bash @@ -77,13 +77,13 @@ cargo build ``` This should return successfully. -The template provides a simple working example of a Hydroflow program. +The template provides a simple working example of a DFIR program. As a sort of "hello, world" of distributed systems, it implements an "echo server" that simply echoes back the messages you sent it; it also implements a client to test the server. We will replace the code in that example with our own, but it's a good idea to run it first to make sure everything is working. :::note -We call a running Hydroflow binary a *transducer*. +We call a running DFIR binary a *transducer*. ::: Start by running a transducer for the server: @@ -113,7 +113,7 @@ Hello! ## Alternative: Checking out the Hydroflow Repository This book will assume you are using the template project, but some -Rust experts may want to get started with Hydroflow by cloning and working in the +Rust experts may want to get started with DFIR by cloning and working in the repository directly. You should fork the repository if you want to push your changes. @@ -122,21 +122,21 @@ To clone the repo, run: ```bash git clone git@github.com:hydro-project/hydroflow.git ``` -Hydroflow requires nightly Rust, but the repo is already configured for it via +DFIR requires nightly Rust, but the repo is already configured for it via `rust-toolchain.toml`. You can then open the repo in VS Code or IDE of your choice. In VS Code, `rust-analyzer` will provide inline type and error messages, code completion, etc. To work with the repository, it's best to start with an "example", found in the -[`hydroflow/examples` folder](https://github.com/hydro-project/hydroflow/tree/main/hydroflow/examples). +[`dfir/examples` folder](https://github.com/hydro-project/hydroflow/tree/main/dfir_rs/examples). The simplest example is the -['hello world'](https://github.com/hydro-project/hydroflow/blob/main/hydroflow/examples/hello_world/main.rs) example; +['hello world'](https://github.com/hydro-project/hydroflow/blob/main/dfir_rs/examples/hello_world/main.rs) example; the simplest example with networking is the -[`echo server`](https://github.com/hydro-project/hydroflow/blob/main/hydroflow/examples/echoserver/main.rs). +[`echo server`](https://github.com/hydro-project/hydroflow/blob/main/dfir_rs/examples/echoserver/main.rs). -The Hydroflow repository is set up as a [workspace](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html), -i.e. a repo containing a bunch of separate packages, `hydroflow` is just the +The DFIR repository is set up as a [workspace](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html), +i.e. a repo containing a bunch of separate packages, `dfir_rs` is just the main one. So if you want to work in a proper separate cargo package, you can create one and add it into the [root `Cargo.toml`](https://github.com/hydro-project/hydroflow/blob/main/Cargo.toml), -much like the [provided template](https://github.com/hydro-project/hydroflow/tree/main/template/hydroflow#readme). +much like the [provided template](https://github.com/hydro-project/hydroflow/tree/main/template/dfir#readme). diff --git a/docs/docs/hydroflow/syntax/.gitignore b/docs/docs/dfir/syntax/.gitignore similarity index 100% rename from docs/docs/hydroflow/syntax/.gitignore rename to docs/docs/dfir/syntax/.gitignore diff --git a/docs/docs/hydroflow/syntax/_category_.json b/docs/docs/dfir/syntax/_category_.json similarity index 68% rename from docs/docs/hydroflow/syntax/_category_.json rename to docs/docs/dfir/syntax/_category_.json index 46d2b4358df5..1ecc2d9a6213 100644 --- a/docs/docs/hydroflow/syntax/_category_.json +++ b/docs/docs/dfir/syntax/_category_.json @@ -3,6 +3,6 @@ "position": 3, "link": { "type": "doc", - "id": "hydroflow/syntax/index" + "id": "dfir/syntax/index" } } diff --git a/docs/docs/hydroflow/syntax/index.mdx b/docs/docs/dfir/syntax/index.mdx similarity index 55% rename from docs/docs/hydroflow/syntax/index.mdx rename to docs/docs/dfir/syntax/index.mdx index 458a2800ff36..f8583b27d0cd 100644 --- a/docs/docs/hydroflow/syntax/index.mdx +++ b/docs/docs/dfir/syntax/index.mdx @@ -1,15 +1,15 @@ import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_syntax_hello_world.rs'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_syntax_hello_world.rs'; -# Hydroflow Surface Syntax -The natural way to write a Hydroflow program is using the _Surface Syntax_ documented here. -It is a chained `Iterator`-style syntax of operators built into Hydroflow that should be sufficient +# DFIR Surface Syntax +The natural way to write a DFIR program is using the _Surface Syntax_ documented here. +It is a chained `Iterator`-style syntax of operators built into DFIR that should be sufficient for most uses. If you want lower-level access you can work with the `Core API` documented in the [Architecture](../architecture/) section. In this chapter we go over the syntax piece by piece: how to [embed surface syntax in Rust](./surface_embedding) and how to specify [_flows_](./surface_flows), which consist of [_data sources_](./surface_data) flowing through [_operators_](./surface_ops_gen). -<>{/* TODO(mingwei): In the [Hydroflow Types](surface_types.md) chapter we dive into the details of the data types that pass through flows. */} +<>{/* TODO(mingwei): In the [DFIR Types](surface_types.md) chapter we dive into the details of the data types that pass through flows. */} -As a teaser, here is a Rust/Hydroflow "HELLO WORLD" program: +As a teaser, here is a Rust/DFIR "HELLO WORLD" program: {exampleCode} diff --git a/docs/docs/hydroflow/syntax/state.md b/docs/docs/dfir/syntax/state.md similarity index 100% rename from docs/docs/hydroflow/syntax/state.md rename to docs/docs/dfir/syntax/state.md diff --git a/docs/docs/hydroflow/syntax/surface_data.mdx b/docs/docs/dfir/syntax/surface_data.mdx similarity index 83% rename from docs/docs/hydroflow/syntax/surface_data.mdx rename to docs/docs/dfir/syntax/surface_data.mdx index db75e77d692a..8689777122ac 100644 --- a/docs/docs/hydroflow/syntax/surface_data.mdx +++ b/docs/docs/dfir/syntax/surface_data.mdx @@ -2,8 +2,8 @@ sidebar_position: 3 --- import CodeBlock from '@theme/CodeBlock'; -import exampleCodeInput from '!!raw-loader!../../../../hydroflow/examples/example_syntax_input.rs'; -import exampleCodeOutput from '!!raw-loader!../../../../hydroflow/examples/example_syntax_output.rs'; +import exampleCodeInput from '!!raw-loader!../../../../dfir_rs/examples/example_syntax_input.rs'; +import exampleCodeOutput from '!!raw-loader!../../../../dfir_rs/examples/example_syntax_output.rs'; # Data Sources and Sinks in Rust Any useful flow requires us to define sources of data, either generated computationally or received from @@ -27,10 +27,10 @@ operator. ## Streaming Sources More commonly, a flow should handle external data coming in asynchronously from a [_Tokio_ runtime](https://tokio.rs/tokio/tutorial). -One way to do this is with _channels_ that allow Rust code to send data into Hydroflow via the [`source_stream()`](./surface_ops_gen.md#source_stream) operator. +One way to do this is with _channels_ that allow Rust code to send data into DFIR via the [`source_stream()`](./surface_ops_gen.md#source_stream) operator. The code below creates a channel for data of (Rust) type `(usize, usize)`: ```rust,ignore - let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); + let (input_send, input_recv) = dfir_rs::util::unbounded_channel::<(usize, usize)>(); ``` Under the hood this uses [Tokio unbounded channels](https://docs.rs/tokio/latest/tokio/sync/mpsc/fn.unbounded_channel.html). Now in Rust we can now push data into the channel. E.g. for testing we can do @@ -38,7 +38,7 @@ it explicitly as follows: ```rust,ignore input_send.send((0, 1)).unwrap() ``` -And in our Hydroflow syntax we can receive the data from the channel using the [`source_stream()`](./surface_ops_gen.md#source_stream) operator and +And in our DFIR syntax we can receive the data from the channel using the [`source_stream()`](./surface_ops_gen.md#source_stream) operator and pass it along a flow: ```rust,ignore source_stream(input_recv) -> ... @@ -60,12 +60,12 @@ They are fairly straightforward, so the best source for further information is t ### Outputing data synchronously Not all output destinations are asynchronous, in which case we can use `for_each` instead. -The easiest way to output data from Hydroflow is using an [unbounded channel](https://docs.rs/hydroflow/latest/hydroflow/util/fn.unbounded_channel.html). +The easiest way to output data from DFIR is using an [unbounded channel](https://docs.rs/dfir_rs/latest/dfir_rs/util/fn.unbounded_channel.html). Since the channel is unbounded, we can always synchronously write to it using a `for_each` operator: {exampleCodeOutput} -Here we use [`collect_ready`](https://docs.rs/hydroflow/latest/hydroflow/util/fn.collect_ready.html) +Here we use [`collect_ready`](https://docs.rs/dfir_rs/latest/dfir_rs/util/fn.collect_ready.html) as a quick way to validate the output. In a fully functional program you should spin up a separate async task to consume the output from `output_recv` as it arrives. ## Serde: Network Serialization and Deserialization diff --git a/docs/docs/dfir/syntax/surface_embedding.mdx b/docs/docs/dfir/syntax/surface_embedding.mdx new file mode 100644 index 000000000000..4d72246cfcb1 --- /dev/null +++ b/docs/docs/dfir/syntax/surface_embedding.mdx @@ -0,0 +1,15 @@ +--- +sidebar_position: 1 +--- +import CodeBlock from '@theme/CodeBlock'; +import exampleCode from '!!raw-loader!../../../../dfir_rs/examples/example_syntax_empty.rs'; +import { getLines } from '../../../src/util'; + +# Embedding a Flow in Rust +DFIR's surface syntax is typically used within a Rust program. (An interactive client and/or external language bindings are TBD.) + +The surface syntax is embedded into Rust via a macro as follows + +{getLines(exampleCode, 3, 10)} + +The resulting `flow` object is of type [`Dfir`](https://hydro-project.github.io/hydroflow/doc/dfir/scheduled/graph/struct.Dfir.html). diff --git a/docs/docs/hydroflow/syntax/surface_flows.mdx b/docs/docs/dfir/syntax/surface_flows.mdx similarity index 79% rename from docs/docs/hydroflow/syntax/surface_flows.mdx rename to docs/docs/dfir/syntax/surface_flows.mdx index 804c44683f0e..cb91ddcd527d 100644 --- a/docs/docs/hydroflow/syntax/surface_flows.mdx +++ b/docs/docs/dfir/syntax/surface_flows.mdx @@ -2,12 +2,12 @@ sidebar_position: 2 --- import CodeBlock from '@theme/CodeBlock'; -import example1Code from '!!raw-loader!../../../../hydroflow/examples/example_surface_flows_1_basic.rs'; -import example2Code from '!!raw-loader!../../../../hydroflow/examples/example_surface_flows_2_varname.rs'; -import example3Code from '!!raw-loader!../../../../hydroflow/examples/example_surface_flows_3_ports.rs'; -import example3Out from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap'; -import example4Code from '!!raw-loader!../../../../hydroflow/examples/example_surface_flows_4_context.rs'; -import example4Out from '!!raw-loader!../../../../hydroflow/tests/snapshots/surface_examples__example_surface_flows_4_context.snap'; +import example1Code from '!!raw-loader!../../../../dfir_rs/examples/example_surface_flows_1_basic.rs'; +import example2Code from '!!raw-loader!../../../../dfir_rs/examples/example_surface_flows_2_varname.rs'; +import example3Code from '!!raw-loader!../../../../dfir_rs/examples/example_surface_flows_3_ports.rs'; +import example3Out from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_surface_flows_3_ports.snap'; +import example4Code from '!!raw-loader!../../../../dfir_rs/examples/example_surface_flows_4_context.rs'; +import example4Out from '!!raw-loader!../../../../dfir_rs/tests/snapshots/surface_examples__example_surface_flows_4_context.snap'; import { getLines, extractMermaid, extractOutput } from '../../../src/util'; # Flow Syntax @@ -44,7 +44,7 @@ Here is a visualization of the flow that was generated. Note that the outbound l were auto-generated, but the inbound labels to `my_union` were specified by the code above: -Hydroflow compiled this flow into two subgraphs called _compiled components_, connected by _handoffs_. You can ignore +DFIR compiled this flow into two subgraphs called _compiled components_, connected by _handoffs_. You can ignore these details unless you are interested in low-level performance tuning; they are explained in the discussion of [in-out trees](../architecture/in-out_trees.md). ## The `context` object @@ -52,7 +52,7 @@ of [in-out trees](../architecture/in-out_trees.md). Closures inside surface syntax operators have access to a special `context` object which provides access to scheduling, timing, and state APIs. The object is accessible as a shared reference (`&Context`) via the special name `context`. -[Here is the full API documentation for `Context`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/context/struct.Context.html). +[Here is the full API documentation for `Context`](https://hydro-project.github.io/hydroflow/doc/dfir/scheduled/context/struct.Context.html). {getLines(example4Code, 5, 6)} Output: diff --git a/docs/docs/hydroflow/syntax/surface_types.md b/docs/docs/dfir/syntax/surface_types.md similarity index 63% rename from docs/docs/hydroflow/syntax/surface_types.md rename to docs/docs/dfir/syntax/surface_types.md index 6225ec87e39e..74a70466fac8 100644 --- a/docs/docs/hydroflow/syntax/surface_types.md +++ b/docs/docs/dfir/syntax/surface_types.md @@ -2,4 +2,4 @@ sidebar_position: 5 --- -# Hydroflow Types \ No newline at end of file +# DFIR Types \ No newline at end of file diff --git a/docs/docs/hydro/index.mdx b/docs/docs/hydro/index.mdx index e27de9c6d0ae..7fd0bf0748ca 100644 --- a/docs/docs/hydro/index.mdx +++ b/docs/docs/hydro/index.mdx @@ -3,7 +3,7 @@ sidebar_position: 0 --- # Introduction -Hydro is a high-level distributed programming framework for Rust powered by the [Hydroflow runtime](../hydroflow/index.mdx). Unlike traditional architectures such as actors or RPCs, Hydro offers _choreographic_ APIs, where expressions and functions can describe computation that takes place across many locations. It also integrates with [Hydro Deploy](../deploy/index.md) to make it easy to deploy and run Hydro programs to the cloud. +Hydro is a high-level distributed programming framework for Rust powered by the [DFIR runtime](../dfir/index.mdx). Unlike traditional architectures such as actors or RPCs, Hydro offers _choreographic_ APIs, where expressions and functions can describe computation that takes place across many locations. It also integrates with [Hydro Deploy](../deploy/index.md) to make it easy to deploy and run Hydro programs to the cloud. Hydro uses a two-stage compilation approach. Hydro programs are standard Rust programs, which first run on the developer's laptop to generate a _deployment plan_. This plan is then compiled to individual binaries for each machine in the distributed system (enabling zero-overhead abstractions), and are then deployed to the cloud using the generated plan along with specifications of cloud resources. diff --git a/docs/docs/hydroflow/index.mdx b/docs/docs/hydroflow/index.mdx deleted file mode 100644 index 1cf7a673b1de..000000000000 --- a/docs/docs/hydroflow/index.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 1 ---- - -import HydroflowDocs from '../../../hydroflow/README.md' - -# Introduction - - - -## This Book -This book will teach you how to set up your environment to get started with Hydroflow, and how to program in the Hydroflow surface syntax. - -Keep in mind that Hydroflow is under active development. However the code in this book is tested with the Hydroflow library so should always be up-to-date. - -If you have any questions, feel free to [create an issue on Github](https://github.com/hydro-project/hydroflow/issues/new). diff --git a/docs/docs/hydroflow/quickstart/index.md b/docs/docs/hydroflow/quickstart/index.md deleted file mode 100644 index 891b918f04c4..000000000000 --- a/docs/docs/hydroflow/quickstart/index.md +++ /dev/null @@ -1,8 +0,0 @@ -# Quickstart -This section will get you up and running with Rust and Hydroflow, and work you through a set of concrete examples illustrating much of what you need to know to get productive with Hydroflow. - -:::tip - -Hydroflow is the low-level IR that forms the foundation of the Hydro stack. If you're looking for a higher-level API, check out [Hydro](../../hydro/index.mdx). - -::: diff --git a/docs/docs/hydroflow/syntax/surface_embedding.mdx b/docs/docs/hydroflow/syntax/surface_embedding.mdx deleted file mode 100644 index 6c88f12b3473..000000000000 --- a/docs/docs/hydroflow/syntax/surface_embedding.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -sidebar_position: 1 ---- -import CodeBlock from '@theme/CodeBlock'; -import exampleCode from '!!raw-loader!../../../../hydroflow/examples/example_syntax_empty.rs'; -import { getLines } from '../../../src/util'; - -# Embedding a Flow in Rust -Hydroflow's surface syntax is typically used within a Rust program. (An interactive client and/or external language bindings are TBD.) - -The surface syntax is embedded into Rust via a macro as follows - -{getLines(exampleCode, 3, 10)} - -The resulting `flow` object is of type [`Hydroflow`](https://hydro-project.github.io/hydroflow/doc/hydroflow/scheduled/graph/struct.Hydroflow.html). diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index ac5fe7fa8e47..dcd00f4f7a04 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -120,7 +120,7 @@ const config = { items: [ { type: 'docSidebar', - sidebarId: 'hydroflowSidebar', + sidebarId: 'dfirSidebar', label: 'Hydroflow', }, { @@ -169,8 +169,8 @@ const config = { title: 'Docs', items: [ { - label: 'Hydroflow', - to: '/docs/hydroflow/', + label: 'DFIR', + to: '/docs/dfir/', }, { label: 'Hydro', diff --git a/docs/sidebars.js b/docs/sidebars.js index 042939c241cb..60536092ef8a 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -14,7 +14,7 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { // By default, Docusaurus generates a sidebar from the docs folder structure - hydroflowSidebar: [{type: 'autogenerated', dirName: 'hydroflow'}], + dfirSidebar: [{type: 'autogenerated', dirName: 'dfir'}], hydroSidebar: [{type: 'autogenerated', dirName: 'hydro'}], deploySidebar: [{type: 'autogenerated', dirName: 'deploy'}], }; diff --git a/docs/src/pages/playground.js b/docs/src/pages/playground.js index fdff5ddcd479..d81f30d22156 100644 --- a/docs/src/pages/playground.js +++ b/docs/src/pages/playground.js @@ -10,11 +10,11 @@ import siteConfig from '@generated/docusaurus.config'; import * as wasm from "website_playground/website_playground_bg.wasm"; import * as playgroundJS from "website_playground/website_playground_bg.js"; -let compile_hydroflow = null; +let compile_DFIR = null; let compile_datalog = null; if (siteConfig.customFields.LOAD_PLAYGROUND === '1') { - compile_hydroflow = playgroundJS.compile_hydroflow; + compile_DFIR = playgroundJS.compile_dfir; compile_datalog = playgroundJS.compile_datalog; if (ExecutionEnvironment.canUseDOM) { @@ -51,13 +51,13 @@ function MermaidGraph({ id, source }) { }} dangerouslySetInnerHTML={svg}>; } -const hydroflowExamples = { +const DFIRExamples = { "Simplest": `\ -// https://hydro.run/docs/hydroflow/quickstart/example_1_simplest +// https://hydro.run/docs/dfir/quickstart/example_1_simplest source_iter(0..10) -> for_each(|n| println!("Hello {}", n));`, "Simple": `\ -// https://hydro.run/docs/hydroflow/quickstart/example_2_simple +// https://hydro.run/docs/dfir/quickstart/example_2_simple source_iter(0..10) -> map(|n| n * n) -> filter(|n| *n > 10) @@ -115,7 +115,7 @@ inbound_chan[acks] -> [1]msg_send; inbound_chan[msgs] -> for_each(pretty_print_msg);`, "Graph Neighbors": `\ -// https://hydro.run/docs/hydroflow/quickstart/example_4_neighbors +// https://hydro.run/docs/dfir/quickstart/example_4_neighbors // inputs: the origin vertex (vertex 0) and stream of input edges origin = source_iter(vec![0]); stream_of_edges = source_stream(edges_recv); @@ -127,7 +127,7 @@ stream_of_edges -> [1]my_join; my_join -> unique() -> for_each(|n| println!("Reached: {}", n));`, "Graph Reachability": `\ -// https://hydro.run/docs/hydroflow/quickstart/example_5_reachability +// https://hydro.run/docs/dfir/quickstart/example_5_reachability // inputs: the origin vertex (vertex 0) and stream of input edges origin = source_iter(vec![0]); stream_of_edges = source_stream(edges_recv); @@ -142,7 +142,7 @@ my_join_tee[0] -> [1]reached_vertices; my_join_tee[1] -> unique() -> for_each(|x| println!("Reached: {}", x));`, "Graph Un-Reachability": `\ -// https://hydro.run/docs/hydroflow/quickstart/example_6_unreachability +// https://hydro.run/docs/dfir/quickstart/example_6_unreachability origin = source_iter(vec![0]); stream_of_edges = source_stream(pairs_recv) -> tee(); reached_vertices = union()->tee(); @@ -177,8 +177,8 @@ reachable(x) :- seed_reachable(x) reachable(y) :- reachable(x), edges(x, y)` }; -export function HydroflowSurfaceDemo() { - return +export function DFIRSurfaceDemo() { + return } export function DatalogDemo() { return @@ -216,7 +216,7 @@ export function EditorDemo({ compileFn, examples, mermaidId }) { useEffect(() => { if (editorAndMonaco) { const { editor, monaco } = editorAndMonaco; - monaco.editor.setModelMarkers(editor.getModel(), "hydroflow", diagnostics.map(d => { + monaco.editor.setModelMarkers(editor.getModel(), "dfir_rs", diagnostics.map(d => { return { startLineNumber: d.span.start.line, startColumn: d.span.start.column + 1, @@ -322,11 +322,11 @@ export default function Playground() {

Playground

-

In these interactive editors, you can experiment with the Hydroflow compiler by running it in your browser (through WebAssembly)! Try selecting one of the templates or edit the code yourself to see how Hydroflow logic is compiled into a dataflow graph and executable Rust.

+

In these interactive editors, you can experiment with the DFIR compiler by running it in your browser (through WebAssembly)! Try selecting one of the templates or edit the code yourself to see how DFIR logic is compiled into a dataflow graph and executable Rust.

Hydroflow

- + }}>DFIR +

Datalog

diff --git a/docs/src/pages/research.js b/docs/src/pages/research.js index 5270d26891d3..f7f7afa46be5 100644 --- a/docs/src/pages/research.js +++ b/docs/src/pages/research.js @@ -135,12 +135,12 @@ const papers = [ }, { title: "Hydroflow: A Model and Runtime for Distributed Systems Programming", - pdf: "pathname:///papers/hydroflow-thesis.pdf", + pdf: "pathname:///papers/dfir_rs-thesis.pdf", thumb: require("./img/papers/hydroflow-thesis.png"), authors: <>Mingwei Samuel, Alvin Cheung, Joseph M. Hellerstein, description: [ - <>In this paper we present our ongoing work on Hydroflow, a new cloud programming model used to create constructively correct distributed systems. The model is a refinement and unification of the existing dataflow and reactive programming models., - <>Hydroflow is primarily a low-level compilation target for future declarative cloud programming languages, but developers can use it directly to precisely control program execution or fine-tune and debug compiled programs. + <>In this paper we present our ongoing work on DFIR, a new cloud programming model used to create constructively correct distributed systems. The model is a refinement and unification of the existing dataflow and reactive programming models., + <>DFIR is primarily a low-level compilation target for future declarative cloud programming languages, but developers can use it directly to precisely control program execution or fine-tune and debug compiled programs. ], conf: "UC Berkeley Technical Report", links: <>PDF / GitHub diff --git a/hydro_deploy/hydro_cli_examples/Cargo.toml b/hydro_deploy/hydro_cli_examples/Cargo.toml index 09dc6d182e2c..447ab4af719a 100644 --- a/hydro_deploy/hydro_cli_examples/Cargo.toml +++ b/hydro_deploy/hydro_cli_examples/Cargo.toml @@ -38,8 +38,8 @@ name = "dedalus_2pc_participant" name = "ws_chat_server" [dev-dependencies] -hydroflow = { path = "../../hydroflow", features = [ "deploy_integration" ] } -hydroflow_datalog = { path = "../../hydroflow_datalog" } +dfir_rs = { path = "../../dfir_rs", features = [ "deploy_integration" ] } +dfir_datalog = { path = "../../dfir_datalog" } tokio = { version = "1.29.0", features = [ "full" ] } serde = { version = "1.0.197", features = ["rc"] } diff --git a/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_coordinator/main.rs b/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_coordinator/main.rs index 57eff93ca75f..444ddd657229 100644 --- a/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_coordinator/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_coordinator/main.rs @@ -1,10 +1,10 @@ -use hydroflow::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; -use hydroflow_datalog::datalog; +use dfir_datalog::datalog; +use dfir_rs::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let vote_to_participant_port = ports .port("vote_to_participant") .connect::>() diff --git a/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_participant/main.rs b/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_participant/main.rs index 97a806db7c9d..1b8609093934 100644 --- a/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_participant/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/dedalus_2pc_participant/main.rs @@ -1,10 +1,10 @@ -use hydroflow::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; -use hydroflow_datalog::datalog; +use dfir_datalog::datalog; +use dfir_rs::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let vote_to_participant_source = ports .port("vote_to_participant") .connect::() diff --git a/hydro_deploy/hydro_cli_examples/examples/dedalus_receiver/main.rs b/hydro_deploy/hydro_cli_examples/examples/dedalus_receiver/main.rs index ae37b42e8b71..84161a757cbb 100644 --- a/hydro_deploy/hydro_cli_examples/examples/dedalus_receiver/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/dedalus_receiver/main.rs @@ -1,10 +1,10 @@ -use hydroflow::util::deploy::{ConnectedDirect, ConnectedSource}; -use hydroflow::util::deserialize_from_bytes; -use hydroflow_datalog::datalog; +use dfir_datalog::datalog; +use dfir_rs::util::deploy::{ConnectedDirect, ConnectedSource}; +use dfir_rs::util::deserialize_from_bytes; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let broadcast_recv = ports .port("broadcast") .connect::() @@ -20,5 +20,5 @@ async fn main() { "# ); - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; } diff --git a/hydro_deploy/hydro_cli_examples/examples/dedalus_sender/main.rs b/hydro_deploy/hydro_cli_examples/examples/dedalus_sender/main.rs index b9e2c9d43f26..360673e692ce 100644 --- a/hydro_deploy/hydro_cli_examples/examples/dedalus_sender/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/dedalus_sender/main.rs @@ -1,11 +1,11 @@ -use hydroflow::tokio_stream::wrappers::IntervalStream; -use hydroflow::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink}; -use hydroflow::util::serialize_to_bytes; -use hydroflow_datalog::datalog; +use dfir_datalog::datalog; +use dfir_rs::tokio_stream::wrappers::IntervalStream; +use dfir_rs::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink}; +use dfir_rs::util::serialize_to_bytes; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let broadcast_port = ports .port("broadcast") .connect::>() @@ -32,5 +32,5 @@ async fn main() { "# ); - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; } diff --git a/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_leader/main.rs b/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_leader/main.rs index 7e21656bba5e..539a8ff067d3 100644 --- a/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_leader/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_leader/main.rs @@ -1,10 +1,10 @@ -use hydroflow::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; -use hydroflow_datalog::datalog; +use dfir_datalog::datalog; +use dfir_rs::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let to_replica_port = ports .port("to_replica") .connect::>() diff --git a/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_participant/main.rs b/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_participant/main.rs index eaa142a39945..efad12d566c3 100644 --- a/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_participant/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/dedalus_vote_participant/main.rs @@ -1,10 +1,10 @@ -use hydroflow::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; -use hydroflow_datalog::datalog; +use dfir_datalog::datalog; +use dfir_rs::util::deploy::{ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let to_replica_source = ports .port("to_replica") .connect::() diff --git a/hydro_deploy/hydro_cli_examples/examples/empty_program/main.rs b/hydro_deploy/hydro_cli_examples/examples/empty_program/main.rs index 19f3e1f285af..e1723d71937b 100644 --- a/hydro_deploy/hydro_cli_examples/examples/empty_program/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/empty_program/main.rs @@ -1,6 +1,6 @@ -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let _ = hydroflow::util::deploy::init::<()>().await; + let _ = dfir_rs::util::deploy::init::<()>().await; loop { tokio::time::sleep(std::time::Duration::from_secs(1)).await; } diff --git a/hydro_deploy/hydro_cli_examples/examples/panic_program/main.rs b/hydro_deploy/hydro_cli_examples/examples/panic_program/main.rs index 3b57b0680932..f99267ccfecf 100644 --- a/hydro_deploy/hydro_cli_examples/examples/panic_program/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/panic_program/main.rs @@ -1,8 +1,8 @@ use std::io::Write; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let _ = hydroflow::util::deploy::init::<()>().await; + let _ = dfir_rs::util::deploy::init::<()>().await; println!("hello!"); std::io::stdout().flush().unwrap(); 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..1bf0abc7427d 100644 --- a/hydro_deploy/hydro_cli_examples/examples/stdout_receiver/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/stdout_receiver/main.rs @@ -1,20 +1,20 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::deploy::{ConnectedDirect, ConnectedSource}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::deploy::{ConnectedDirect, ConnectedSource}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let echo_recv = ports .port("echo") .connect::() .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)); }; - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; } 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..89c1706707d4 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,16 +1,16 @@ -use hydroflow::hydroflow_syntax; -use hydroflow::util::deploy::{ConnectedDirect, ConnectedSource, ConnectedTagged}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::deploy::{ConnectedDirect, ConnectedSource, ConnectedTagged}; -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let echo_recv = ports .port("echo") .connect::>() .await .into_source(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { source_stream(echo_recv) -> map(|x| { let x = x.unwrap(); @@ -19,5 +19,5 @@ async fn main() { for_each(|x| println!("echo {:?}", x)); }; - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; } 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..9cb84bc72054 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,7 +1,7 @@ -use hydroflow::compiled::pull::HalfMultisetJoinState; -use hydroflow::hydroflow_syntax; -use hydroflow::util::deploy::{ConnectedSink, ConnectedSource}; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; +use dfir_rs::compiled::pull::HalfMultisetJoinState; +use dfir_rs::dfir_syntax; +use dfir_rs::util::deploy::{ConnectedSink, ConnectedSource}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; use serde::{Deserialize, Serialize}; use tokio::net::TcpListener; @@ -27,19 +27,19 @@ struct ChatMessage { text: String, } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let from_peer = ports .port("from_peer") - .connect::() + .connect::() .await .into_source(); let to_peer = ports .port("to_peer") - .connect::>() + .connect::>() .await .into_sink(); @@ -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 @@ -116,5 +116,5 @@ async fn main() { all_messages -> [1]broadcast_clients; }; - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; } diff --git a/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/util.rs b/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/util.rs index db577c59dada..09c3294f9d66 100644 --- a/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/util.rs +++ b/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/util.rs @@ -1,10 +1,10 @@ use std::collections::HashMap; use std::sync::Arc; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; use futures::channel::mpsc::UnboundedSender; use futures::stream::SplitSink; use futures::{SinkExt, StreamExt}; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; use tokio::net::TcpListener; use tokio_tungstenite::tungstenite::Message; @@ -16,11 +16,11 @@ pub(crate) async fn ws_server( UnboundedReceiverStream<(usize, String)>, UnboundedSender<(usize, String)>, ) { - let (clients_send, clients_connect) = hydroflow::util::unbounded_channel(); - let (client_disconnect_send, clients_disconnect) = hydroflow::util::unbounded_channel(); + let (clients_send, clients_connect) = dfir_rs::util::unbounded_channel(); + let (client_disconnect_send, clients_disconnect) = dfir_rs::util::unbounded_channel(); let (received_messages_send, from_client) = - hydroflow::util::unbounded_channel::<(usize, String)>(); + dfir_rs::util::unbounded_channel::<(usize, String)>(); let recipients = Arc::new(tokio::sync::Mutex::new(HashMap::< usize, SplitSink<_, Message>, diff --git a/hydro_lang/Cargo.toml b/hydro_lang/Cargo.toml index 1b7dc91baf5e..760109ff526a 100644 --- a/hydro_lang/Cargo.toml +++ b/hydro_lang/Cargo.toml @@ -17,13 +17,13 @@ path = "src/lib.rs" default = [] stageleft_devel = [] deploy = [ "build", "dep:hydro_deploy", "dep:trybuild-internals-api", "dep:toml", "dep:prettyplease", "dep:sha2", "dep:stageleft_tool", "dep:nameof" ] -build = [ "dep:hydroflow_lang" ] +build = [ "dep:dfir_lang" ] [dependencies] bincode = "1.3.1" hydro_deploy = { path = "../hydro_deploy/core", version = "^0.10.0", optional = true } -hydroflow = { path = "../hydroflow", version = "^0.10.0", default-features = false, features = ["deploy_integration"] } -hydroflow_lang = { path = "../hydroflow_lang", version = "^0.10.0", optional = true } +dfir_rs = { path = "../dfir_rs", version = "^0.10.0", default-features = false, features = ["deploy_integration"] } +dfir_lang = { path = "../dfir_lang", version = "^0.10.0", optional = true } match_box = "0.0.2" nameof = { version = "1.0.0", optional = true } prettyplease = { version = "0.2.0", features = [ "verbatim" ], optional = true } diff --git a/hydro_lang/src/builder/built.rs b/hydro_lang/src/builder/built.rs index 9f7c37207b23..e9a8bdca3f93 100644 --- a/hydro_lang/src/builder/built.rs +++ b/hydro_lang/src/builder/built.rs @@ -1,7 +1,7 @@ use std::collections::{BTreeMap, HashMap}; use std::marker::PhantomData; -use hydroflow_lang::graph::{eliminate_extra_unions_tees, HydroflowGraph}; +use dfir_lang::graph::{eliminate_extra_unions_tees, DfirGraph}; use super::compiled::CompiledFlow; use super::deploy::{DeployFlow, DeployResult}; @@ -27,7 +27,7 @@ impl Drop for BuiltFlow<'_> { } } -pub(crate) fn build_inner(ir: &mut Vec) -> BTreeMap { +pub(crate) fn build_inner(ir: &mut Vec) -> BTreeMap { let mut builders = BTreeMap::new(); let mut built_tees = HashMap::new(); let mut next_stmt_id = 0; diff --git a/hydro_lang/src/builder/compiled.rs b/hydro_lang/src/builder/compiled.rs index 57467799498b..d47106bf8f95 100644 --- a/hydro_lang/src/builder/compiled.rs +++ b/hydro_lang/src/builder/compiled.rs @@ -1,8 +1,8 @@ use std::collections::BTreeMap; use std::marker::PhantomData; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow_lang::graph::{partition_graph, HydroflowGraph}; +use dfir_lang::graph::{partition_graph, DfirGraph}; +use dfir_rs::scheduled::graph::Dfir; use proc_macro2::TokenStream; use quote::quote; use stageleft::runtime_support::FreeVariableWithContext; @@ -11,17 +11,17 @@ use stageleft::QuotedWithContext; use crate::staging_util::Invariant; pub struct CompiledFlow<'a, ID> { - pub(super) hydroflow_ir: BTreeMap, + pub(super) hydroflow_ir: BTreeMap, pub(super) extra_stmts: BTreeMap>, pub(super) _phantom: Invariant<'a, ID>, } impl CompiledFlow<'_, ID> { - pub fn hydroflow_ir(&self) -> &BTreeMap { + pub fn hydroflow_ir(&self) -> &BTreeMap { &self.hydroflow_ir } - pub fn take_ir(self) -> BTreeMap { + pub fn take_ir(self) -> BTreeMap { self.hydroflow_ir } } @@ -34,10 +34,10 @@ impl<'a> CompiledFlow<'a, usize> { let hydroflow_crate = proc_macro_crate::crate_name("hydro_lang") .expect("hydro_lang should be present in `Cargo.toml`"); let root = match hydroflow_crate { - proc_macro_crate::FoundCrate::Itself => quote! { hydro_lang::hydroflow }, + proc_macro_crate::FoundCrate::Itself => quote! { hydro_lang::dfir_rs }, proc_macro_crate::FoundCrate::Name(name) => { let ident = syn::Ident::new(&name, proc_macro2::Span::call_site()); - quote! { #ident::hydroflow } + quote! { #ident::dfir_rs } } }; @@ -85,19 +85,19 @@ impl<'a> CompiledFlow<'a, usize> { } } -impl<'a, Ctx> QuotedWithContext<'a, Hydroflow<'a>, Ctx> for CompiledFlow<'a, ()> {} +impl<'a, Ctx> QuotedWithContext<'a, Dfir<'a>, Ctx> for CompiledFlow<'a, ()> {} impl<'a, Ctx> FreeVariableWithContext for CompiledFlow<'a, ()> { - type O = Hydroflow<'a>; + type O = Dfir<'a>; fn to_tokens(mut self, _ctx: &Ctx) -> (Option, Option) { let hydroflow_crate = proc_macro_crate::crate_name("hydro_lang") .expect("hydro_lang should be present in `Cargo.toml`"); let root = match hydroflow_crate { - proc_macro_crate::FoundCrate::Itself => quote! { hydro_lang::hydroflow }, + proc_macro_crate::FoundCrate::Itself => quote! { hydro_lang::dfir_rs }, proc_macro_crate::FoundCrate::Name(name) => { let ident = syn::Ident::new(&name, proc_macro2::Span::call_site()); - quote! { #ident::hydroflow } + quote! { #ident::dfir_rs } } }; @@ -121,10 +121,10 @@ pub struct CompiledFlowWithId<'a> { _phantom: Invariant<'a>, } -impl<'a, Ctx> QuotedWithContext<'a, Hydroflow<'a>, Ctx> for CompiledFlowWithId<'a> {} +impl<'a, Ctx> QuotedWithContext<'a, Dfir<'a>, Ctx> for CompiledFlowWithId<'a> {} impl<'a, Ctx> FreeVariableWithContext for CompiledFlowWithId<'a> { - type O = Hydroflow<'a>; + type O = Dfir<'a>; fn to_tokens(self, _ctx: &Ctx) -> (Option, Option) { (None, Some(self.tokens)) diff --git a/hydro_lang/src/builder/deploy.rs b/hydro_lang/src/builder/deploy.rs index db11d7bcdd90..448c739ccf32 100644 --- a/hydro_lang/src/builder/deploy.rs +++ b/hydro_lang/src/builder/deploy.rs @@ -3,8 +3,8 @@ use std::io::Error; use std::marker::PhantomData; use std::pin::Pin; -use hydroflow::bytes::Bytes; -use hydroflow::futures::{Sink, Stream}; +use dfir_rs::bytes::Bytes; +use dfir_rs::futures::{Sink, Stream}; use proc_macro2::Span; use serde::de::DeserializeOwned; use serde::Serialize; diff --git a/hydro_lang/src/deploy/deploy_graph.rs b/hydro_lang/src/deploy/deploy_graph.rs index 60423153c23b..3ef6aee4733c 100644 --- a/hydro_lang/src/deploy/deploy_graph.rs +++ b/hydro_lang/src/deploy/deploy_graph.rs @@ -6,6 +6,10 @@ use std::pin::Pin; use std::rc::Rc; use std::sync::Arc; +use dfir_lang::graph::DfirGraph; +use dfir_rs::bytes::Bytes; +use dfir_rs::futures::{Sink, SinkExt, Stream, StreamExt}; +use dfir_rs::util::deploy::{ConnectedSink, ConnectedSource}; use hydro_deploy::custom_service::CustomClientPort; use hydro_deploy::hydroflow_crate::ports::{ DemuxSink, HydroflowSink, HydroflowSource, TaggedSource, @@ -13,10 +17,6 @@ use hydro_deploy::hydroflow_crate::ports::{ use hydro_deploy::hydroflow_crate::tracing_options::TracingOptions; use hydro_deploy::hydroflow_crate::HydroflowCrateService; use hydro_deploy::{CustomService, Deployment, Host, HydroflowCrate}; -use hydroflow::bytes::Bytes; -use hydroflow::futures::{Sink, SinkExt, Stream, StreamExt}; -use hydroflow::util::deploy::{ConnectedSink, ConnectedSource}; -use hydroflow_lang::graph::HydroflowGraph; use nameof::name_of; use serde::de::DeserializeOwned; use serde::Serialize; @@ -596,7 +596,7 @@ impl Node for DeployExternal { &self, env: &mut Self::InstantiateEnv, _meta: &mut Self::Meta, - _graph: HydroflowGraph, + _graph: DfirGraph, _extra_stmts: Vec, ) { let service = env.CustomService(self.host.clone(), vec![]); @@ -675,7 +675,7 @@ impl Node for DeployNode { &self, env: &mut Self::InstantiateEnv, _meta: &mut Self::Meta, - graph: HydroflowGraph, + graph: DfirGraph, extra_stmts: Vec, ) { let service = match self.service_spec.borrow_mut().take().unwrap() { @@ -733,7 +733,7 @@ impl Node for DeployCluster { &self, env: &mut Self::InstantiateEnv, meta: &mut Self::Meta, - graph: HydroflowGraph, + graph: DfirGraph, extra_stmts: Vec, ) { let has_trybuild = self diff --git a/hydro_lang/src/deploy/in_memory_graph.rs b/hydro_lang/src/deploy/in_memory_graph.rs index aeee8233c8cf..e9af6c9f9bc8 100644 --- a/hydro_lang/src/deploy/in_memory_graph.rs +++ b/hydro_lang/src/deploy/in_memory_graph.rs @@ -1,4 +1,4 @@ -use hydroflow_lang::graph::HydroflowGraph; +use dfir_lang::graph::DfirGraph; use super::{LocalDeploy, Node, ProcessSpec}; @@ -48,7 +48,7 @@ impl Node for SingleNode { &self, _env: &mut Self::InstantiateEnv, _meta: &mut Self::Meta, - _graph: HydroflowGraph, + _graph: DfirGraph, _extra_stmts: Vec, ) { } @@ -100,7 +100,7 @@ impl Node for MultiNode { &self, _env: &mut Self::InstantiateEnv, _meta: &mut Self::Meta, - _graph: HydroflowGraph, + _graph: DfirGraph, _extra_stmts: Vec, ) { } diff --git a/hydro_lang/src/deploy/macro_runtime.rs b/hydro_lang/src/deploy/macro_runtime.rs index a61b417b9da8..0cd134b46bd1 100644 --- a/hydro_lang/src/deploy/macro_runtime.rs +++ b/hydro_lang/src/deploy/macro_runtime.rs @@ -3,10 +3,10 @@ use std::future::Future; use std::pin::Pin; use std::rc::Rc; -use hydroflow::bytes::Bytes; -use hydroflow::futures::{Sink, Stream}; -use hydroflow::util::deploy::DeployPorts; -use hydroflow_lang::graph::HydroflowGraph; +use dfir_lang::graph::DfirGraph; +use dfir_rs::bytes::Bytes; +use dfir_rs::futures::{Sink, Stream}; +use dfir_rs::util::deploy::DeployPorts; use stageleft::{QuotedWithContext, RuntimeData}; use crate::deploy::{ClusterSpec, Deploy, ExternalSpec, Node, ProcessSpec, RegisterPort}; @@ -255,7 +255,7 @@ impl Node for DeployRuntimeNode { &self, _env: &mut Self::InstantiateEnv, _meta: &mut Self::Meta, - _graph: HydroflowGraph, + _graph: DfirGraph, _extra_stmts: Vec, ) { panic!(".deploy() cannot be called on a DeployRuntimeNode"); @@ -284,7 +284,7 @@ impl Node for DeployRuntimeCluster { &self, _env: &mut Self::InstantiateEnv, _meta: &mut Self::Meta, - _graph: HydroflowGraph, + _graph: DfirGraph, _extra_stmts: Vec, ) { panic!(".deploy() cannot be called on a DeployRuntimeCluster"); diff --git a/hydro_lang/src/deploy/mod.rs b/hydro_lang/src/deploy/mod.rs index 028524ba0888..cd19b556243a 100644 --- a/hydro_lang/src/deploy/mod.rs +++ b/hydro_lang/src/deploy/mod.rs @@ -2,9 +2,9 @@ use std::future::Future; use std::io::Error; use std::pin::Pin; -use hydroflow::bytes::Bytes; -use hydroflow::futures::{Sink, Stream}; -use hydroflow_lang::graph::HydroflowGraph; +use dfir_lang::graph::DfirGraph; +use dfir_rs::bytes::Bytes; +use dfir_rs::futures::{Sink, Stream}; use serde::de::DeserializeOwned; use serde::Serialize; use stageleft::QuotedWithContext; @@ -240,7 +240,7 @@ pub trait Node { &self, env: &mut Self::InstantiateEnv, meta: &mut Self::Meta, - graph: HydroflowGraph, + graph: DfirGraph, extra_stmts: Vec, ); } diff --git a/hydro_lang/src/deploy/trybuild.rs b/hydro_lang/src/deploy/trybuild.rs index 2a725a322614..a79f0c9118ae 100644 --- a/hydro_lang/src/deploy/trybuild.rs +++ b/hydro_lang/src/deploy/trybuild.rs @@ -1,7 +1,7 @@ use std::fs; use std::path::PathBuf; -use hydroflow_lang::graph::{partition_graph, HydroflowGraph}; +use dfir_lang::graph::{partition_graph, DfirGraph}; use sha2::{Digest, Sha256}; use stageleft::internal::quote; use syn::visit_mut::VisitMut; @@ -30,7 +30,7 @@ fn clean_name_hint(name_hint: &str) -> String { } pub fn create_graph_trybuild( - graph: HydroflowGraph, + graph: DfirGraph, extra_stmts: Vec, name_hint: &Option, ) -> (String, (PathBuf, PathBuf, Option>)) { @@ -88,12 +88,12 @@ pub fn create_graph_trybuild( (bin_name, trybuild_created) } -pub fn compile_graph_trybuild(graph: HydroflowGraph, extra_stmts: Vec) -> syn::File { +pub fn compile_graph_trybuild(graph: DfirGraph, extra_stmts: Vec) -> syn::File { let partitioned_graph = partition_graph(graph).expect("Failed to partition (cycle detected)."); let mut diagnostics = Vec::new(); let tokens = partitioned_graph.as_code( - "e! { hydro_lang::hydroflow }, + "e! { hydro_lang::dfir_rs }, true, quote!(), &mut diagnostics, @@ -104,17 +104,17 @@ pub fn compile_graph_trybuild(graph: HydroflowGraph, extra_stmts: Vec use hydro_lang::*; #[allow(unused)] - fn __hydro_runtime<'a>(__hydro_lang_trybuild_cli: &'a hydro_lang::hydroflow::util::deploy::DeployPorts) -> hydro_lang::hydroflow::scheduled::graph::Hydroflow<'a> { + fn __hydro_runtime<'a>(__hydro_lang_trybuild_cli: &'a hydro_lang::dfir_rs::util::deploy::DeployPorts) -> hydro_lang::dfir_rs::scheduled::graph::Dfir<'a> { #(#extra_stmts)* #tokens } #[tokio::main] async fn main() { - let ports = hydro_lang::hydroflow::util::deploy::init_no_ack_start().await; + let ports = hydro_lang::dfir_rs::util::deploy::init_no_ack_start().await; let flow = __hydro_runtime(&ports); println!("ack start"); - hydro_lang::hydroflow::util::deploy::launch_flow(flow).await; + hydro_lang::dfir_rs::util::deploy::launch_flow(flow).await; } }; source_ast diff --git a/hydro_lang/src/deploy_runtime.rs b/hydro_lang/src/deploy_runtime.rs index 14b383c42d03..ce5b08eb95a5 100644 --- a/hydro_lang/src/deploy_runtime.rs +++ b/hydro_lang/src/deploy_runtime.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use hydroflow::util::deploy::{ +use dfir_rs::util::deploy::{ ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource, ConnectedTagged, DeployPorts, }; use serde::{Deserialize, Serialize}; diff --git a/hydro_lang/src/ir.rs b/hydro_lang/src/ir.rs index a0e20bd678fa..b1a68f19960b 100644 --- a/hydro_lang/src/ir.rs +++ b/hydro_lang/src/ir.rs @@ -8,7 +8,7 @@ use std::ops::Deref; use std::rc::Rc; #[cfg(feature = "build")] -use hydroflow_lang::graph::FlatGraphBuilder; +use dfir_lang::graph::FlatGraphBuilder; #[cfg(feature = "build")] use proc_macro2::Span; use proc_macro2::TokenStream; diff --git a/hydro_lang/src/lib.rs b/hydro_lang/src/lib.rs index 9512e4389cf8..67ad1133827b 100644 --- a/hydro_lang/src/lib.rs +++ b/hydro_lang/src/lib.rs @@ -1,6 +1,6 @@ stageleft::stageleft_no_entry_crate!(); -pub use hydroflow; +pub use dfir_rs; pub use stageleft::q; #[doc(hidden)] diff --git a/hydro_lang/src/location/external_process.rs b/hydro_lang/src/location/external_process.rs index 4cc5db7b5bab..926e38de670e 100644 --- a/hydro_lang/src/location/external_process.rs +++ b/hydro_lang/src/location/external_process.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use hydroflow::bytes::Bytes; +use dfir_rs::bytes::Bytes; use serde::de::DeserializeOwned; use serde::Serialize; diff --git a/hydro_lang/src/location/mod.rs b/hydro_lang/src/location/mod.rs index 7745b20fca2f..8b91d1d81e17 100644 --- a/hydro_lang/src/location/mod.rs +++ b/hydro_lang/src/location/mod.rs @@ -2,8 +2,8 @@ use std::fmt::Debug; use std::marker::PhantomData; use std::time::Duration; -use hydroflow::futures::stream::Stream as FuturesStream; -use hydroflow::{tokio, tokio_stream}; +use dfir_rs::futures::stream::Stream as FuturesStream; +use dfir_rs::{tokio, tokio_stream}; use proc_macro2::Span; use stageleft::{q, QuotedWithContext}; diff --git a/hydro_lang/src/rewrites/profiler.rs b/hydro_lang/src/rewrites/profiler.rs index e25b815b4a59..8e2b01a0839c 100644 --- a/hydro_lang/src/rewrites/profiler.rs +++ b/hydro_lang/src/rewrites/profiler.rs @@ -1,6 +1,6 @@ use std::cell::RefCell; -use hydroflow::futures::channel::mpsc::UnboundedSender; +use dfir_rs::futures::channel::mpsc::UnboundedSender; use stageleft::*; use super::profiler as myself; // TODO(shadaj): stageleft does not support `self::...` diff --git a/hydro_lang/src/rewrites/properties.rs b/hydro_lang/src/rewrites/properties.rs index 54c9334b3c73..e6516d0ef87a 100644 --- a/hydro_lang/src/rewrites/properties.rs +++ b/hydro_lang/src/rewrites/properties.rs @@ -20,7 +20,7 @@ pub struct PropertyDatabase { commutative: HashSet, } -/// Allows us to convert the hydroflow datatype for folds to a binary operation for the algebra +/// Allows us to convert the dfir datatype for folds to a binary operation for the algebra /// property tests. #[allow(clippy::allow_attributes, dead_code, reason = "staged programming")] fn convert_hf_to_binary(f: F) -> impl Fn(I, I) -> A { diff --git a/hydro_lang/src/runtime_context.rs b/hydro_lang/src/runtime_context.rs index 8fe289c252ea..836cc76ed4a8 100644 --- a/hydro_lang/src/runtime_context.rs +++ b/hydro_lang/src/runtime_context.rs @@ -1,4 +1,4 @@ -use hydroflow::scheduled::context::Context; +use dfir_rs::scheduled::context::Context; use proc_macro2::TokenStream; use quote::quote; use stageleft::runtime_support::FreeVariableWithContext; @@ -22,8 +22,8 @@ impl<'a, L: Location<'a>> FreeVariableWithContext for RuntimeContext<'a> { #[cfg(test)] mod tests { + use dfir_rs::futures::StreamExt; use hydro_deploy::Deployment; - use hydroflow::futures::StreamExt; use crate::*; diff --git a/hydro_lang/src/stream.rs b/hydro_lang/src/stream.rs index 8d8e7b04bb17..6a29fec9405a 100644 --- a/hydro_lang/src/stream.rs +++ b/hydro_lang/src/stream.rs @@ -4,8 +4,8 @@ use std::marker::PhantomData; use std::ops::Deref; use std::rc::Rc; -use hydroflow::bytes::Bytes; -use hydroflow::futures; +use dfir_rs::bytes::Bytes; +use dfir_rs::futures; use serde::de::DeserializeOwned; use serde::Serialize; use stageleft::{q, IntoQuotedMut, QuotedWithContext}; @@ -1328,8 +1328,8 @@ impl<'a, T, L: Location<'a> + NoTick, B> Stream { #[cfg(test)] mod tests { + use dfir_rs::futures::StreamExt; use hydro_deploy::Deployment; - use hydroflow::futures::StreamExt; use serde::{Deserialize, Serialize}; use stageleft::q; diff --git a/hydro_lang/tests/compile-fail/send_bincode_lifetime.rs b/hydro_lang/tests/compile-fail/send_bincode_lifetime.rs index b5c05d3bb06a..21d2d27e07c9 100644 --- a/hydro_lang/tests/compile-fail/send_bincode_lifetime.rs +++ b/hydro_lang/tests/compile-fail/send_bincode_lifetime.rs @@ -1,4 +1,4 @@ -use hydroflow_lang::*; +use dfir_lang::*; struct P1 {} struct P2 {} diff --git a/hydro_lang/tests/compile-fail/send_bincode_lifetime.stderr b/hydro_lang/tests/compile-fail/send_bincode_lifetime.stderr index 33da7df0151e..41b787cc04a5 100644 --- a/hydro_lang/tests/compile-fail/send_bincode_lifetime.stderr +++ b/hydro_lang/tests/compile-fail/send_bincode_lifetime.stderr @@ -46,10 +46,10 @@ help: consider importing this struct 1 + use hydro_lang::Process; | -warning: unused import: `hydroflow_lang::*` +warning: unused import: `dfir_lang::*` --> tests/compile-fail/send_bincode_lifetime.rs:1:5 | -1 | use hydroflow_lang::*; - | ^^^^^^^^^^^^^^^^^ +1 | use dfir_lang::*; + | ^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydro_test_local/Cargo.toml b/hydro_test_local/Cargo.toml index a305cbf8bd0d..f9dee0d8bdbc 100644 --- a/hydro_test_local/Cargo.toml +++ b/hydro_test_local/Cargo.toml @@ -11,7 +11,7 @@ workspace = true stageleft_devel = [] [dependencies] -hydroflow = { path = "../hydroflow", version = "^0.10.0", default-features = false } # , features = ["debugging"] } +dfir_rs = { path = "../dfir_rs", version = "^0.10.0", default-features = false } # , features = ["debugging"] } hydro_lang = { path = "../hydro_lang", version = "^0.10.0", features = ["build"] } stageleft = { path = "../stageleft", version = "^0.5.0" } rand = "0.8.0" diff --git a/hydro_test_local/src/local/chat_app.rs b/hydro_test_local/src/local/chat_app.rs index f81d92e6ba89..de4391d96cec 100644 --- a/hydro_test_local/src/local/chat_app.rs +++ b/hydro_test_local/src/local/chat_app.rs @@ -1,8 +1,8 @@ +use dfir_rs::tokio::sync::mpsc::UnboundedSender; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; use hydro_lang::deploy::SingleProcessGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; -use hydroflow::tokio::sync::mpsc::UnboundedSender; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; use stageleft::{Quoted, RuntimeData}; #[stageleft::entry] @@ -12,7 +12,7 @@ pub fn chat_app<'a>( messages: RuntimeData>, output: RuntimeData<&'a UnboundedSender<(u32, String)>>, replay_messages: bool, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let process = flow.process::<()>(); let tick = process.tick(); @@ -57,14 +57,14 @@ pub fn chat_app<'a>( #[stageleft::runtime] #[cfg(test)] mod tests { - use hydroflow::assert_graphvis_snapshots; - use hydroflow::util::collect_ready; + use dfir_rs::assert_graphvis_snapshots; + use dfir_rs::util::collect_ready; #[test] fn test_chat_app_no_replay() { - let (users_send, users) = hydroflow::util::unbounded_channel(); - let (messages_send, messages) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (users_send, users) = dfir_rs::util::unbounded_channel(); + let (messages_send, messages) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut chat_server = super::chat_app!(users, messages, &out, false); assert_graphvis_snapshots!(chat_server); @@ -105,9 +105,9 @@ mod tests { #[test] fn test_chat_app_replay() { - let (users_send, users) = hydroflow::util::unbounded_channel(); - let (messages_send, messages) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (users_send, users) = dfir_rs::util::unbounded_channel(); + let (messages_send, messages) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut chat_server = super::chat_app!(users, messages, &out, true); assert_graphvis_snapshots!(chat_server); diff --git a/hydro_test_local/src/local/compute_pi.rs b/hydro_test_local/src/local/compute_pi.rs index 3cffccc9506c..0d900514d613 100644 --- a/hydro_test_local/src/local/compute_pi.rs +++ b/hydro_test_local/src/local/compute_pi.rs @@ -1,7 +1,7 @@ use std::time::Duration; use hydro_lang::deploy::SingleProcessGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; use stageleft::{Quoted, RuntimeData}; @@ -50,7 +50,7 @@ pub fn compute_pi<'a>(flow: &FlowBuilder<'a>, batch_size: RuntimeData) -> pub fn compute_pi_runtime<'a>( flow: FlowBuilder<'a>, batch_size: RuntimeData, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let _ = compute_pi(&flow, batch_size); flow.compile_no_network::() } diff --git a/hydro_test_local/src/local/count_elems.rs b/hydro_test_local/src/local/count_elems.rs index f97bb3abdb09..48c51b803cb7 100644 --- a/hydro_test_local/src/local/count_elems.rs +++ b/hydro_test_local/src/local/count_elems.rs @@ -1,15 +1,15 @@ +use dfir_rs::tokio::sync::mpsc::UnboundedSender; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; use hydro_lang::deploy::SingleProcessGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; -use hydroflow::tokio::sync::mpsc::UnboundedSender; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; use stageleft::{Quoted, RuntimeData}; pub fn count_elems_generic<'a, T: 'a>( flow: FlowBuilder<'a>, input_stream: RuntimeData>, output: RuntimeData<&'a UnboundedSender>, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let process = flow.process::<()>(); let tick = process.tick(); @@ -33,20 +33,20 @@ pub fn count_elems<'a>( flow: FlowBuilder<'a>, input_stream: RuntimeData>, output: RuntimeData<&'a UnboundedSender>, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { count_elems_generic(flow, input_stream, output) } #[stageleft::runtime] #[cfg(test)] mod tests { - use hydroflow::assert_graphvis_snapshots; - use hydroflow::util::collect_ready; + use dfir_rs::assert_graphvis_snapshots; + use dfir_rs::util::collect_ready; #[test] pub fn test_count() { - let (in_send, input) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (in_send, input) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut count = super::count_elems!(input, &out); assert_graphvis_snapshots!(count); diff --git a/hydro_test_local/src/local/first_ten.rs b/hydro_test_local/src/local/first_ten.rs index ff8ea851a4a0..8af55523c98b 100644 --- a/hydro_test_local/src/local/first_ten.rs +++ b/hydro_test_local/src/local/first_ten.rs @@ -1,5 +1,5 @@ use hydro_lang::deploy::SingleProcessGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; use stageleft::Quoted; @@ -10,7 +10,7 @@ pub fn first_ten(flow: &FlowBuilder) { } #[stageleft::entry] -pub fn first_ten_runtime<'a>(flow: FlowBuilder<'a>) -> impl Quoted<'a, Hydroflow<'a>> { +pub fn first_ten_runtime<'a>(flow: FlowBuilder<'a>) -> impl Quoted<'a, Dfir<'a>> { first_ten(&flow); flow.compile_no_network::() } diff --git a/hydro_test_local/src/local/graph_reachability.rs b/hydro_test_local/src/local/graph_reachability.rs index f715664b6efe..2d361431c3aa 100644 --- a/hydro_test_local/src/local/graph_reachability.rs +++ b/hydro_test_local/src/local/graph_reachability.rs @@ -1,8 +1,8 @@ +use dfir_rs::tokio::sync::mpsc::UnboundedSender; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; use hydro_lang::deploy::SingleProcessGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; -use hydroflow::tokio::sync::mpsc::UnboundedSender; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; use stageleft::{Quoted, RuntimeData}; #[stageleft::entry] @@ -11,7 +11,7 @@ pub fn graph_reachability<'a>( roots: RuntimeData>, edges: RuntimeData>, reached_out: RuntimeData<&'a UnboundedSender>, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let process = flow.process::<()>(); let roots = process.source_stream(roots); @@ -47,14 +47,14 @@ pub fn graph_reachability<'a>( #[stageleft::runtime] #[cfg(test)] mod tests { - use hydroflow::assert_graphvis_snapshots; - use hydroflow::util::collect_ready; + use dfir_rs::assert_graphvis_snapshots; + use dfir_rs::util::collect_ready; #[test] pub fn test_reachability() { - let (roots_send, roots) = hydroflow::util::unbounded_channel(); - let (edges_send, edges) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (roots_send, roots) = dfir_rs::util::unbounded_channel(); + let (edges_send, edges) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut reachability = super::graph_reachability!(roots, edges, &out); assert_graphvis_snapshots!(reachability); diff --git a/hydro_test_local/src/local/negation.rs b/hydro_test_local/src/local/negation.rs index cc48d9e454c9..779480e9882e 100644 --- a/hydro_test_local/src/local/negation.rs +++ b/hydro_test_local/src/local/negation.rs @@ -1,7 +1,7 @@ +use dfir_rs::tokio::sync::mpsc::UnboundedSender; use hydro_lang::deploy::SingleProcessGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; -use hydroflow::tokio::sync::mpsc::UnboundedSender; use stageleft::{Quoted, RuntimeData}; #[stageleft::entry] @@ -10,7 +10,7 @@ pub fn test_difference<'a>( output: RuntimeData<&'a UnboundedSender>, persist1: bool, persist2: bool, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let process = flow.process::<()>(); let tick = process.tick(); @@ -49,7 +49,7 @@ pub fn test_anti_join<'a>( output: RuntimeData<&'a UnboundedSender>, persist1: bool, persist2: bool, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let process = flow.process::<()>(); let tick = process.tick(); @@ -86,12 +86,12 @@ pub fn test_anti_join<'a>( #[stageleft::runtime] #[cfg(test)] mod tests { - use hydroflow::assert_graphvis_snapshots; - use hydroflow::util::collect_ready; + use dfir_rs::assert_graphvis_snapshots; + use dfir_rs::util::collect_ready; #[test] fn test_difference_tick_tick() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_difference!(&out, false, false); assert_graphvis_snapshots!(flow); @@ -107,7 +107,7 @@ mod tests { #[test] fn test_difference_tick_static() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_difference!(&out, false, true); assert_graphvis_snapshots!(flow); @@ -123,7 +123,7 @@ mod tests { #[test] fn test_difference_static_tick() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_difference!(&out, true, false); assert_graphvis_snapshots!(flow); @@ -142,7 +142,7 @@ mod tests { #[test] fn test_difference_static_static() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_difference!(&out, true, true); assert_graphvis_snapshots!(flow); @@ -158,7 +158,7 @@ mod tests { #[test] fn test_anti_join_tick_tick() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_anti_join!(&out, false, false); assert_graphvis_snapshots!(flow); @@ -174,7 +174,7 @@ mod tests { #[test] fn test_anti_join_tick_static() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_anti_join!(&out, false, true); assert_graphvis_snapshots!(flow); @@ -190,7 +190,7 @@ mod tests { #[test] fn test_anti_join_static_tick() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_anti_join!(&out, true, false); assert_graphvis_snapshots!(flow); @@ -209,7 +209,7 @@ mod tests { #[test] fn test_anti_join_static_static() { - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut flow = super::test_anti_join!(&out, true, true); assert_graphvis_snapshots!(flow); diff --git a/hydro_test_local/src/local/teed_join.rs b/hydro_test_local/src/local/teed_join.rs index 01a097e70784..37fab33411d4 100644 --- a/hydro_test_local/src/local/teed_join.rs +++ b/hydro_test_local/src/local/teed_join.rs @@ -1,9 +1,9 @@ +use dfir_rs::futures::stream::Stream; +use dfir_rs::tokio::sync::mpsc::UnboundedSender; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; use hydro_lang::deploy::MultiGraph; -use hydro_lang::hydroflow::scheduled::graph::Hydroflow; +use hydro_lang::dfir_rs::scheduled::graph::Dfir; use hydro_lang::*; -use hydroflow::futures::stream::Stream; -use hydroflow::tokio::sync::mpsc::UnboundedSender; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; use stageleft::{Quoted, RuntimeData}; struct N0 {} @@ -16,7 +16,7 @@ pub fn teed_join<'a, S: Stream + Unpin + 'a>( output: RuntimeData<&'a UnboundedSender>, send_twice: bool, subgraph_id: RuntimeData, -) -> impl Quoted<'a, Hydroflow<'a>> { +) -> impl Quoted<'a, Dfir<'a>> { let node_zero = flow.process::(); let node_one = flow.process::(); let n0_tick = node_zero.tick(); @@ -55,13 +55,13 @@ pub fn teed_join<'a, S: Stream + Unpin + 'a>( #[stageleft::runtime] #[cfg(test)] mod tests { - use hydroflow::assert_graphvis_snapshots; - use hydroflow::util::collect_ready; + use dfir_rs::assert_graphvis_snapshots; + use dfir_rs::util::collect_ready; #[test] fn test_teed_join() { - let (in_send, input) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (in_send, input) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut joined = super::teed_join!(input, &out, false, 0); assert_graphvis_snapshots!(joined); @@ -78,8 +78,8 @@ mod tests { #[test] fn test_teed_join_twice() { - let (in_send, input) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (in_send, input) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut joined = super::teed_join!(input, &out, true, 0); assert_graphvis_snapshots!(joined); @@ -96,8 +96,8 @@ mod tests { #[test] fn test_teed_join_multi_node() { - let (_, input) = hydroflow::util::unbounded_channel(); - let (out, mut out_recv) = hydroflow::util::unbounded_channel(); + let (_, input) = dfir_rs::util::unbounded_channel(); + let (out, mut out_recv) = dfir_rs::util::unbounded_channel(); let mut joined = super::teed_join!(input, &out, true, 1); assert_graphvis_snapshots!(joined); diff --git a/hydroflow/examples/example_syntax_output.rs b/hydroflow/examples/example_syntax_output.rs deleted file mode 100644 index 29632d20fe58..000000000000 --- a/hydroflow/examples/example_syntax_output.rs +++ /dev/null @@ -1,13 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow_syntax! { - source_iter("Hello World".chars()) -> map(|c| c.to_ascii_uppercase()) - -> for_each(|c| output_send.send(c).unwrap()); - }; - flow.run_available(); - - let output = &*hydroflow::util::collect_ready::(&mut output_recv); - assert_eq!(output, "HELLO WORLD"); -} diff --git a/hydroflow/tests/compile-fail/surface_degenerate_merge.rs b/hydroflow/tests/compile-fail/surface_degenerate_merge.rs deleted file mode 100644 index c7f27c2eda13..000000000000 --- a/hydroflow/tests/compile-fail/surface_degenerate_merge.rs +++ /dev/null @@ -1,8 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_syntax! { - union(); - }; - df.run_available(); -} diff --git a/hydroflow/tests/compile-fail/surface_degenerate_tee.rs b/hydroflow/tests/compile-fail/surface_degenerate_tee.rs deleted file mode 100644 index 5b7f4ee067b6..000000000000 --- a/hydroflow/tests/compile-fail/surface_degenerate_tee.rs +++ /dev/null @@ -1,8 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_syntax! { - tee(); - }; - 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 deleted file mode 100644 index 025ef369bcdb..000000000000 --- a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0277]: the trait bound `&str: hydroflow::futures::Sink<_>` is not satisfied - --> tests/compile-fail/surface_dest_sink_badsink.rs:6:41 - | -6 | source_iter(0..10) -> dest_sink(sink); - | ----------^^^^- - | | | - | | the trait `hydroflow::futures::Sink<_>` is not implemented for `&str` - | required by a bound introduced by this call - | - = help: the following other types implement trait `hydroflow::futures::Sink`: - <&hydroflow::futures::futures_channel::mpsc::UnboundedSender as hydroflow::futures::Sink> - <&mut S as hydroflow::futures::Sink> - as hydroflow::futures::Sink> - as hydroflow::futures::Sink> - as hydroflow::futures::Sink> - as hydroflow::futures::Sink<(u32, T)>> - as hydroflow::futures::Sink> - as hydroflow::futures::Sink<_Item>> - and $N others -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! { - | __________________^ -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) diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self1.rs b/hydroflow/tests/compile-fail/surface_forwardref_self1.rs deleted file mode 100644 index 2db338e481e8..000000000000 --- a/hydroflow/tests/compile-fail/surface_forwardref_self1.rs +++ /dev/null @@ -1,8 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_syntax! { - f = f -> f; - }; - df.run_available(); -} diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs b/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs deleted file mode 100644 index 2ca27026c3f4..000000000000 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs +++ /dev/null @@ -1,10 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_syntax! { - source_iter([1,2,3,4,5]) - -> lattice_fold::>() - -> for_each(|x| println!("Least upper bound: {:?}", x)); - }; - df.run_available(); -} diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs b/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs deleted file mode 100644 index 8e97934e293f..000000000000 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs +++ /dev/null @@ -1,10 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_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)); - }; - df.run_available(); -} diff --git a/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs b/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs deleted file mode 100644 index 08306055ea8b..000000000000 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs +++ /dev/null @@ -1,10 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_syntax! { - source_iter([1,2,3,4,5]) - -> lattice_reduce::<'static, hydroflow::lattices::set_union::SetUnionHashSet>() - -> for_each(|x| println!("Least upper bound: {:?}", x)); - }; - df.run_available(); -} diff --git a/hydroflow/tests/compile-fail/surface_null.rs b/hydroflow/tests/compile-fail/surface_null.rs deleted file mode 100644 index b19dd8aa333e..000000000000 --- a/hydroflow/tests/compile-fail/surface_null.rs +++ /dev/null @@ -1,8 +0,0 @@ -use hydroflow::hydroflow_syntax; - -fn main() { - let mut df = hydroflow_syntax! { - null(); - }; - df.run_available(); -} diff --git a/lattices/README.md b/lattices/README.md index 48890295b17a..98e37a6f2b39 100644 --- a/lattices/README.md +++ b/lattices/README.md @@ -18,7 +18,7 @@ freely distributed with no coordination overhead. The goal of the [Hydro Project is to allow users to write programs that automatically scale and distribute effortlessly. For more information on the underlying mathematics of lattices and monotonicity, take a look at -[Lattice Math section of the Hydroflow Book](https://hydro.run/docs/hydroflow/lattices_crate/lattice_math) +[Lattice Math section of the Hydroflow Book](https://hydro.run/docs/dfir/lattices_crate/lattice_math) and Section 2 of the [Hydroflow Thesis (2021)](https://hydro.run/papers/hydroflow-thesis.pdf). Take a look at the [`lattice` rustdocs](https://hydro-project.github.io/hydroflow/doc/lattices/index.html). diff --git a/lattices/src/lib.rs b/lattices/src/lib.rs index bac63c543b16..f489c00a1797 100644 --- a/lattices/src/lib.rs +++ b/lattices/src/lib.rs @@ -206,7 +206,7 @@ pub trait DeepReveal { /// /// Use [`crate::test::check_lattice_morphism`] to spot-test an implementation. /// -/// See the [lattice math doc's lattice morphism section](https://hydro.run/docs/hydroflow/lattices_crate/lattice_math/#lattice-morphism). +/// See the [lattice math doc's lattice morphism section](https://hydro.run/docs/dfir/lattices_crate/lattice_math/#lattice-morphism). pub trait LatticeMorphism { /// The output lattice type. type Output; @@ -218,7 +218,7 @@ pub trait LatticeMorphism { /// /// Use [`crate::test::check_lattice_bimorphism`] to spot-test an implementation. /// -/// See the [lattice math doc's lattice bimorphism section](https://hydro.run/docs/hydroflow/lattices_crate/lattice_math/#lattice-bimorphism). +/// See the [lattice math doc's lattice bimorphism section](https://hydro.run/docs/dfir/lattices_crate/lattice_math/#lattice-bimorphism). pub trait LatticeBimorphism { /// The output lattice type. type Output; diff --git a/multiplatform_test/README.md b/multiplatform_test/README.md index 3d69f347551f..6e649777caa8 100644 --- a/multiplatform_test/README.md +++ b/multiplatform_test/README.md @@ -43,7 +43,7 @@ There are many platforms which can be specified: * `test` - Adds a standard [`#[test]` attribute](https://doc.rust-lang.org/reference/attributes/testing.html#the-test-attribute). * `tokio` - Adds a [`#[tokio::test]` attribute](https://docs.rs/tokio/latest/tokio/attr.test.html). * `async_std` - Adds an [`#[async_std::test]` attribute](https://docs.rs/async-std/latest/async_std/attr.test.html). -* `hydroflow` - Adds a [`#[hydroflow::test]` attribute](https://docs.rs/hydroflow/latest/hydroflow/attr.test.html). +* `hydroflow` - Adds a [`#[dfir_rs::test]` attribute](https://docs.rs/hydroflow/latest/hydroflow/attr.test.html). * `wasm` - Adds a [`#[wasm_bindgen_test::wasm_bindgen_test]` attribute](https://docs.rs/wasm-bindgen-test/0.3.36/wasm_bindgen_test/attr.wasm_bindgen_test.html). * `env_logging` - Registers [`env_logger`](https://docs.rs/env_logger/latest/env_logger/) for [`log`ging](https://docs.rs/log/latest/log/). * `env_tracing` - Registers a [`FmtSubscriber`](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/index.html#reexport.FmtSubscriber) with an [`EnvFilter`](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for [`tracing`](https://docs.rs/tracing/latest/tracing/). diff --git a/multiplatform_test/src/lib.rs b/multiplatform_test/src/lib.rs index 1a1b019cf527..a1826fc960a3 100644 --- a/multiplatform_test/src/lib.rs +++ b/multiplatform_test/src/lib.rs @@ -8,7 +8,7 @@ enum Platform { Default, Tokio, AsyncStd, - Hydroflow, + Dfir, Wasm, EnvLogging, EnvTracing, @@ -19,7 +19,7 @@ impl Platform { Self::Default, Self::Tokio, Self::AsyncStd, - Self::Hydroflow, + Self::Dfir, Self::Wasm, Self::EnvLogging, Self::EnvTracing, @@ -33,7 +33,7 @@ impl Platform { Self::Default => "test", Self::Tokio => "tokio", Self::AsyncStd => "async_std", - Self::Hydroflow => "hydroflow", + Self::Dfir => "dfir", Self::Wasm => "wasm", Self::EnvLogging => "env_logging", Self::EnvTracing => "env_tracing", @@ -50,7 +50,7 @@ impl Platform { Platform::Default => quote! { #[test] }, Platform::Tokio => quote! { #[tokio::test ] }, Platform::AsyncStd => quote! { #[async_std::test] }, - Platform::Hydroflow => quote! { #[hydroflow::test] }, + Platform::Dfir => quote! { #[dfir_rs::test] }, Platform::Wasm => { quote! { #[wasm_bindgen_test::wasm_bindgen_test] } } diff --git a/precheck.bash b/precheck.bash index 1888e4907965..4c16cd439586 100755 --- a/precheck.bash +++ b/precheck.bash @@ -19,4 +19,4 @@ INSTA_FORCE_PASS=1 INSTA_UPDATE=always TRYBUILD=overwrite cargo test --all-targe cargo test --doc [ "$FULL" = false ] || RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps -[ "$FULL" = false ] || CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner cargo test -p hydroflow --target wasm32-unknown-unknown --tests --no-fail-fast +[ "$FULL" = false ] || CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner cargo test -p dfir_rs --target wasm32-unknown-unknown --tests --no-fail-fast diff --git a/relalg/Cargo.toml b/relalg/Cargo.toml index e7c6edba3316..bcde3949e4dd 100644 --- a/relalg/Cargo.toml +++ b/relalg/Cargo.toml @@ -11,7 +11,7 @@ workspace = true [dependencies] anyhow = "1.0.82" datadriven = "0.6.0" -hydroflow = { path = "../hydroflow" } +dfir_rs = { path = "../dfir_rs" } proc-macro2 = "1.0.74" quote = "1.0.35" syn = { version = "2.0.46", features = [ "parsing", "extra-traits" ] } diff --git a/relalg/src/runtime.rs b/relalg/src/runtime.rs index 3bedaa97b7d1..e4814e6e7830 100644 --- a/relalg/src/runtime.rs +++ b/relalg/src/runtime.rs @@ -1,15 +1,15 @@ use std::cell::RefCell; use std::rc::Rc; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::scheduled::graph_ext::GraphExt; -use hydroflow::scheduled::handoff::{Iter, VecHandoff}; -use hydroflow::scheduled::port::RecvPort; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::scheduled::graph_ext::GraphExt; +use dfir_rs::scheduled::handoff::{Iter, VecHandoff}; +use dfir_rs::scheduled::port::RecvPort; use crate::{Datum, RelExpr}; pub(crate) fn run_dataflow(r: RelExpr) -> Vec> { - let mut df = Hydroflow::new(); + let mut df = Dfir::new(); let output_port = render_relational(&mut df, r); @@ -28,7 +28,7 @@ pub(crate) fn run_dataflow(r: RelExpr) -> Vec> { v.clone() } -fn render_relational(df: &mut Hydroflow, r: RelExpr) -> RecvPort>> { +fn render_relational(df: &mut Dfir, r: RelExpr) -> RecvPort>> { let (send_port, recv_port) = df.make_edge("handoff"); match r { RelExpr::Values(mut v) => { diff --git a/template/hydroflow/.gitignore b/template/dfir/.gitignore similarity index 100% rename from template/hydroflow/.gitignore rename to template/dfir/.gitignore diff --git a/template/hydroflow/Cargo.toml b/template/dfir/Cargo.toml similarity index 70% rename from template/hydroflow/Cargo.toml rename to template/dfir/Cargo.toml index c6bad8c7e3a4..79cac797950e 100644 --- a/template/hydroflow/Cargo.toml +++ b/template/dfir/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] chrono = { version = "0.4.20", features = [ "serde" ], default-features = true } clap = { version = "4.5.4", features = [ "derive" ] } -hydroflow = { git = "{{ hydroflow_git | default: 'https://github.com/hydro-project/hydroflow.git' }}", branch = "{{ hydroflow_branch | default: 'main' }}" } +dfir_rs = { git = "{{ hydroflow_git | default: 'https://github.com/hydro-project/hydroflow.git' }}", branch = "{{ hydroflow_branch | default: 'main' }}" } serde = { version = "1.0.197", features = [ "derive" ] } diff --git a/template/hydroflow/README.md b/template/dfir/README.md similarity index 100% rename from template/hydroflow/README.md rename to template/dfir/README.md diff --git a/template/hydroflow/cargo-generate.toml b/template/dfir/cargo-generate.toml similarity index 100% rename from template/hydroflow/cargo-generate.toml rename to template/dfir/cargo-generate.toml diff --git a/template/hydroflow/rust-toolchain.toml b/template/dfir/rust-toolchain.toml similarity index 100% rename from template/hydroflow/rust-toolchain.toml rename to template/dfir/rust-toolchain.toml diff --git a/template/hydroflow/src/client.rs b/template/dfir/src/client.rs similarity index 94% rename from template/hydroflow/src/client.rs rename to template/dfir/src/client.rs index ab5ea2aba20e..da59b3cb6a5b 100644 --- a/template/hydroflow/src/client.rs +++ b/template/dfir/src/client.rs @@ -2,8 +2,8 @@ use crate::helpers::print_graph; use crate::protocol::Message; use crate::{Opts, DEFAULT_SERVER_ADDRESS}; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::dfir_syntax; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use std::net::SocketAddr; /// Runs the client. The client is a long-running process that reads stdin, and sends messages that @@ -32,8 +32,8 @@ pub(crate) async fn run_client(opts: Opts) { allocated_client_addr, server_addr ); - // The skeletal hydroflow spec for a client. - let mut flow = hydroflow_syntax! { + // The skeletal DFIR spec for a client. + 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/dfir/src/helpers.rs b/template/dfir/src/helpers.rs new file mode 100644 index 000000000000..b6593171e691 --- /dev/null +++ b/template/dfir/src/helpers.rs @@ -0,0 +1,9 @@ +use dfir_rs::lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::scheduled::graph::Dfir; + +pub fn print_graph(flow: &Dfir, graph: WriteGraphType, write_config: Option) { + let serde_graph = flow + .meta_graph() + .expect("No graph found, maybe failed to parse."); + serde_graph.open_graph(graph, write_config).unwrap(); +} diff --git a/template/hydroflow/src/main.rs b/template/dfir/src/main.rs similarity index 95% rename from template/hydroflow/src/main.rs rename to template/dfir/src/main.rs index 17328ce06bbd..5beb60e9a834 100644 --- a/template/hydroflow/src/main.rs +++ b/template/dfir/src/main.rs @@ -1,8 +1,8 @@ use clap::{Parser, ValueEnum}; use client::run_client; -use hydroflow::lang::graph::{WriteConfig, WriteGraphType}; -use hydroflow::tokio; -use hydroflow::util::ipv4_resolve; +use dfir_rs::lang::graph::{WriteConfig, WriteGraphType}; +use dfir_rs::tokio; +use dfir_rs::util::ipv4_resolve; use server::run_server; use std::net::SocketAddr; @@ -42,7 +42,7 @@ struct Opts { write_config: Option, } -#[hydroflow::main] +#[dfir_rs::main] /// This is the main entry-point for both `Client` and `Server`. async fn main() { // Parse command line arguments diff --git a/template/hydroflow/src/protocol.rs b/template/dfir/src/protocol.rs similarity index 100% rename from template/hydroflow/src/protocol.rs rename to template/dfir/src/protocol.rs diff --git a/template/hydroflow/src/server.rs b/template/dfir/src/server.rs similarity index 93% rename from template/hydroflow/src/server.rs rename to template/dfir/src/server.rs index 7624a614af3b..4906fa45d995 100644 --- a/template/hydroflow/src/server.rs +++ b/template/dfir/src/server.rs @@ -2,9 +2,9 @@ use crate::helpers::print_graph; use crate::protocol::Message; use crate::DEFAULT_SERVER_ADDRESS; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::{bind_udp_bytes, ipv4_resolve}; use std::net::SocketAddr; /// Runs the server. The server is a long-running process that listens for messages and echoes @@ -29,8 +29,8 @@ 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! { + // The skeletal DFIR spec for a server. + let mut flow: Dfir = 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/hydro/src/first_ten_cluster.rs b/template/hydro/src/first_ten_cluster.rs index a30a9884e78b..4c94a41415ee 100644 --- a/template/hydro/src/first_ten_cluster.rs +++ b/template/hydro/src/first_ten_cluster.rs @@ -17,7 +17,7 @@ pub fn first_ten_cluster<'a>(leader: &Process<'a, Leader>, workers: &Cluster<'a, mod tests { use hydro_deploy::Deployment; use hydro_lang::deploy::DeployCrateWrapper; - use hydro_lang::hydroflow::futures::StreamExt; + use hydro_lang::dfir_rs::futures::StreamExt; use tokio_stream::wrappers::UnboundedReceiverStream; #[tokio::test] diff --git a/template/hydro/src/first_ten_distributed.rs b/template/hydro/src/first_ten_distributed.rs index a5febbba29ae..d9e795e3a2c7 100644 --- a/template/hydro/src/first_ten_distributed.rs +++ b/template/hydro/src/first_ten_distributed.rs @@ -13,7 +13,7 @@ pub fn first_ten_distributed<'a>(p1: &Process<'a, P1>, p2: &Process<'a, P2>) { mod tests { use hydro_deploy::Deployment; use hydro_lang::deploy::DeployCrateWrapper; - use hydro_lang::hydroflow::futures::StreamExt; + use hydro_lang::dfir_rs::futures::StreamExt; use tokio_stream::wrappers::UnboundedReceiverStream; #[tokio::test] diff --git a/template/hydroflow/src/helpers.rs b/template/hydroflow/src/helpers.rs deleted file mode 100644 index 58264872461b..000000000000 --- a/template/hydroflow/src/helpers.rs +++ /dev/null @@ -1,9 +0,0 @@ -use hydroflow::lang::graph::{WriteConfig, WriteGraphType}; -use hydroflow::scheduled::graph::Hydroflow; - -pub fn print_graph(flow: &Hydroflow, graph: WriteGraphType, write_config: Option) { - let serde_graph = flow - .meta_graph() - .expect("No graph found, maybe failed to parse."); - serde_graph.open_graph(graph, write_config).unwrap(); -} diff --git a/topolotree/Cargo.toml b/topolotree/Cargo.toml index 030887fa71ed..1870b475a477 100644 --- a/topolotree/Cargo.toml +++ b/topolotree/Cargo.toml @@ -24,8 +24,8 @@ name = "latency_measure" path = "src/latency_measure.rs" [dependencies] -hydroflow = { path = "../hydroflow", features = [ "deploy_integration" ] } -hydroflow_datalog = { path = "../hydroflow_datalog" } +dfir_rs = { path = "../dfir_rs", features = [ "deploy_integration" ] } +dfir_datalog = { path = "../dfir_datalog" } tokio = { version = "1.29.0", features = [ "full" ] } serde = { version = "1.0.197", features = ["rc"] } diff --git a/topolotree/src/latency_measure.rs b/topolotree/src/latency_measure.rs index 724cc349193e..e31866841c05 100644 --- a/topolotree/src/latency_measure.rs +++ b/topolotree/src/latency_measure.rs @@ -5,17 +5,17 @@ use std::sync::{mpsc, Arc}; use std::thread; use std::time::Instant; +use dfir_rs::bytes::Bytes; +use dfir_rs::util::deploy::{ConnectedDirect, ConnectedSink, ConnectedSource}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; use futures::{SinkExt, StreamExt}; -use hydroflow::bytes::Bytes; -use hydroflow::util::deploy::{ConnectedDirect, ConnectedSink, ConnectedSource}; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; mod protocol; use protocol::*; #[tokio::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let mut start_node = ports .port("increment_start_node") .connect::() diff --git a/topolotree/src/main.rs b/topolotree/src/main.rs index 74a2fdfb30d6..5468c0da53f5 100644 --- a/topolotree/src/main.rs +++ b/topolotree/src/main.rs @@ -8,17 +8,17 @@ use std::io; use std::rc::Rc; use std::time::Duration; -use futures::{SinkExt, Stream}; -use hydroflow::bytes::{Bytes, BytesMut}; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow::util::deploy::{ +use dfir_rs::bytes::{Bytes, BytesMut}; +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::graph::Dfir; +use dfir_rs::util::deploy::{ ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource, ConnectedTagged, }; +use futures::{SinkExt, Stream}; mod protocol; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; use protocol::*; use tokio::time::Instant; @@ -42,7 +42,7 @@ fn run_topolotree( increment_requests: impl Stream> + Unpin + 'static, output_send: tokio::sync::mpsc::UnboundedSender<(u32, Bytes)>, query_send: tokio::sync::mpsc::UnboundedSender, -) -> Hydroflow<'static> { +) -> Dfir<'static> { fn merge(x: &mut i64, y: i64) { *x += y; } @@ -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())) @@ -211,13 +211,13 @@ fn run_topolotree( } } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { let mut args = std::env::args().skip(1); let _self_id: u32 = args.next().unwrap().parse().unwrap(); let neighbors: Vec = args.map(|x| x.parse().unwrap()).collect(); - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let input_recv = ports .port("from_peer") @@ -289,6 +289,6 @@ async fn main() { } let f1_handle = tokio::spawn(f1); - hydroflow::util::deploy::launch_flow(flow).await; + dfir_rs::util::deploy::launch_flow(flow).await; f1_handle.abort(); } diff --git a/topolotree/src/pn.rs b/topolotree/src/pn.rs index 6d28dc9cf08e..b1d9fd60b8bc 100644 --- a/topolotree/src/pn.rs +++ b/topolotree/src/pn.rs @@ -3,13 +3,13 @@ use std::collections::{HashMap, HashSet}; use std::ops::Deref; use std::rc::Rc; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::serde::{Deserialize, Serialize}; -use hydroflow::util::deploy::{ +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::serde::{Deserialize, Serialize}; +use dfir_rs::util::deploy::{ ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource, ConnectedTagged, }; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; mod protocol; use protocol::*; @@ -22,9 +22,9 @@ enum GossipOrIncrement { Increment(u64, i64), } -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let my_id: Vec = serde_json::from_str(&std::env::args().nth(1).unwrap()).unwrap(); let my_id = my_id[0]; @@ -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 { @@ -162,6 +162,6 @@ async fn main() { } let f1_handle = tokio::spawn(f1); - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; f1_handle.abort(); } diff --git a/topolotree/src/pn_delta.rs b/topolotree/src/pn_delta.rs index 23ddeee5e73a..f6c1ed4fbcef 100644 --- a/topolotree/src/pn_delta.rs +++ b/topolotree/src/pn_delta.rs @@ -3,13 +3,13 @@ use std::collections::HashMap; use std::ops::Deref; use std::rc::Rc; -use hydroflow::hydroflow_syntax; -use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::serde::{Deserialize, Serialize}; -use hydroflow::util::deploy::{ +use dfir_rs::dfir_syntax; +use dfir_rs::scheduled::ticks::TickInstant; +use dfir_rs::serde::{Deserialize, Serialize}; +use dfir_rs::util::deploy::{ ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource, ConnectedTagged, }; -use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; +use dfir_rs::util::{deserialize_from_bytes, serialize_to_bytes}; mod protocol; use protocol::*; @@ -22,9 +22,9 @@ enum GossipOrIncrement { type NextStateType = (u64, bool, Rc, Vec)>>); -#[hydroflow::main] +#[dfir_rs::main] async fn main() { - let ports = hydroflow::util::deploy::init::<()>().await; + let ports = dfir_rs::util::deploy::init::<()>().await; let my_id: Vec = serde_json::from_str(&std::env::args().nth(1).unwrap()).unwrap(); let my_id = my_id[0]; @@ -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 { @@ -163,6 +163,6 @@ async fn main() { } let f1_handle = tokio::spawn(f1); - hydroflow::util::deploy::launch_flow(df).await; + dfir_rs::util::deploy::launch_flow(df).await; f1_handle.abort(); } diff --git a/topolotree/src/tests.rs b/topolotree/src/tests.rs index 78cf3346c74a..84bfef80271a 100644 --- a/topolotree/src/tests.rs +++ b/topolotree/src/tests.rs @@ -1,9 +1,9 @@ use std::time::Duration; -use hydroflow::bytes::{Bytes, BytesMut}; -use hydroflow::tokio_stream::wrappers::UnboundedReceiverStream; -use hydroflow::util::multiset::HashMultiSet; -use hydroflow::util::{ +use dfir_rs::bytes::{Bytes, BytesMut}; +use dfir_rs::tokio_stream::wrappers::UnboundedReceiverStream; +use dfir_rs::util::multiset::HashMultiSet; +use dfir_rs::util::{ collect_ready_async, deserialize_from_bytes, serialize_to_bytes, unbounded_channel, }; use tokio::sync::mpsc::error::SendError; @@ -55,7 +55,7 @@ pub async fn read_all_query( .collect::>() } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn simple_payload_test() { let neighbors: Vec = vec![1, 2, 3]; @@ -93,7 +93,7 @@ async fn simple_payload_test() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn idempotence_test() { let neighbors: Vec = vec![1, 2, 3]; let (_operations_tx, operations_rx) = unbounded_channel::>(); @@ -134,7 +134,7 @@ async fn idempotence_test() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn backwards_in_time_test() { let neighbors: Vec = vec![1, 2, 3]; @@ -175,7 +175,7 @@ async fn backwards_in_time_test() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn multiple_input_sources_test() { let neighbors: Vec = vec![1, 2, 3]; let (_operations_tx, operations_rx) = unbounded_channel::>(); @@ -217,7 +217,7 @@ async fn multiple_input_sources_test() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn operations_across_ticks() { let neighbors: Vec = vec![1, 2, 3]; @@ -280,7 +280,7 @@ async fn operations_across_ticks() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn operations_multiple_keys() { let neighbors: Vec = vec![1, 2, 3]; @@ -367,7 +367,7 @@ async fn operations_multiple_keys() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn gossip_multiple_keys() { let neighbors: Vec = vec![1, 2, 3]; @@ -437,7 +437,7 @@ async fn gossip_multiple_keys() { ])); } -#[hydroflow::test(start_paused = true)] +#[dfir_rs::test(start_paused = true)] async fn ping_pongs() { let neighbors: Vec = vec![1]; diff --git a/website_playground/Cargo.toml b/website_playground/Cargo.toml index ac99a8c695e7..50b797e7479f 100644 --- a/website_playground/Cargo.toml +++ b/website_playground/Cargo.toml @@ -15,9 +15,9 @@ default = ["console_error_panic_hook"] [dependencies] futures = "0.3.0" -hydroflow_datalog_core = { path = "../hydroflow_datalog_core" } -hydroflow_lang = { path = "../hydroflow_lang" } -hydroflow = { path = "../hydroflow" } +dfir_datalog_core = { path = "../dfir_datalog_core" } +dfir_lang = { path = "../dfir_lang" } +dfir_rs = { path = "../dfir_rs" } prettyplease = { version = "0.2.0", features = [ "verbatim" ] } proc-macro2 = "1.0.74" quote = "1.0.35" diff --git a/website_playground/src/lib.rs b/website_playground/src/lib.rs index b670c74126ce..0ba9c6381f59 100644 --- a/website_playground/src/lib.rs +++ b/website_playground/src/lib.rs @@ -4,11 +4,11 @@ use std::collections::HashMap; use std::task::{Context, Poll}; use std::thread_local; -use hydroflow::datalog; -use hydroflow::scheduled::graph::Hydroflow; -use hydroflow_datalog_core::gen_hydroflow_graph; -use hydroflow_lang::diagnostic::{Diagnostic, Level}; -use hydroflow_lang::graph::{build_hfcode, partition_graph, WriteConfig}; +use dfir_datalog_core::gen_hydroflow_graph; +use dfir_lang::diagnostic::{Diagnostic, Level}; +use dfir_lang::graph::{build_hfcode, partition_graph, WriteConfig}; +use dfir_rs::datalog; +use dfir_rs::scheduled::graph::Dfir; use proc_macro2::{LineColumn, Span}; use quote::quote; use serde::{Deserialize, Serialize}; @@ -98,7 +98,7 @@ pub struct HydroflowOutput { } #[wasm_bindgen] -pub fn compile_hydroflow( +pub fn compile_dfir( program: String, no_subgraphs: bool, no_varnames: bool, @@ -226,7 +226,7 @@ pub fn compile_datalog( } struct HydroflowInstance<'a, In, Out> { - hydroflow: Hydroflow<'a>, + dfir: Dfir<'a>, input: tokio::sync::mpsc::UnboundedSender, output: tokio::sync::mpsc::UnboundedReceiver, } @@ -241,9 +241,9 @@ thread_local! { #[wasm_bindgen] pub fn init_datalog_boolean_demo(instance_name: &str) { DATALOG_BOOLEAN_DEMO_INSTANCES.with(|map| { - let (in_send, input) = hydroflow::util::unbounded_channel::<(i32,)>(); - let (out, out_recv) = hydroflow::util::unbounded_channel::<(i32,)>(); - let hydroflow = datalog!( + let (in_send, input) = dfir_rs::util::unbounded_channel::<(i32,)>(); + let (out, out_recv) = dfir_rs::util::unbounded_channel::<(i32,)>(); + let dfir = datalog!( r#" .input ints `source_stream(input)` .output result `for_each(|v| out.send(v).unwrap())` @@ -255,7 +255,7 @@ pub fn init_datalog_boolean_demo(instance_name: &str) { map.borrow_mut().insert( instance_name.into(), DatalogBooleanDemoInstance { - hydroflow, + dfir, input: in_send, output: out_recv.into_inner(), }, @@ -269,7 +269,7 @@ pub fn send_datalog_boolean_demo(instance_name: &str, input: i32) -> Option let mut map = map.borrow_mut(); let instance = map.get_mut(instance_name)?; instance.input.send((input,)).unwrap(); - instance.hydroflow.run_tick(); + instance.dfir.run_tick(); match instance .output .poll_recv(&mut Context::from_waker(futures::task::noop_waker_ref()))