diff --git a/src/common.rs b/src/common.rs index b282961aa8feb99f73617b4dcc8123d7d0e5bad9..0fb568e0e0130902ec79312bc44e7c6ff941faaf 100644 --- a/src/common.rs +++ b/src/common.rs @@ -98,7 +98,6 @@ pub(crate) enum SyncBlocker { CouldntReadMsg(PortId), CouldntCheckFiring(PortId), PutMsg(PortId, Payload), - NondetChoice { n: u16 }, } pub(crate) struct DenseDebugHex<'a>(pub &'a [u8]); pub(crate) struct DebuggableIter + Clone, T: Debug>(pub(crate) I); diff --git a/src/protocol/arena.rs b/src/protocol/arena.rs index 1e4b64f9ae2b6d7e47f4e24d33b1a6a1b3b7d905..ad5356c82fc4dcb769f1205b58a61bb81ef69c16 100644 --- a/src/protocol/arena.rs +++ b/src/protocol/arena.rs @@ -8,7 +8,7 @@ pub struct Id { _phantom: PhantomData, } #[derive(Debug, serde::Serialize, serde::Deserialize)] -pub struct Arena { +pub(crate) struct Arena { store: Vec, } ////////////////////////////////// diff --git a/src/protocol/eval.rs b/src/protocol/eval.rs index e6c28f3f7b5b9d95c50872580efce76363de46b9..d6fcc3dd9b6176c43032e1d93c13bb99b0976436 100644 --- a/src/protocol/eval.rs +++ b/src/protocol/eval.rs @@ -6,11 +6,9 @@ use std::{i16, i32, i64, i8}; use crate::common::*; use crate::protocol::ast::*; -// use crate::protocol::inputsource::*; -// use crate::protocol::parser::*; use crate::protocol::EvalContext; -const MAX_RECURSION: usize = 1024; +// const MAX_RECURSION: usize = 1024; const BYTE_MIN: i64 = i8::MIN as i64; const BYTE_MAX: i64 = i8::MAX as i64; diff --git a/src/runtime/communication.rs b/src/runtime/communication.rs index 4fff50f92e68fea351be4bd869a61eabf78d4b55..c7b00ba871ead94626a13b65778b09e2d077e121 100644 --- a/src/runtime/communication.rs +++ b/src/runtime/communication.rs @@ -1095,20 +1095,6 @@ impl BranchingProtoComponent { // This branch exits the cyclic drain Self::insert_branch_merging(cd.output, predicate, branch); } - B::NondetChoice { n } => { - // This branch requested the creation of a new n-way nondeterministic - // fork of the branch with a fresh speculative variable. - // ... allocate a new speculative variable - let var = rctx.spec_var_stream.next(); - // ... and for n distinct values, create a new forked branch, - // and schedule them to be rerun through the cyclic drain. - for val in SpecVal::iter_domain().take(n as usize) { - let predicate_n = predicate.clone().inserted(var, val); - let mut branch_n = branch.clone(); - branch_n.inner.untaken_choice = Some(val.0); - Self::insert_branch_merging(cd.swap, predicate_n, branch_n); - } - } } } std::mem::swap(cd.input, cd.swap); @@ -1440,14 +1426,4 @@ impl SyncProtoContext<'_> { } maybe_msg } - - // NOT CURRENTLY USED - // Once this component has injected a new nondeterministic branch with - // SyncBlocker::NondetChoice, this is how the component retrieves it. - // (Two step process necessary to get around mutable access rules, - // as injection of the nondeterministic choice modifies the - // branch predicate, forks the branch, etc.) - pub(crate) fn take_choice(&mut self) -> Option { - self.branch_inner.untaken_choice.take() - } } diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs index 9ec89b0f5297a3c6ce716fa2f581c642d475f56e..c96f4d21929db539d7f77c8ff70c5cc614c847bc 100644 --- a/src/runtime/mod.rs +++ b/src/runtime/mod.rs @@ -70,7 +70,6 @@ pub(crate) struct SyncProtoContext<'a> { // access control. #[derive(Default, Debug, Clone)] struct ProtoComponentBranchInner { - untaken_choice: Option, did_put_or_get: HashSet, inbox: HashMap, } diff --git a/src/runtime/setup.rs b/src/runtime/setup.rs index 756b35163da295fc139fa0538673d3c4b0c0e608..07cba79e56c09ed8f7f1444854abf2fb3296a4ae 100644 --- a/src/runtime/setup.rs +++ b/src/runtime/setup.rs @@ -6,7 +6,6 @@ impl TokenTarget { // [NET_ENDPOINT][UDP_ENDPOINT ] // ^0 ^usize::MAX/2 ^usize::MAX const HALFWAY_INDEX: usize = usize::MAX / 2; - const MAX_INDEX: usize = usize::MAX; } impl From for TokenTarget { fn from(Token(index): Token) -> Self { @@ -1033,7 +1032,7 @@ fn session_optimize( // and returning an optimized map. fn leader_session_map_optimize( logger: &mut dyn Logger, - mut m: HashMap, + m: HashMap, ) -> Result, ConnectError> { log!(logger, "Session map optimize START"); // currently, it's the identity function