Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ReadMe Examples #1500

Merged
merged 1 commit into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ value = m.make_symbolic_value()

contract_account.incremented(value)

for state in m.running_states:
for state in m.ready_states:
print("can value be 1? {}".format(state.can_be_true(value == 1)))
print("can value be 200? {}".format(state.can_be_true(value == 200)))
```
Expand All @@ -98,7 +98,7 @@ def hook(state):
print('eax', cpu.EAX)
print(cpu.read_int(cpu.ESP))

m.terminate() # tell Manticore to stop
m.kill() # tell Manticore to stop

m.run()
```
Expand Down
11 changes: 11 additions & 0 deletions manticore/core/manticore.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,13 @@ def ready_states(self):
# Re-save the state in case the user changed its data
self._save(state, state_id=state_id)

@property
def running_states(self):
logger.warning(
"manticore.running_states is deprecated! (You probably want manticore.ready_states)"
)
return self.ready_states

@property
@sync
def terminated_states(self):
Expand Down Expand Up @@ -808,6 +815,10 @@ def kill(self):
self._killed.value = True
self._lock.notify_all()

def terminate(self):
logger.warning("manticore.terminate is deprecated (Use manticore.kill)")
self.kill()

@sync
def is_running(self):
""" True if workers are exploring BUSY states or waiting for READY states """
Expand Down