@@ -11,6 +11,7 @@ Author: Daniel Kroening, kroening@kroening.com
1111
1212#include < util/std_expr.h>
1313
14+ #include " verilog_expr.h"
1415#include " verilog_types.h"
1516
1617// / 1800-2017 16.6 Boolean expressions
@@ -2048,17 +2049,19 @@ enum class sva_sequence_semanticst
20482049};
20492050
20502051// / a base class for both sequence and property instance expressions
2051- class sva_sequence_property_instance_exprt : public binary_exprt
2052+ class sva_sequence_property_instance_exprt : public ternary_exprt
20522053{
20532054public:
20542055 sva_sequence_property_instance_exprt (
20552056 symbol_exprt _symbol,
2056- exprt::operandst _arguments)
2057- : binary_exprt{
2058- _symbol,
2057+ exprt::operandst _arguments,
2058+ verilog_sequence_property_declaration_baset _declaration)
2059+ : ternary_exprt{
20592060 ID_sva_sequence_property_instance,
2061+ std::move (_symbol),
20602062 multi_ary_exprt{ID_arguments, std::move (_arguments), typet{}},
2061- _symbol.type ()}
2063+ std::move (_declaration),
2064+ typet{}}
20622065 {
20632066 }
20642067
@@ -2081,6 +2084,26 @@ class sva_sequence_property_instance_exprt : public binary_exprt
20812084 {
20822085 return op1 ().operands ();
20832086 }
2087+
2088+ verilog_sequence_property_declaration_baset &declaration ()
2089+ {
2090+ return static_cast <verilog_sequence_property_declaration_baset &>(op2 ());
2091+ }
2092+
2093+ const verilog_sequence_property_declaration_baset &declaration () const
2094+ {
2095+ return static_cast <const verilog_sequence_property_declaration_baset &>(
2096+ op2 ());
2097+ }
2098+
2099+ // / Add the source location from \p other, if it has any.
2100+ sva_sequence_property_instance_exprt &&
2101+ with_source_location (const exprt &other) &&
2102+ {
2103+ if (other.source_location ().is_not_nil ())
2104+ add_source_location () = other.source_location ();
2105+ return std::move (*this );
2106+ }
20842107};
20852108
20862109inline const sva_sequence_property_instance_exprt &
0 commit comments