Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
devops committed Jan 10, 2025
2 parents c239774 + af29ee5 commit 6d8d58c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/runtime/proof_trace_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ class proof_trace_callback_writer : public proof_trace_writer {
std::optional<rewrite_event_construction> current_rewrite_event_{
std::nullopt};

bool rewrite_callback_pending_;

virtual void proof_trace_header_callback(uint32_t version) { }
virtual void hook_event_callback(call_event_construction const &event) { }
virtual void rewrite_event_callback(rewrite_event_construction const &event) {
Expand Down Expand Up @@ -332,6 +334,8 @@ class proof_trace_callback_writer : public proof_trace_writer {
current_rewrite_event_.emplace(ordinal, arity);
if (arity == 0) {
rewrite_event_callback(current_rewrite_event_.value());
} else {
rewrite_callback_pending_ = true;
}
}

Expand All @@ -345,7 +349,12 @@ class proof_trace_callback_writer : public proof_trace_writer {
p.second.bits = bits;
size_t new_pos = ++current_rewrite_event_->pos;
if (new_pos == current_rewrite_event_->arity) {
rewrite_event_callback(current_rewrite_event_.value());
if (rewrite_callback_pending_) {
rewrite_event_callback(current_rewrite_event_.value());
rewrite_callback_pending_ = false;
} else {
side_condition_event_callback(current_rewrite_event_.value());
}
}
}

Expand Down

0 comments on commit 6d8d58c

Please sign in to comment.