Skip to content

Commit 42435c6

Browse files
committed
forbid left insertion
1 parent 550b7c3 commit 42435c6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.pdk/pdk/gleaner.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def find_invariant(immutables, i1, i2):
2525
for k1, k2 in immutables:
2626
if k1 > i1:
2727
break
28-
# flowdas: k2 > i1 조건을 넣지 않으면 오른쪽 이어붙이기를 허용하게된다.
29-
# 왼쪽 이어붙이기도 막아야할까?
30-
if k2 >= i2 and k2 > i1:
28+
# flowdas: i2 > k1 and k2 > i1 조건을 넣지 않으면 이어붙이기를 허용하게된다.
29+
# 이어붙이기를 허용하게되면 P_INVARIANT 를 벗어나게될 가능성이 높아지고, 재검색해야 할 필요가 생긴다.
30+
# 재검색과 결합하여 이 조건을 완화하려는 시도의 득실은 떠져보지 않았다.
31+
if k2 >= i2 and i2 > k1 and k2 > i1:
3132
return k1, k2
3233

3334

0 commit comments

Comments
 (0)