Package sulley :: Module primitives :: Class base_primitive
[show private | hide private]
[frames | no frames]

Type base_primitive

object --+
         |
        base_primitive

Known Subclasses:
bit_field, delim, group, random_data, static, string

The primitive base class implements common functionality shared across most primitives.
Method Summary
  __init__(self)
Integer exhaust(self)
Exhaust the possible mutations for this primitive.
Boolean mutate(self)
Mutate the primitive by stepping through the fuzz library, return False on completion.
Integer num_mutations(self)
Calculate and return the total number of mutations for this individual primitive.
  render(self)
Nothing fancy on render, simply return the value.
  reset(self)
Reset this primitive to the starting mutation state.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

exhaust(self)

Exhaust the possible mutations for this primitive.
Returns:
The number of mutations to reach exhaustion
           (type=Integer)

mutate(self)

Mutate the primitive by stepping through the fuzz library, return False on completion.
Returns:
True on success, False otherwise.
           (type=Boolean)

num_mutations(self)

Calculate and return the total number of mutations for this individual primitive.
Returns:
Number of mutated forms this primitive can take
           (type=Integer)

render(self)

Nothing fancy on render, simply return the value.

reset(self)

Reset this primitive to the starting mutation state.

Generated by Epydoc 2.1 on Fri Jul 27 17:40:03 2007 http://epydoc.sf.net