ROSE  0.11.31.0
SymbolicSemantics2.h
1 #ifndef Rose_SymbolicSemantics2_H
2 #define Rose_SymbolicSemantics2_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #ifndef __STDC_FORMAT_MACROS
7 #define __STDC_FORMAT_MACROS
8 #endif
9 #include <inttypes.h>
10 
11 #include "BaseSemantics2.h"
12 #include "Cxx_GrammarSerialization.h"
13 #include "BinarySmtSolver.h"
14 #include "BinarySymbolicExpr.h"
15 #include "RegisterStateGeneric.h"
16 #include "MemoryCellList.h"
17 #include "MemoryCellMap.h"
18 
19 #include <boost/serialization/access.hpp>
20 #include <boost/serialization/base_object.hpp>
21 #include <boost/serialization/export.hpp>
22 #include <boost/serialization/set.hpp>
23 
24 #include <map>
25 #include <vector>
26 
27 namespace Rose {
28 namespace BinaryAnalysis { // documented elsewhere
29 namespace InstructionSemantics2 { // documented elsewhere
30 
49 namespace SymbolicSemantics {
50 
57 typedef std::set<SgAsmInstruction*> InsnSet;
58 
60 // Boolean flags
62 
64 namespace AllowSideEffects {
65  enum Flag {NO, YES};
66 }
67 
68 
70 // Merging symbolic values
72 
75 
78  size_t setSizeLimit_;
79 protected:
80  Merger(): BaseSemantics::Merger(), setSizeLimit_(1) {}
81 
82 public:
84  typedef MergerPtr Ptr;
85 
87  static Ptr instance() {
88  return Ptr(new Merger);
89  }
90 
92  static Ptr instance(size_t n) {
93  Ptr retval = Ptr(new Merger);
94  retval->setSizeLimit(n);
95  return retval;
96  }
97 
109  size_t setSizeLimit() const { return setSizeLimit_; }
110  void setSizeLimit(size_t n) { setSizeLimit_ = n; }
112 };
113 
114 
115 
117 // Semantic values
119 
122 
125 public:
126  SymbolicExpr::Formatter expr_formatter;
127 };
128 
198 public:
200 
201 protected:
203  ExprPtr expr;
204 
207  InsnSet defs;
208 
210  // Serialization
211 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
212 private:
213  friend class boost::serialization::access;
214 
215  template<class S>
216  void serialize(S &s, const unsigned /*version*/) {
217  roseAstSerializationRegistration(s); // "defs" has SgAsmInstruction ASTs
218  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
219  s & BOOST_SERIALIZATION_NVP(expr);
220  s & BOOST_SERIALIZATION_NVP(defs);
221  }
222 #endif
223 
225  // Real constructors
226 protected:
227  SValue() {} // needed for serialization
228  explicit SValue(size_t nbits): BaseSemantics::SValue(nbits) {
229  expr = SymbolicExpr::makeIntegerVariable(nbits);
230  }
231  SValue(size_t nbits, uint64_t number): BaseSemantics::SValue(nbits) {
232  expr = SymbolicExpr::makeIntegerConstant(nbits, number);
233  }
234  SValue(ExprPtr expr): BaseSemantics::SValue(expr->nBits()) {
235  this->expr = expr;
236  }
237 
239  // Static allocating constructors
240 public:
242  static SValuePtr instance() {
244  }
245 
247  static SValuePtr instance_bottom(size_t nbits) {
249  }
250 
252  static SValuePtr instance_undefined(size_t nbits) {
254  }
255 
257  static SValuePtr instance_unspecified(size_t nbits) {
259  }
260 
262  static SValuePtr instance_integer(size_t nbits, uint64_t value) {
263  return SValuePtr(new SValue(SymbolicExpr::makeIntegerConstant(nbits, value)));
264  }
265 
267  // Virtual allocating constructors
268 public:
269  virtual BaseSemantics::SValuePtr bottom_(size_t nbits) const ROSE_OVERRIDE {
270  return instance_bottom(nbits);
271  }
272  virtual BaseSemantics::SValuePtr undefined_(size_t nbits) const ROSE_OVERRIDE {
273  return instance_undefined(nbits);
274  }
275  virtual BaseSemantics::SValuePtr unspecified_(size_t nbits) const ROSE_OVERRIDE {
276  return instance_unspecified(nbits);
277  }
278  virtual BaseSemantics::SValuePtr number_(size_t nbits, uint64_t value) const ROSE_OVERRIDE {
279  return instance_integer(nbits, value);
280  }
281  virtual BaseSemantics::SValuePtr boolean_(bool value) const ROSE_OVERRIDE {
282  return instance_integer(1, value?1:0);
283  }
284  virtual BaseSemantics::SValuePtr copy(size_t new_width=0) const ROSE_OVERRIDE {
285  SValuePtr retval(new SValue(*this));
286  if (new_width!=0 && new_width!=retval->nBits())
287  retval->set_width(new_width);
288  return retval;
289  }
292  const SmtSolverPtr&) const ROSE_OVERRIDE;
293 
295  // Dynamic pointer casts
296 public:
298  static SValuePtr promote(const BaseSemantics::SValuePtr &v) { // hot
299  SValuePtr retval = v.dynamicCast<SValue>();
300  ASSERT_not_null(retval);
301  return retval;
302  }
303 
305  // Override virtual methods...
306 public:
307  virtual bool isBottom() const ROSE_OVERRIDE;
308 
309  virtual void print(std::ostream&, BaseSemantics::Formatter&) const ROSE_OVERRIDE;
310 
311  virtual void hash(Combinatorics::Hasher&) const override;
312 
313 protected: // when implementing use these names; but when calling, use the camelCase names
314  virtual bool may_equal(const BaseSemantics::SValuePtr &other,
315  const SmtSolverPtr &solver = SmtSolverPtr()) const ROSE_OVERRIDE;
316  virtual bool must_equal(const BaseSemantics::SValuePtr &other,
317  const SmtSolverPtr &solver = SmtSolverPtr()) const ROSE_OVERRIDE;
318 
319  // It's not possible to change the size of a symbolic expression in place. That would require that we recursively change
320  // the size of the SymbolicExpr, which might be shared with many unrelated values whose size we don't want to affect.
321  virtual void set_width(size_t nbits) ROSE_OVERRIDE {
322  ASSERT_require(nbits==nBits());
323  }
324 
325  virtual bool is_number() const ROSE_OVERRIDE {
326  return expr->isIntegerConstant();
327  }
328 
329  virtual uint64_t get_number() const ROSE_OVERRIDE;
330 
331  virtual std::string get_comment() const ROSE_OVERRIDE;
332  virtual void set_comment(const std::string&) const ROSE_OVERRIDE;
333 
335  // Additional methods first declared in this class...
336 public:
344  virtual SValuePtr substitute(const SValuePtr &from, const SValuePtr &to, const SmtSolverPtr &solver) const;
345 
352  virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1, const InsnSet &set2, const InsnSet &set3) {
354  defined_by(insn, set1, set2);
355  }
356  virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1, const InsnSet &set2) {
358  defined_by(insn, set1);
359  }
360  virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1) {
362  defined_by(insn);
363  }
364  virtual void defined_by(SgAsmInstruction *insn) {
366  }
372  virtual const ExprPtr& get_expression() const {
373  return expr;
374  }
375 
378  virtual void set_expression(const ExprPtr &new_expr) {
379  ASSERT_not_null(new_expr);
380  expr = new_expr;
381  width = new_expr->nBits();
382  }
383  virtual void set_expression(const SValuePtr &source) {
384  set_expression(source->get_expression());
385  }
402  virtual const InsnSet& get_defining_instructions() const {
403  return defs;
404  }
405 
411  virtual size_t add_defining_instructions(const InsnSet &to_add);
412  virtual size_t add_defining_instructions(const SValuePtr &source) {
413  return add_defining_instructions(source->get_defining_instructions());
414  }
415  virtual size_t add_defining_instructions(SgAsmInstruction *insn);
423  virtual void set_defining_instructions(const InsnSet &new_defs) {
424  defs = new_defs;
425  }
426  virtual void set_defining_instructions(const SValuePtr &source) {
427  set_defining_instructions(source->get_defining_instructions());
428  }
429  virtual void set_defining_instructions(SgAsmInstruction *insn);
431 };
432 
433 
435 // Register state
437 
438 typedef BaseSemantics::RegisterStateGeneric RegisterState;
439 typedef BaseSemantics::RegisterStateGenericPtr RegisterStatePtr;
440 
441 
443 // List-based Memory state
445 
447 typedef boost::shared_ptr<class MemoryListState> MemoryListStatePtr;
448 
466 public:
468 
470  struct CellCompressor {
471  virtual ~CellCompressor() {}
472  virtual SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt,
474  const MemoryCellList::CellList &cells) = 0;
475  };
476 
491  virtual SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt,
493  const CellList &cells) ROSE_OVERRIDE;
494  };
495 
498  virtual SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt,
500  const CellList &cells) ROSE_OVERRIDE;
501  };
502 
507  CellCompressorMcCarthy cc_mccarthy;
508  CellCompressorSimple cc_simple;
509  virtual SValuePtr operator()(const SValuePtr &address, const BaseSemantics::SValuePtr &dflt,
511  const CellList &cells) ROSE_OVERRIDE;
512  };
513 
514 protected:
518  // Serialization
520 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
521 private:
522  friend class boost::serialization::access;
523 
524  template<class S>
525  void serialize(S &s, const unsigned /*version*/) {
526  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
527  }
528 #endif
529 
530 
532  // Real constructors
533 protected:
534  MemoryListState() // for serialization
535  : cell_compressor(&cc_choice) {}
536 
537  explicit MemoryListState(const BaseSemantics::MemoryCellPtr &protocell)
538  : BaseSemantics::MemoryCellList(protocell), cell_compressor(&cc_choice) {}
539 
540  MemoryListState(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval)
541  : BaseSemantics::MemoryCellList(addrProtoval, valProtoval), cell_compressor(&cc_choice) {}
542 
543  MemoryListState(const MemoryListState &other)
544  : BaseSemantics::MemoryCellList(other), cell_compressor(other.cell_compressor) {}
545 
547  // Static allocating constructors
548 public:
550  static MemoryListStatePtr instance(const BaseSemantics::MemoryCellPtr &protocell) {
551  return MemoryListStatePtr(new MemoryListState(protocell));
552  }
553 
556  static MemoryListStatePtr instance(const BaseSemantics::SValuePtr &addrProtoval,
557  const BaseSemantics::SValuePtr &valProtoval) {
558  return MemoryListStatePtr(new MemoryListState(addrProtoval, valProtoval));
559  }
560 
562  static MemoryListStatePtr instance(const MemoryListStatePtr &other) {
563  return MemoryListStatePtr(new MemoryListState(*other));
564  }
565 
567  // Virtual constructors
568 public:
572  const BaseSemantics::SValuePtr &valProtoval) const ROSE_OVERRIDE {
573  return instance(addrProtoval, valProtoval);
574  }
575 
577  virtual BaseSemantics::MemoryStatePtr create(const BaseSemantics::MemoryCellPtr &protocell) const ROSE_OVERRIDE {
578  return instance(protocell);
579  }
580 
582  virtual BaseSemantics::MemoryStatePtr clone() const ROSE_OVERRIDE {
584  }
585 
587  // Dynamic pointer casts
588 public:
591  static MemoryListStatePtr promote(const BaseSemantics::MemoryStatePtr &x) {
592  MemoryListStatePtr retval = boost::dynamic_pointer_cast<MemoryListState>(x);
593  ASSERT_not_null(retval);
594  return retval;
595  }
596 
598  // Methods we inherited
599 public:
605  BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE;
606 
612  BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE;
613 
617  virtual void writeMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &value,
618  BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE;
619 
620 protected:
621  BaseSemantics::SValuePtr readOrPeekMemory(const BaseSemantics::SValuePtr &address,
622  const BaseSemantics::SValuePtr &dflt,
625  AllowSideEffects::Flag allowSideEffects);
626 
628  // Methods first declared in this class
629 public:
634  void set_cell_compressor(CellCompressor *cc) { cell_compressor = cc; }
636 };
637 
638 
640 // Map-based Memory state
642 
644 typedef boost::shared_ptr<class MemoryMapState> MemoryMapStatePtr;
645 
664 public:
666 
668  // Serialization
669 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
670 private:
671  friend class boost::serialization::access;
672 
673  template<class S>
674  void serialize(S &s, const unsigned /*version*/) {
675  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
676  }
677 #endif
678 
680  // Real constructors
681 protected:
682  MemoryMapState() {} // for serialization
683 
684  explicit MemoryMapState(const BaseSemantics::MemoryCellPtr &protocell)
685  : BaseSemantics::MemoryCellMap(protocell) {}
686 
687  MemoryMapState(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval)
688  : BaseSemantics::MemoryCellMap(addrProtoval, valProtoval) {}
689 
691  // Static allocating constructors
692 public:
694  static MemoryMapStatePtr instance(const BaseSemantics::MemoryCellPtr &protocell) {
695  return MemoryMapStatePtr(new MemoryMapState(protocell));
696  }
697 
700  static MemoryMapStatePtr instance(const BaseSemantics::SValuePtr &addrProtoval,
701  const BaseSemantics::SValuePtr &valProtoval) {
702  return MemoryMapStatePtr(new MemoryMapState(addrProtoval, valProtoval));
703  }
704 
706  static MemoryMapStatePtr instance(const MemoryMapStatePtr &other) {
707  return MemoryMapStatePtr(new MemoryMapState(*other));
708  }
709 
711  // Virtual constructors
712 public:
716  const BaseSemantics::SValuePtr &valProtoval) const ROSE_OVERRIDE {
717  return instance(addrProtoval, valProtoval);
718  }
719 
722  return instance(protocell);
723  }
724 
726  virtual BaseSemantics::MemoryStatePtr clone() const ROSE_OVERRIDE {
728  }
729 
731  // Dynamic pointer casts
732 public:
735  static MemoryMapStatePtr promote(const BaseSemantics::MemoryStatePtr &x) {
736  MemoryMapStatePtr retval = boost::dynamic_pointer_cast<MemoryMapState>(x);
737  ASSERT_not_null(retval);
738  return retval;
739  }
740 
742  // Methods we override from the super class (documented in the super class)
743 public:
744  virtual CellKey generateCellKey(const BaseSemantics::SValuePtr &addr_) const ROSE_OVERRIDE;
745 };
746 
747 
748 
750 // Default memory state
752 
753 // List-base memory was the type originally used by this domain. We must keep it that way because some analysis, including 3rd
754 // party, assumes that the state is list-based. New analysis can use the map-based state by instantiating it when the symbolic
755 // risc operators are constructed.
756 typedef MemoryListState MemoryState;
757 typedef MemoryListStatePtr MemoryStatePtr;
758 
760 // Complete state
762 
763 typedef BaseSemantics::State State;
764 typedef BaseSemantics::StatePtr StatePtr;
765 
766 
768 // RISC operators
770 
776 };
777 
783 };
784 
786 typedef boost::shared_ptr<class RiscOperators> RiscOperatorsPtr;
787 
808 public:
810 
811 protected:
812  bool omit_cur_insn; // if true, do not include cur_insn as a definer
813  DefinersMode computingDefiners_; // whether to track definers (instruction VAs) of SValues
814  WritersMode computingMemoryWriters_; // whether to track writers (instruction VAs) to memory.
815  WritersMode computingRegisterWriters_; // whether to track writers (instruction VAs) to registers.
816  size_t trimThreshold_; // max size of expressions (zero means no maximimum)
817  bool reinterpretMemoryReads_; // cast data to unsigned integer when reading from memory
818  bool reinterpretRegisterReads_; // cast data to unsigned integer when reading from registers
819 
820 
822  // Serialization
823 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
824 private:
825  friend class boost::serialization::access;
826 
827  template<class S>
828  void serialize(S &s, const unsigned /*version*/) {
829  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
830  s & BOOST_SERIALIZATION_NVP(omit_cur_insn);
831  s & BOOST_SERIALIZATION_NVP(computingDefiners_);
832  s & BOOST_SERIALIZATION_NVP(computingMemoryWriters_);
833  s & BOOST_SERIALIZATION_NVP(computingRegisterWriters_);
834  s & BOOST_SERIALIZATION_NVP(trimThreshold_);
835  }
836 #endif
837 
839  // Real constructors
840 protected:
841  RiscOperators() // for serialization
842  : omit_cur_insn(false), computingDefiners_(TRACK_NO_DEFINERS), computingMemoryWriters_(TRACK_LATEST_WRITER),
843  computingRegisterWriters_(TRACK_LATEST_WRITER), trimThreshold_(0), reinterpretMemoryReads_(true),
844  reinterpretRegisterReads_(true) {}
845 
847  : BaseSemantics::RiscOperators(protoval, solver), omit_cur_insn(false), computingDefiners_(TRACK_NO_DEFINERS),
848  computingMemoryWriters_(TRACK_LATEST_WRITER), computingRegisterWriters_(TRACK_LATEST_WRITER), trimThreshold_(0),
849  reinterpretMemoryReads_(true), reinterpretRegisterReads_(true) {
850  name("Symbolic");
851  ASSERT_always_not_null(protoval);
852  ASSERT_always_not_null2(protoval.dynamicCast<SValue>(),
853  "SymbolicSemantics supports only symbolic SValue types or derivatives thereof");
854  }
855 
856  explicit RiscOperators(const BaseSemantics::StatePtr &state, const SmtSolverPtr &solver = SmtSolverPtr())
857  : BaseSemantics::RiscOperators(state, solver), omit_cur_insn(false), computingDefiners_(TRACK_NO_DEFINERS),
858  computingMemoryWriters_(TRACK_LATEST_WRITER), computingRegisterWriters_(TRACK_LATEST_WRITER), trimThreshold_(0),
859  reinterpretMemoryReads_(true), reinterpretRegisterReads_(true) {
860  name("Symbolic");
861  ASSERT_always_not_null(state);
862  ASSERT_always_not_null(state->registerState());
863  ASSERT_always_not_null2(boost::dynamic_pointer_cast<RegisterState>(state->registerState()),
864  "SymbolicSemantics supports only RegisterStateGeneric or derivatives thereof");
865  ASSERT_always_not_null(state->protoval());
866  ASSERT_always_not_null2(state->protoval().dynamicCast<SValue>(),
867  "SymbolicSemantics supports only symbolic SValue types or derivatives thereof");
868  }
869 
871  // Static allocating constructors
872 public:
875  static RiscOperatorsPtr instance(const RegisterDictionary *regdict, const SmtSolverPtr &solver = SmtSolverPtr()) {
877  BaseSemantics::RegisterStatePtr registers = RegisterState::instance(protoval, regdict);
878  BaseSemantics::MemoryStatePtr memory = MemoryListState::instance(protoval, protoval);
879  BaseSemantics::StatePtr state = State::instance(registers, memory);
880  return RiscOperatorsPtr(new RiscOperators(state, solver));
881  }
882 
885  static RiscOperatorsPtr instance(const BaseSemantics::SValuePtr &protoval, const SmtSolverPtr &solver = SmtSolverPtr()) {
886  return RiscOperatorsPtr(new RiscOperators(protoval, solver));
887  }
888 
891  static RiscOperatorsPtr instance(const BaseSemantics::StatePtr &state, const SmtSolverPtr &solver = SmtSolverPtr()) {
892  return RiscOperatorsPtr(new RiscOperators(state, solver));
893  }
894 
896  // Virtual constructors
897 public:
899  const SmtSolverPtr &solver = SmtSolverPtr()) const ROSE_OVERRIDE {
900  return instance(protoval, solver);
901  }
902 
904  const SmtSolverPtr &solver = SmtSolverPtr()) const ROSE_OVERRIDE {
905  return instance(state, solver);
906  }
907 
909  // Dynamic pointer casts
910 public:
913  static RiscOperatorsPtr promote(const BaseSemantics::RiscOperatorsPtr &x) {
914  RiscOperatorsPtr retval = boost::dynamic_pointer_cast<RiscOperators>(x);
915  ASSERT_not_null(retval);
916  return retval;
917  }
918 
920  // Inherited methods for constructing values.
921 public:
922  virtual BaseSemantics::SValuePtr boolean_(bool b) ROSE_OVERRIDE {
923  SValuePtr retval = SValue::promote(BaseSemantics::RiscOperators::boolean_(b));
924  if (computingDefiners() != TRACK_NO_DEFINERS && !omit_cur_insn)
925  retval->defined_by(currentInstruction());
926  return retval;
927  }
928 
929  virtual BaseSemantics::SValuePtr number_(size_t nbits, uint64_t value) ROSE_OVERRIDE {
930  SValuePtr retval = SValue::promote(BaseSemantics::RiscOperators::number_(nbits, value));
931  if (computingDefiners() != TRACK_NO_DEFINERS && !omit_cur_insn)
932  retval->defined_by(currentInstruction());
933  return retval;
934  }
935 
937  // New methods for constructing values, so we don't have to write so many SValue::promote calls in the RiscOperators
938  // implementations.
939 protected:
940  SValuePtr svalueExpr(const ExprPtr &expr, const InsnSet &defs=InsnSet()) {
941  SValuePtr newval = SValue::promote(protoval()->undefined_(expr->nBits()));
942  newval->set_expression(expr);
943  newval->set_defining_instructions(defs);
944  return newval;
945  }
946 
947  SValuePtr svalueUndefined(size_t nbits) {
948  return SValue::promote(undefined_(nbits));
949  }
950 
951  SValuePtr svalueBottom(size_t nbits) {
952  return SValue::promote(bottom_(nbits));
953  }
954 
955  SValuePtr svalueUnspecified(size_t nbits) {
956  return SValue::promote(unspecified_(nbits));
957  }
958 
959  SValuePtr svalueNumber(size_t nbits, uint64_t value) {
960  return SValue::promote(number_(nbits, value));
961  }
962 
963  SValuePtr svalueBoolean(bool b) {
964  return SValue::promote(boolean_(b));
965  }
966 
967  // [Robb Matzke 2021-03-18]: deprecated
968  SValuePtr svalue_number(size_t nbits, uint64_t value) ROSE_DEPRECATED("use svalueNumber instead") {
969  return svalueNumber(nbits, value);
970  }
971 
972  // [Robb Matzke 2021-03-18]: deprecated
973  SValuePtr svalue_boolean(bool b) ROSE_DEPRECATED("use svalueBoolean instead") {
974  return svalueBoolean(b);
975  }
976 
977  // [Robb Matzke 2021-03-18]: deprecated
978  SValuePtr svalue_unspecified(size_t nbits) ROSE_DEPRECATED("use svalueUnspecified instead") {
979  return svalueUnspecified(nbits);
980  }
981 
982  // [Robb Matzke 2021-03-18]: deprecated
983  SValuePtr svalue_bottom(size_t nbits) ROSE_DEPRECATED("use svalueBottom instead") {
984  return svalueBottom(nbits);
985  }
986 
987  // [Robb Matzke 2021-03-18]: deprecated
988  SValuePtr svalue_undefined(size_t nbits) ROSE_DEPRECATED("use svalueUndefined instead") {
989  return svalueUndefined(nbits);
990  }
991 
992  // [Robb Matzke 2021-03-18]: deprecated
993  SValuePtr svalue_expr(const ExprPtr &expr, const InsnSet &defs=InsnSet()) ROSE_DEPRECATED("use svalueExpr instead") {
994  return svalueExpr(expr, defs);
995  }
996 
998  // Configuration properties
999 public:
1000 
1018  void computingDefiners(DefinersMode m) { computingDefiners_ = m; }
1019  DefinersMode computingDefiners() const { return computingDefiners_; }
1040  void computingMemoryWriters(WritersMode m) { computingMemoryWriters_ = m; }
1041  WritersMode computingMemoryWriters() const { return computingMemoryWriters_; }
1065  void computingRegisterWriters(WritersMode m) { computingRegisterWriters_ = m; }
1066  WritersMode computingRegisterWriters() const { return computingRegisterWriters_; }
1069  // Used internally to control whether cur_insn should be omitted from the list of definers.
1070  bool getset_omit_cur_insn(bool b) { bool retval = omit_cur_insn; omit_cur_insn=b; return retval; }
1071 
1078  void trimThreshold(size_t n) { trimThreshold_ = n; }
1079  size_t trimThreshold() const { return trimThreshold_; }
1089  bool reinterpretMemoryReads() const { return reinterpretMemoryReads_; }
1090  void reinterpretMemoryReads(bool b) { reinterpretMemoryReads_ = b; }
1091  bool reinterpretRegisterReads() const { return reinterpretRegisterReads_; }
1092  void reinterpretRegisterReads(bool b) { reinterpretRegisterReads_ = b; }
1095  // Methods first defined at this level of the class hierarchy
1097 public:
1159  virtual void substitute(const SValuePtr &from, const SValuePtr &to);
1160 
1166 
1172 
1177 
1179  // Override methods from base class. These are the RISC operators that are invoked by a Dispatcher.
1180 public:
1181  virtual void interrupt(int majr, int minr) ROSE_OVERRIDE;
1182  virtual BaseSemantics::SValuePtr and_(const BaseSemantics::SValuePtr &a_,
1183  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1184  virtual BaseSemantics::SValuePtr or_(const BaseSemantics::SValuePtr &a_,
1185  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1186  virtual BaseSemantics::SValuePtr xor_(const BaseSemantics::SValuePtr &a_,
1187  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1188  virtual BaseSemantics::SValuePtr invert(const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE;
1189  virtual BaseSemantics::SValuePtr extract(const BaseSemantics::SValuePtr &a_,
1190  size_t begin_bit, size_t end_bit) ROSE_OVERRIDE;
1191  virtual BaseSemantics::SValuePtr concat(const BaseSemantics::SValuePtr &a_,
1192  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1193  virtual BaseSemantics::SValuePtr leastSignificantSetBit(const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE;
1194  virtual BaseSemantics::SValuePtr mostSignificantSetBit(const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE;
1195  virtual BaseSemantics::SValuePtr rotateLeft(const BaseSemantics::SValuePtr &a_,
1196  const BaseSemantics::SValuePtr &sa_) ROSE_OVERRIDE;
1197  virtual BaseSemantics::SValuePtr rotateRight(const BaseSemantics::SValuePtr &a_,
1198  const BaseSemantics::SValuePtr &sa_) ROSE_OVERRIDE;
1199  virtual BaseSemantics::SValuePtr shiftLeft(const BaseSemantics::SValuePtr &a_,
1200  const BaseSemantics::SValuePtr &sa_) ROSE_OVERRIDE;
1201  virtual BaseSemantics::SValuePtr shiftRight(const BaseSemantics::SValuePtr &a_,
1202  const BaseSemantics::SValuePtr &sa_) ROSE_OVERRIDE;
1203  virtual BaseSemantics::SValuePtr shiftRightArithmetic(const BaseSemantics::SValuePtr &a_,
1204  const BaseSemantics::SValuePtr &sa_) ROSE_OVERRIDE;
1205  virtual BaseSemantics::SValuePtr equalToZero(const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE;
1206  virtual BaseSemantics::SValuePtr ite(const BaseSemantics::SValuePtr &sel_,
1207  const BaseSemantics::SValuePtr &a_,
1208  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1209  virtual BaseSemantics::SValuePtr unsignedExtend(const BaseSemantics::SValuePtr &a_, size_t new_width) ROSE_OVERRIDE;
1210  virtual BaseSemantics::SValuePtr signExtend(const BaseSemantics::SValuePtr &a_, size_t new_width) ROSE_OVERRIDE;
1211  virtual BaseSemantics::SValuePtr add(const BaseSemantics::SValuePtr &a_,
1212  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1214  const BaseSemantics::SValuePtr &b_,
1215  const BaseSemantics::SValuePtr &c_,
1216  BaseSemantics::SValuePtr &carry_out/*out*/) ROSE_OVERRIDE;
1217  virtual BaseSemantics::SValuePtr negate(const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE;
1219  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1221  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1223  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1225  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1227  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1229  const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE;
1231  SgAsmFloatType *retType) ROSE_OVERRIDE;
1233  virtual BaseSemantics::SValuePtr readRegister(RegisterDescriptor reg,
1234  const BaseSemantics::SValuePtr &dflt) ROSE_OVERRIDE;
1235  virtual BaseSemantics::SValuePtr peekRegister(RegisterDescriptor reg,
1236  const BaseSemantics::SValuePtr &dflt) ROSE_OVERRIDE;
1237  virtual void writeRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE;
1238  virtual BaseSemantics::SValuePtr readMemory(RegisterDescriptor segreg,
1239  const BaseSemantics::SValuePtr &addr,
1240  const BaseSemantics::SValuePtr &dflt,
1241  const BaseSemantics::SValuePtr &cond) ROSE_OVERRIDE;
1242  virtual BaseSemantics::SValuePtr peekMemory(RegisterDescriptor segreg,
1243  const BaseSemantics::SValuePtr &addr,
1244  const BaseSemantics::SValuePtr &dflt) ROSE_OVERRIDE;
1245  virtual void writeMemory(RegisterDescriptor segreg,
1246  const BaseSemantics::SValuePtr &addr,
1247  const BaseSemantics::SValuePtr &data,
1248  const BaseSemantics::SValuePtr &cond) ROSE_OVERRIDE;
1249 
1250 public:
1251  BaseSemantics::SValuePtr readOrPeekMemory(RegisterDescriptor segreg,
1252  const BaseSemantics::SValuePtr &addr,
1253  const BaseSemantics::SValuePtr &dflt,
1254  AllowSideEffects::Flag);
1255 };
1256 
1257 } // namespace
1258 } // namespace
1259 } // namespace
1260 } // namespace
1261 
1262 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
1267 #endif
1268 
1269 #endif
1270 #endif
virtual BaseSemantics::SValuePtr signedModulo(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE
Calculates modulo with signed values.
Sawyer::SharedPointer< class Merger > MergerPtr
Shared-ownership pointer for a merge control object.
void computingDefiners(DefinersMode m)
Property: Track which instructions define a semantic value.
virtual void print(std::ostream &, BaseSemantics::Formatter &) const ROSE_OVERRIDE
Print a value to a stream using default format.
virtual void writeMemory(RegisterDescriptor segreg, const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &data, const BaseSemantics::SValuePtr &cond) ROSE_OVERRIDE
Writes a value to memory.
static RegisterStateGenericPtr instance(const SValuePtr &protoval, const RegisterDictionary *regdict)
Instantiate a new register state.
boost::shared_ptr< class MemoryCell > MemoryCellPtr
Shared-ownership pointer to a semantic memory cell.
Definition: MemoryCell.h:17
virtual BaseSemantics::SValuePtr copy(size_t new_width=0) const ROSE_OVERRIDE
Create a new value from an existing value, changing the width if new_width is non-zero.
boost::shared_ptr< RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to a RISC operators object.
virtual void set_defining_instructions(const InsnSet &new_defs)
Set defining instructions.
bool reinterpretMemoryReads() const
Property: Reinterpret data as unsigned integers when reading from memory or registers.
static SValuePtr instance_integer(size_t nbits, uint64_t value)
Instantiate a new concrete value.
Leaf node of an expression tree for instruction semantics.
Defines RISC operators for the SymbolicSemantics domain.
boost::shared_ptr< class RegisterStateGeneric > RegisterStateGenericPtr
Shared-ownership pointer to generic register states.
virtual BaseSemantics::SValuePtr addWithCarries(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_, const BaseSemantics::SValuePtr &c_, BaseSemantics::SValuePtr &carry_out) ROSE_OVERRIDE
Used for printing RISC operators with formatting.
virtual void set_expression(const SValuePtr &source)
Changes the expression stored in the value.
static MemoryMapStatePtr promote(const BaseSemantics::MemoryStatePtr &x)
Recasts a base pointer to a symbolic memory state.
Interior node of an expression tree for instruction semantics.
virtual bool must_equal(const BaseSemantics::SValuePtr &other, const SmtSolverPtr &solver=SmtSolverPtr()) const ROSE_OVERRIDE
Virtual API.
CellCompressor * cell_compressor
Callback when a memory read aliases multiple memory cells.
static CellCompressorChoice cc_choice
The default cell compressor.
static RiscOperatorsPtr instance(const BaseSemantics::StatePtr &state, const SmtSolverPtr &solver=SmtSolverPtr())
Instantiates a new RiscOperators object with specified state.
virtual SValuePtr substitute(const SValuePtr &from, const SValuePtr &to, const SmtSolverPtr &solver) const
Substitute one value for another throughout a value.
virtual BaseSemantics::SValuePtr filterResult(const BaseSemantics::SValuePtr &)
Filters results from RISC operators.
virtual BaseSemantics::SValuePtr signedDivide(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE
Divides two signed values.
virtual void set_comment(const std::string &) const ROSE_OVERRIDE
Some subclasses support the ability to add comments to values.
Base class for machine instructions.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to symbolic RISC operations.
virtual BaseSemantics::MemoryStatePtr clone() const ROSE_OVERRIDE
Virtual copy constructor.
virtual BaseSemantics::MemoryStatePtr create(const BaseSemantics::MemoryCellPtr &protocell) const ROSE_OVERRIDE
Virtual constructor.
virtual uint64_t get_number() const ROSE_OVERRIDE
Virtual API.
virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1, const InsnSet &set2)
Adds instructions to the list of defining instructions.
boost::shared_ptr< MemoryState > MemoryStatePtr
Shared-ownership pointer to a memory state.
LeafPtr makeIntegerConstant(size_t nBits, uint64_t value, const std::string &comment="", unsigned flags=0)
Leaf constructor.
boost::shared_ptr< State > StatePtr
Shared-ownership pointer to a semantic state.
virtual bool may_equal(const BaseSemantics::SValuePtr &other, const SmtSolverPtr &solver=SmtSolverPtr()) const ROSE_OVERRIDE
Virtual API.
static RiscOperatorsPtr instance(const RegisterDictionary *regdict, const SmtSolverPtr &solver=SmtSolverPtr())
Instantiates a new RiscOperators object and configures it to use semantic values and states that are ...
void computingRegisterWriters(WritersMode m)
Property: Track latest writer to each register.
Functor for handling a memory read whose address matches more than one memory cell.
virtual size_t add_defining_instructions(const SValuePtr &source)
Adds definitions to the list of defining instructions.
static SValuePtr promote(const BaseSemantics::SValuePtr &v)
Promote a base value to a SymbolicSemantics value.
virtual BaseSemantics::RiscOperatorsPtr create(const BaseSemantics::SValuePtr &protoval, const SmtSolverPtr &solver=SmtSolverPtr()) const ROSE_OVERRIDE
Virtual allocating constructor.
STL namespace.
Holds a value or nothing.
Definition: Optional.h:49
static const unsigned UNSPECIFIED
Value is somehow unspecified.
virtual void set_defining_instructions(const SValuePtr &source)
Set defining instructions.
void set_cell_compressor(CellCompressor *cc)
Callback for handling a memory read whose address matches more than one memory cell.
LeafPtr makeIntegerVariable(size_t nBits, const std::string &comment="", unsigned flags=0)
Leaf constructor.
static RiscOperatorsPtr promote(const BaseSemantics::RiscOperatorsPtr &x)
Run-time promotion of a base RiscOperators pointer to symbolic operators.
virtual BaseSemantics::SValuePtr number_(size_t nbits, uint64_t value) const ROSE_OVERRIDE
Create a new concrete semantic value.
virtual void interrupt(int majr, int minr) ROSE_OVERRIDE
Invoked for instructions that cause an interrupt.
virtual SValuePtr protoval() const
Property: Prototypical semantic value.
void reinterpretRegisterReads(bool b)
Property: Reinterpret data as unsigned integers when reading from memory or registers.
virtual BaseSemantics::SValuePtr signedMultiply(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE
Multiplies two signed values.
virtual void defined_by(SgAsmInstruction *insn)
Adds instructions to the list of defining instructions.
Main namespace for the ROSE library.
Functor for handling a memory read whose address matches more than one memory cell.
Controls formatting of expression trees when printing.
virtual void set_expression(const ExprPtr &new_expr)
Changes the expression stored in the value.
static MemoryListStatePtr promote(const BaseSemantics::MemoryStatePtr &x)
Recasts a base pointer to a symbolic memory state.
static MemoryListStatePtr instance(const BaseSemantics::MemoryCellPtr &protocell)
Instantiates a new memory state having specified prototypical cells and value.
virtual bool isBottom() const ROSE_OVERRIDE
Determines whether a value is a data-flow bottom.
virtual BaseSemantics::MemoryStatePtr create(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval) const ROSE_OVERRIDE
Virtual constructor.
Reference-counting intrusive smart pointer.
Definition: SharedPointer.h:68
void reinterpretMemoryReads(bool b)
Property: Reinterpret data as unsigned integers when reading from memory or registers.
virtual BaseSemantics::SValuePtr readRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &dflt) ROSE_OVERRIDE
Reads a value from a register.
virtual void writeRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE
Writes a value to a register.
static SValuePtr instance_bottom(size_t nbits)
Instantiate a new data-flow bottom value of specified width.
WritersMode computingMemoryWriters() const
Property: Track which instructions write to each memory location.
static MemoryMapStatePtr instance(const BaseSemantics::MemoryCellPtr &protocell)
Instantiates a new memory state having specified prototypical cells and value.
virtual SymbolicExpr::Type sgTypeToSymbolicType(SgAsmType *)
Convert a SgAsmType to a symbolic type.
static MemoryMapStatePtr instance(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval)
Instantiates a new memory state having specified prototypical value.
DefinersMode
How to update the list of definers stored in each semantic value.
virtual Sawyer::Optional< BaseSemantics::SValuePtr > createOptionalMerge(const BaseSemantics::SValuePtr &other, const BaseSemantics::MergerPtr &, const SmtSolverPtr &) const ROSE_OVERRIDE
Possibly create a new value by merging two existing values.
void computingMemoryWriters(WritersMode m)
Property: Track which instructions write to each memory location.
static const unsigned BOTTOM
Value represents bottom in dataflow analysis.
WritersMode computingRegisterWriters() const
Property: Track latest writer to each register.
static SValuePtr instance_undefined(size_t nbits)
Instantiate a new undefined value of specified width.
Describes (part of) a physical CPU register.
Functor for handling a memory read that found more than one cell that might alias the requested addre...
boost::shared_ptr< class MemoryMapState > MemoryMapStatePtr
Shared-ownership pointer to symbolic memory state.
virtual BaseSemantics::MemoryStatePtr create(const BaseSemantics::MemoryCellPtr &protocell) const
Virtual constructor.
static SValuePtr instance()
Instantiate a new prototypical value.
virtual BaseSemantics::RiscOperatorsPtr create(const BaseSemantics::StatePtr &state, const SmtSolverPtr &solver=SmtSolverPtr()) const ROSE_OVERRIDE
Virtual allocating constructor.
virtual const InsnSet & get_defining_instructions() const
Returns the set of instructions that defined this value.
static MemoryListStatePtr instance(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval)
Instantiates a new memory state having specified prototypical value.
DefinersMode computingDefiners() const
Property: Track which instructions define a semantic value.
virtual std::string get_comment() const ROSE_OVERRIDE
Some subclasses support the ability to add comments to values.
virtual const ExprPtr & get_expression() const
Returns the expression stored in this value.
bool reinterpretRegisterReads() const
Property: Reinterpret data as unsigned integers when reading from memory or registers.
static RiscOperatorsPtr instance(const BaseSemantics::SValuePtr &protoval, const SmtSolverPtr &solver=SmtSolverPtr())
Instantiates a new RiscOperators object with specified prototypical values.
virtual void substitute(const SValuePtr &from, const SValuePtr &to)
Substitute all occurrences of from with to in the current state.
WritersMode
How to update the list of writers stored at each abstract location.
Sawyer::SharedPointer< class SValue > SValuePtr
Shared-ownership pointer for symbolic semantic value.
SharedPointer< U > dynamicCast() const
Dynamic cast.
Base class for most instruction semantics RISC operators.
CellCompressor * get_cell_compressor() const
Callback for handling a memory read whose address matches more than one memory cell.
virtual BaseSemantics::SValuePtr unsignedMultiply(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE
Multiply two unsigned values.
virtual BaseSemantics::SValuePtr negate(const BaseSemantics::SValuePtr &a_) ROSE_OVERRIDE
Two's complement.
virtual void set_width(size_t nbits) ROSE_OVERRIDE
Virtual API.
virtual void hash(Combinatorics::Hasher &) const override
Hash this semantic value.
virtual BaseSemantics::MemoryStatePtr create(const BaseSemantics::SValuePtr &addrProtoval, const BaseSemantics::SValuePtr &valProtoval) const ROSE_OVERRIDE
Virtual constructor.
virtual BaseSemantics::SValuePtr unspecified_(size_t nbits) const ROSE_OVERRIDE
Create a new unspecified semantic value.
virtual BaseSemantics::SValuePtr unsignedDivide(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE
Divides two unsigned values.
std::list< MemoryCellPtr > CellList
List of memory cells.
Base class for binary types.
size_t trimThreshold() const
Property: Maximum size of expressions.
Type of values manipulated by the SymbolicSemantics domain.
virtual void writeMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &value, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE
Write a byte to memory.
virtual BaseSemantics::SValuePtr peekMemory(RegisterDescriptor segreg, const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt) ROSE_OVERRIDE
Read memory without side effects.
virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1)
Adds instructions to the list of defining instructions.
static SValuePtr instance_unspecified(size_t nbits)
Instantiate a new unspecified value of specified width.
virtual BaseSemantics::SValuePtr reinterpret(const BaseSemantics::SValuePtr &, SgAsmType *) ROSE_OVERRIDE
Reinterpret an expression as a different type.
virtual BaseSemantics::SValuePtr boolean_(bool value) const ROSE_OVERRIDE
Create a new, Boolean value.
virtual CellKey generateCellKey(const BaseSemantics::SValuePtr &addr_) const ROSE_OVERRIDE
Generate a cell lookup key.
virtual BaseSemantics::SValuePtr readMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE
Read a byte from memory.
virtual BaseSemantics::SValuePtr undefined_(size_t nbits) const ROSE_OVERRIDE
Create a new undefined semantic value.
virtual size_t add_defining_instructions(const InsnSet &to_add)
Adds definitions to the list of defining instructions.
static MemoryMapStatePtr instance(const MemoryMapStatePtr &other)
Instantiates a new deep copy of an existing state.
Base class for symbolic expression nodes.
virtual BaseSemantics::SValuePtr bottom_(size_t nbits) const ROSE_OVERRIDE
Data-flow bottom value.
virtual BaseSemantics::SValuePtr fpConvert(const BaseSemantics::SValuePtr &a, SgAsmFloatType *aType, SgAsmFloatType *retType) ROSE_OVERRIDE
Convert from one floating-point type to another.
virtual BaseSemantics::SValuePtr unsignedModulo(const BaseSemantics::SValuePtr &a_, const BaseSemantics::SValuePtr &b_) ROSE_OVERRIDE
Calculates modulo with unsigned values.
Defines registers available for a particular architecture.
Definition: Registers.h:38
virtual SmtSolverPtr solver() const
Property: Satisfiability module theory (SMT) solver.
virtual BaseSemantics::MemoryStatePtr clone() const ROSE_OVERRIDE
Virtual copy constructor.
virtual const std::string & name() const
Property: Name used for debugging.
void trimThreshold(size_t n)
Property: Maximum size of expressions.
virtual void defined_by(SgAsmInstruction *insn, const InsnSet &set1, const InsnSet &set2, const InsnSet &set3)
Adds instructions to the list of defining instructions.
static MemoryListStatePtr instance(const MemoryListStatePtr &other)
Instantiates a new deep copy of an existing state.
MergerPtr Ptr
Shared-ownership pointer for a Merger object.
virtual BaseSemantics::SValuePtr peekMemory(const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt, BaseSemantics::RiscOperators *addrOps, BaseSemantics::RiscOperators *valOps) ROSE_OVERRIDE
Read a byte from memory with no side effects.
Functor for handling a memory read whose address matches more than one memory cell.
virtual BaseSemantics::SValuePtr readMemory(RegisterDescriptor segreg, const BaseSemantics::SValuePtr &addr, const BaseSemantics::SValuePtr &dflt, const BaseSemantics::SValuePtr &cond) ROSE_OVERRIDE
Reads a value from memory.
Floating point types.
virtual BaseSemantics::SValuePtr peekRegister(RegisterDescriptor reg, const BaseSemantics::SValuePtr &dflt) ROSE_OVERRIDE
Obtain a register value without side effects.
boost::shared_ptr< RegisterState > RegisterStatePtr
Shared-ownership pointer to a register state.
static SgAsmFloatType * sgIsIeee754(SgAsmType *)
Tests whether a SgAsmType is an IEEE-754 floating-point type.
std::shared_ptr< class SmtSolver > SmtSolverPtr
Reference-counting pointer for SMT solvers.
boost::shared_ptr< class MemoryListState > MemoryListStatePtr
Shared-ownership pointer for symbolic list-based memory state.