#include <AddressSpace.h>

Public Member Functions | |
| AddressSpace () | |
| AddressSpace (const AddressSpace &b) | |
| ~AddressSpace () | |
| bool | resolveOne (uint64_t address, ObjectPair &result) |
| bool | resolveOne (ExecutionState &state, TimingSolver *solver, ref< Expr > address, ObjectPair &result, bool &success) |
| bool | resolve (ExecutionState &state, TimingSolver *solver, ref< Expr > address, ResolutionList &rl, unsigned maxResolutions=0, double timeout=0.) |
| void | bindObject (const MemoryObject *mo, ObjectState *os) |
| Add a binding to the address space. | |
| void | unbindObject (const MemoryObject *mo) |
| Remove a binding from the address space. | |
| const ObjectState * | findObject (const MemoryObject *mo) const |
| Lookup a binding from a MemoryObject. | |
| ObjectState * | getWriteable (const MemoryObject *mo, const ObjectState *os) |
| Obtain an ObjectState suitable for writing. | |
| void | copyOutConcretes () |
| bool | copyInConcretes () |
Public Attributes | |
| MemoryMap | objects |
Private Member Functions | |
| AddressSpace & | operator= (const AddressSpace &) |
| Unsupported, use copy constructor. | |
Private Attributes | |
| unsigned | cowKey |
| Epoch counter used to control ownership of objects. | |
Definition at line 36 of file AddressSpace.h.
| klee::AddressSpace::AddressSpace | ( | ) | [inline] |
Definition at line 55 of file AddressSpace.h.
| klee::AddressSpace::AddressSpace | ( | const AddressSpace & | b | ) | [inline] |
Definition at line 56 of file AddressSpace.h.
| klee::AddressSpace::~AddressSpace | ( | ) | [inline] |
Definition at line 57 of file AddressSpace.h.
| void AddressSpace::bindObject | ( | const MemoryObject * | mo, | |
| ObjectState * | os | |||
| ) |
Add a binding to the address space.
Definition at line 22 of file AddressSpace.cpp.
References klee::ObjectState::copyOnWriteOwner, cowKey, objects, and klee::ImmutableMap< K, D, CMP >::replace().
Referenced by klee::Executor::bindObjectInState(), and klee::ExecutionState::cloneObject().


| bool AddressSpace::copyInConcretes | ( | ) |
Copy the concrete values of all managed ObjectStates back from the actual system memory location they were allocated at. ObjectStates will only be written to (and thus, potentially copied) if the memory values are different from the current concrete values.
| true | The copy succeeded. | |
| false | The copy failed because a read-only object was modified. |
Definition at line 306 of file AddressSpace.cpp.
References klee::MemoryObject::address, klee::ImmutableMap< K, D, CMP >::begin(), klee::ObjectState::concreteStore, klee::ImmutableMap< K, D, CMP >::end(), getWriteable(), klee::MemoryObject::isUserSpecified, objects, klee::ObjectState::readOnly, and klee::MemoryObject::size.

| void AddressSpace::copyOutConcretes | ( | ) |
Copy the concrete values of all managed ObjectStates into the actual system memory location they were allocated at.
Definition at line 291 of file AddressSpace.cpp.
References klee::MemoryObject::address, klee::ImmutableMap< K, D, CMP >::begin(), klee::ObjectState::concreteStore, klee::ImmutableMap< K, D, CMP >::end(), klee::MemoryObject::isUserSpecified, objects, klee::ObjectState::readOnly, and klee::MemoryObject::size.

| const ObjectState * AddressSpace::findObject | ( | const MemoryObject * | mo | ) | const |
Lookup a binding from a MemoryObject.
Definition at line 32 of file AddressSpace.cpp.
References klee::ImmutableMap< K, D, CMP >::lookup(), and objects.
Referenced by klee::Executor::doImpliedValueConcretization(), klee::Executor::initializeGlobals(), and klee::ExecutionState::merge().


