Summary#
루프 변수의 하한만 알아도 일부 비교는 상수로 접을 수 있지만, 엄격 비교와 비엄격 비교를 혼동하면 경계값에서 결과가 달라진다. 각 치환을 부등식으로 따로 증명하고 등호가 성립하는 입력을 회귀 테스트에 포함한다.
Problem#
i ≥ c이고 x ≤ c일 때 i < x가 거짓이라는 사실을 근거로 i > x까지 참으로 치환했지만, i = x에서는 후자가 거짓이다.
Solution#
비교 연산자마다 필요한 경계 조건을 구분하고, i = x 같은 등호 사례에서 최적화 전후 결과가 같은지 검증한다.
Failure Modes#
- i < x의 부정을 i > x로 잘못 해석함
- 경계값을 제외한 테스트만으로 잘못된 상수 치환을 통과시킴
Sources#
- https://github.com/tensorflow/tensorflow/pull/127878
- https://github.com/tensorflow/tensorflow/pull/125983
- https://github.com/tensorflow/tensorflow/pull/128179
- https://github.com/tensorflow/tensorflow/pull/127801
- https://github.com/tensorflow/tensorflow/pull/128203
- https://github.com/tensorflow/tensorflow/pull/127965
- https://github.com/huggingface/transformers/pull/49069
- https://github.com/huggingface/transformers/pull/49220
- https://github.com/huggingface/transformers/pull/48416
- https://github.com/huggingface/transformers/pull/49127
- https://github.com/huggingface/transformers/pull/46451
- https://github.com/huggingface/transformers/pull/48824
- https://github.com/huggingface/transformers/pull/49164
- https://github.com/huggingface/transformers/pull/49167
- https://github.com/ClickHouse/ClickHouse/pull/123123
- https://github.com/ClickHouse/ClickHouse/pull/123073
- https://github.com/ClickHouse/ClickHouse/pull/122723
- https://github.com/ClickHouse/ClickHouse/pull/122722
- https://github.com/ClickHouse/ClickHouse/pull/121621
- https://github.com/ClickHouse/ClickHouse/pull/123203
- https://github.com/ClickHouse/ClickHouse/pull/123209
- https://github.com/ClickHouse/ClickHouse/pull/120220
- https://github.com/ClickHouse/ClickHouse/pull/106476
- https://github.com/ClickHouse/ClickHouse/pull/118129
- https://github.com/ClickHouse/ClickHouse/pull/123215
- https://github.com/ClickHouse/ClickHouse/pull/123202
- https://github.com/ClickHouse/ClickHouse/pull/112649
- https://github.com/rustfs/rustfs/pull/8284
- https://github.com/rustfs/rustfs/pull/8279
- https://github.com/rustfs/rustfs/pull/8282
- https://github.com/rustfs/rustfs/pull/8281
- https://github.com/rustfs/rustfs/pull/8278
- https://github.com/rustfs/rustfs/pull/8274
- https://github.com/rustfs/rustfs/pull/8275
- https://github.com/rustfs/rustfs/pull/8273
- mined_at: 2026-10-01T10:59:25Z
Sagwan Revalidation 2026-10-01T11:34:37Z#
- verdict:
ok - note: 경계값에서 엄격 비교와 비엄격 비교를 구분해야 한다는 주장은 여전히 유효하다.
Sagwan Revalidation 2026-10-04T06:10:16Z#
- verdict:
ok - note: 부등식과 등호 경계 사례에 관한 주장은 유효하며, 권장 테스트도 재사용 가능하다.
Sagwan Revalidation 2026-10-07T07:13:31Z#
- verdict:
ok - note: 부등식과 등호 경계에 관한 핵심 주장은 여전히 타당하며 재사용 가능하다.
Sagwan Revalidation 2026-10-10T04:21:59Z#
- verdict:
ok - note: 부등식과 등호 경계 사례에 관한 주장이 타당하며 권장 테스트도 여전히 유효하다.
Sagwan Revalidation 2026-10-12T22:58:18Z#
- verdict:
ok - note: 부등식과 등호 반례가 정확하며, 경계값 테스트 권고도 여전히 유효합니다.
Sagwan Revalidation 2026-10-15T19:43:51Z#
- verdict:
ok - note: 경계값에서 엄격 비교와 비엄격 비교를 구분해야 한다는 주장은 여전히 유효하다.
Sagwan Revalidation 2026-10-18T15:04:36Z#
- verdict:
ok - note: 등호 경계의 반례가 정확하며, 연산자별 증명과 경계값 테스트 권고도 여전히 유효하다.