diff --git a/src/btor2/parse.rs b/src/btor2/parse.rs index d8a4b0d..3968c15 100644 --- a/src/btor2/parse.rs +++ b/src/btor2/parse.rs @@ -778,11 +778,16 @@ fn merge_signal_info(original: &SignalInfo, alias: &SignalInfo) -> SignalInfo { // TODO: it might be interesting to retain alias names // only overwrite the kind if it was a node, since other labels add more info - let kind = if original.kind == SignalKind::Node { - alias.kind - } else { - original.kind + let kind = match (original.kind, alias.kind) { + // nodes can always be renamed + (SignalKind::Node, alias) => alias, + // outputs always overwrite + (_, SignalKind::Output) => SignalKind::Output, + // otherwise we want to keep the original kind + (original, _) => original, }; + // TODO: it might be interesting to retain alias kinds + // e.g., a single signal could be a state and an output SignalInfo { name, kind } } diff --git a/src/sim/interpreter.rs b/src/sim/interpreter.rs index 90c2de7..6dd7576 100644 --- a/src/sim/interpreter.rs +++ b/src/sim/interpreter.rs @@ -97,7 +97,7 @@ impl<'a> Simulator for Interpreter<'a> { // copy init values from init to update program for state in self.states.iter() { - println!("{}", state.symbol.get_symbol_name(self.ctx).unwrap()); + // println!("{}", state.symbol.get_symbol_name(self.ctx).unwrap()); let src = self.init.get_range(&state.symbol).unwrap(); let dst = self.update.get_range(&state.symbol).unwrap(); exec::assign(&mut self.data[dst], &init_data[src]);