| ObjectState * AddressSpace::getWriteable | ( | const MemoryObject * | mo, | |
| const ObjectState * | os | |||
| ) |
Obtain an ObjectState suitable for writing.
This returns a writeable object state, creating a new copy of the given ObjectState if necessary. If the address space owns the ObjectState then this routine effectively just strips the const qualifier it.
| mo | The MemoryObject to get a writeable ObjectState for. | |
| os | The current binding of the MemoryObject. |
Definition at line 38 of file AddressSpace.cpp.
References klee::ObjectState::copyOnWriteOwner, cowKey, objects, klee::ObjectState::readOnly, and klee::ImmutableMap< K, D, CMP >::replace().
Referenced by copyInConcretes(), klee::Executor::doImpliedValueConcretization(), klee::Executor::executeMemoryOperation(), klee::Executor::initializeGlobals(), and klee::ExecutionState::merge().


| AddressSpace& klee::AddressSpace::operator= | ( | const AddressSpace & | ) | [private] |
Unsupported, use copy constructor.
| bool AddressSpace::resolve | ( | ExecutionState & | state, | |
| TimingSolver * | solver, | |||
| ref< Expr > | address, | |||
| ResolutionList & | rl, | |||
| unsigned | maxResolutions = 0, |
|||
| double | timeout = 0. | |||
| ) |
Resolve address to a list of ObjectPairs it can point to. If maxResolutions is non-zero then no more than that many pairs will be returned.
Definition at line 160 of file AddressSpace.cpp.
References klee::ImmutableMap< K, D, CMP >::begin(), klee::TimerStatIncrementer::check(), klee::ImmutableMap< K, D, CMP >::end(), klee::MemoryObject::getBaseExpr(), klee::MemoryObject::getBoundsCheckPointer(), klee::TimingSolver::getValue(), klee::TimingSolver::mayBeTrue(), klee::TimingSolver::mustBeTrue(), objects, resolveOne(), klee::stats::resolveTime, and klee::ImmutableMap< K, D, CMP >::upper_bound().
Referenced by klee::Executor::executeMemoryOperation(), and klee::Executor::resolveExact().


| bool AddressSpace::resolveOne | ( | ExecutionState & | state, | |
| TimingSolver * | solver, | |||
| ref< Expr > | address, | |||
| ObjectPair & | result, | |||
| bool & | success | |||
| ) |
Resolve address to an ObjectPair in result.
| state | The state this address space is part of. | |
| solver | A solver used to determine possible locations of the address. | |
| address | The address to search for. | |
| [out] | result | An ObjectPair this address can resolve to (when returning true). |
Definition at line 70 of file AddressSpace.cpp.
References klee::MemoryObject::address, klee::ImmutableMap< K, D, CMP >::begin(), klee::ImmutableMap< K, D, CMP >::end(), klee::MemoryObject::getBaseExpr(), klee::MemoryObject::getBoundsCheckPointer(), klee::TimingSolver::getValue(), klee::ImmutableMap< K, D, CMP >::lookup_previous(), klee::TimingSolver::mayBeTrue(), klee::TimingSolver::mustBeTrue(), objects, resolveOne(), klee::stats::resolveTime, klee::MemoryObject::size, and klee::ImmutableMap< K, D, CMP >::upper_bound().

| bool AddressSpace::resolveOne | ( | uint64_t | address, | |
| ObjectPair & | result | |||
| ) |
Resolve address to an ObjectPair in result.
Definition at line 54 of file AddressSpace.cpp.
References klee::MemoryObject::address, klee::ImmutableMap< K, D, CMP >::lookup_previous(), objects, and klee::MemoryObject::size.
Referenced by klee::Executor::executeMemoryOperation(), klee::SpecialFunctionHandler::readStringAtAddress(), resolve(), and resolveOne().


| void AddressSpace::unbindObject | ( | const MemoryObject * | mo | ) |
Remove a binding from the address space.
Definition at line 28 of file AddressSpace.cpp.
References objects, and klee::ImmutableMap< K, D, CMP >::remove().
Referenced by klee::Executor::executeAlloc(), and klee::ExecutionState::popFrame().


unsigned klee::AddressSpace::cowKey [mutable, private] |
Epoch counter used to control ownership of objects.
Definition at line 39 of file AddressSpace.h.
Referenced by bindObject(), and getWriteable().
The MemoryObject -> ObjectState map that constitutes the address space.
The set of objects where o->copyOnWriteOwner == cowKey are the objects that we own.
Definition at line 52 of file AddressSpace.h.
Referenced by bindObject(), copyInConcretes(), copyOutConcretes(), findObject(), klee::Executor::getAddressInfo(), getWriteable(), klee::ExecutionState::merge(), resolve(), resolveOne(), and unbindObject().
1.5.8