Skip to content

Commit 53ff651

Browse files
author
Edi Muskardin
committed
fix TransitionFocusOracle.py state tracking
1 parent 58c6b1c commit 53ff651

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aalpy/oracles/TransitionFocusOracle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def find_cex(self, hypothesis):
3131
for _ in range(self.num_walks):
3232
self.reset_hyp_and_sul(hypothesis)
3333

34-
curr_state = hypothesis.initial_state
34+
curr_state = hypothesis.current_state
3535
inputs = []
3636
for _ in range(self.steps_per_walk):
3737
if random.random() <= self.same_state_prob:
@@ -46,6 +46,8 @@ def find_cex(self, hypothesis):
4646
out_hyp = hypothesis.step(inputs[-1])
4747
self.num_steps += 1
4848

49+
curr_state = hypothesis.current_state
50+
4951
if out_sul != out_hyp:
5052
self.sul.post()
5153
return inputs

0 commit comments

Comments
 (0)