Skip to content

Commit 3cd9fb7

Browse files
authored
Merge pull request #504 from diffblue/aig-past
Verilog: error when using $past with an AIG-based engine
2 parents b20df19 + 496ebb0 commit 3cd9fb7

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
KNOWNBUG
1+
CORE
22
past2.sv
33
--bdd
4-
^EXIT=0$
4+
^file .* line \d+: error: no support for \$past when using AIG backends$
5+
^EXIT=6$
56
^SIGNAL=0$
67
--
78
^warning: ignoring
89
--
9-
The AIG translation is yet to support $past.

src/trans-netlist/instantiate_netlist.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, [email protected]
1212
#include <util/expr_util.h>
1313
#include <util/std_expr.h>
1414

15+
#include <ebmc/ebmc_error.h>
1516
#include <solvers/flattening/boolbv.h>
1617
#include <verilog/sva_expr.h>
1718

@@ -201,6 +202,11 @@ literalt instantiate_var_mapt::convert_bool(const exprt &expr)
201202
convert_bool(sva_overlapped_implication.lhs()),
202203
convert_bool(sva_overlapped_implication.rhs()));
203204
}
205+
else if(expr.id() == ID_verilog_past)
206+
{
207+
throw ebmc_errort().with_location(expr.source_location())
208+
<< "no support for $past when using AIG backends";
209+
}
204210

205211
return SUB::convert_bool(expr);
206212
}
@@ -238,6 +244,11 @@ bvt instantiate_var_mapt::convert_bitvector(const exprt &expr)
238244
return bv;
239245
}
240246
}
247+
else if(expr.id() == ID_verilog_past)
248+
{
249+
throw ebmc_errort().with_location(expr.source_location())
250+
<< "no support for $past when using AIG backends";
251+
}
241252

242253
return SUB::convert_bitvector(expr);
243254
}

0 commit comments

Comments
 (0)