Example #1
0
 def new_bitvec(self, size, name='V', taint=frozenset()):
     ''' Declares a free symbolic bitvector in the constraint store
         :param size: size in bits for the bitvector
         :param name: try to assign name to internal variable representation,
                      if not uniq a numeric nonce will be appended
         :return: a fresh BitVecVariable
     '''
     assert size in (1, 4, 8, 16, 32, 64, 128, 256)
     name = self._get_new_name(name)
     return BitVecVariable(size, name, taint=taint)
Example #2
0
 def new_bitvec(self, size, name='V', taint=frozenset()):
     ''' Declares a free symbolic bitvector in the constraint store
         :param size: size in bits for the bitvector
         :param name: try to assign name to internal variable representation,
                      if not uniq a numeric nonce will be appended
         :return: a fresh BitVecVariable
     '''
     if not (size == 1 or size % 8 == 0):
         raise Exception('Invalid bitvec size %s' % size)
     name = self._get_new_name(name)
     return BitVecVariable(size, name, taint=taint)