Skip to content

Commit e8fcd28

Browse files
committed
SMV output: use IVAR
The SMV netlist and SMV word-level output now use IVAR for input variables.
1 parent 2be0696 commit e8fcd28

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/ebmc/output_smv_word_level.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,13 @@ static void smv_state_variables(
8181

8282
if(symbol.is_state_var)
8383
{
84-
out << "VAR " << symbol.base_name << " : "
85-
<< smv_type_printert{symbol.type} << ";\n";
84+
if(symbol.is_input)
85+
out << "IVAR";
86+
else
87+
out << "VAR";
88+
89+
out << ' ' << symbol.base_name << " : " << smv_type_printert{symbol.type}
90+
<< ";\n";
8691
found = true;
8792
}
8893
}

src/trans-netlist/smv_netlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void smv_netlist(const netlistt &netlist, std::ostream &out)
157157
{
158158
if(var.is_input())
159159
{
160-
out << "VAR " << id2smv(var_it.first);
160+
out << "IVAR " << id2smv(var_it.first);
161161
if(var.bits.size() != 1)
162162
out << "[" << i << "]";
163163
out << ": boolean;" << '\n';

0 commit comments

Comments
 (0)