code: def _setup_core_modules(self):
          
          self.ir_emulator = None
          self.smt_solver = None
          self.smt_translator = None
  
          if self.arch_info:
              # Set REIL emulator.
              self.ir_emulator = ReilEmulator(self.arch_info)
  
              # Set SMT Solver.
              self.smt_solver = None
  
              if SMT_SOLVER not in ("Z3", "CVC4"):
                  raise Exception("{} SMT solver not supported.".format(SMT_SOLVER))
  
              try:
                  if SMT_SOLVER == "Z3":
                      self.smt_solver = Z3Solver()
                  elif SMT_SOLVER == "CVC4":
                      self.smt_solver = CVC4Solver()
              except SmtSolverNotFound:
                  logger.warn("{} Solver is not installed. Run 'barf-install-solvers.sh' to install it.".format(SMT_SOLVER))
  
              # Set SMT translator.
              self.smt_translator = None
  
              if self.smt_solver:
                  self.smt_translator = SmtTranslator(self.smt_solver, self.arch_info.address_size)
  
                  self.smt_translator.set_arch_alias_mapper(self.arch_info.alias_mapper)
                  self.smt_translator.set_arch_registers_size(self.arch_info.registers_size)
docs: Set up core modules.