1
0
mirror of synced 2026-04-27 12:40:28 +00:00

Fix corner case of pos cell with input and output being same width

This commit is contained in:
Roland Coeurjoly
2024-07-07 21:29:33 +02:00
committed by Emily Schmidt
parent fad76ce677
commit 7cff8fa3a3
2 changed files with 16 additions and 1 deletions

View File

@@ -277,7 +277,7 @@ struct SmtModule {
SmtModule(const std::string &module_name, FunctionalIR ir) : name(module_name), ir(std::move(ir)) {}
void write(std::ostream &out)
{
{
const bool stateful = ir.state().size() != 0;
SmtWriter writer(out);
@@ -371,6 +371,8 @@ struct SmtModule {
for (size_t i = 0; i < ir.size() - ir.inputs().size(); ++i) {
writer.print(" )"); // Closing each node
}
if (ir.size() == ir.inputs().size())
writer.print(" )"); // Corner case
writer.print(" )"); // Closing inputs let statement
writer.print(")\n"); // Closing step function