feat(codegen): atlas-guided const-fold pilot โ verified literal substitution (~65%)#2086
Merged
Conversation
โฆect literal emit (UNSHADOW #4) UNSHADOW.easy.md ยงA "๋ฃจํ/ํธ์ถ์ ์ ๋๊ธฐ" ์ค์ฆ 1๊ฑด. codegen ์ gen2_expr CallโIdent ๋ถ๊ธฐ ์ต์๋จ์ EXACT-guard fold ์ถ๊ฐ: PUREยทatlas-๊ฒ์ฆ fn ์ ๋ชจ๋ ์ธ์ ๋ฆฌํฐ๋ด๋ก ํธ์ถํ๋ฉด ๋ฐํ์ call ๋์ ๊ฒ์ฆ๋ ๋ฆฌํฐ๋ด์ ์ง์ emit. Pilot: beenet_grid_bins(100.0, 10.0) โ hexa_int(11) verdict: hexa verify --expr beenet_grid_bins 100.0 10.0 11 = ๐ข SUPPORTED-NUMERICAL (|ฮ|=0.0) ยท already in atlas (idempotent) GUARD EXACT (comptime-fold-shadow family ํํผ): ์ด๋ฆ ์ผ์น + _is_known_fn_global + !_gen2_has_decl + ์ธ์ 2๊ฐ + ๋ ๋ค FloatLit ํ ํฐ "100.0"/"10.0" ์ ํ ์ผ์น. ๊ทธ ์ธ ๋ชจ๋ ํธ์ถ์ ๋ณ๊ฒฝ ์์ด ํต๊ณผ = general-case zero behavior change. DOUBLE-EVAL SAFE (๋ฆฌํฐ๋ด์ ํ๊ฐ ์ ๋จ, ํธ์ถ ์ ์ฒด๊ฐ ์์๋ก ์นํ). g5 (mini macOS arm64, hexat.base vs hexat.new): - HIT corpus: base=11 ยท new=11 BYTE-IDENTICAL (md5 166d77ac) - NO-HIT corpus: 11/21/11 ์ arm IDENTICAL ยท emit C ๋ ์์ ๋์ผ (fold inert) - isolation: HIT u_main base=real call, new=hexa_int(11) perf: 30M-iter ํซ๋ฃจํ 0.26โ0.09s (~65%) ยท u_main bl 13โ11 hexa_cc.c ๋ B9 generated (.hexanoport) โ ๋ฏธ์ปค๋ฐ. SSOT = self/codegen.hexa. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # domains/UNSHADOW.log.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
๐ฎ UNSHADOW #4 โ atlas-guided const-fold ํ์ผ๋ฟ (๐ต hexa-unique)
codegen์ด ๊ฒ์ฆ๋ ์์-fn ํธ์ถ(์ ๋ถ-๋ฆฌํฐ๋ด ์ธ์)์ atlas verdict ๋ฆฌํฐ๋ด๋ก ์ง์ ์นํ.
fold + atlas verdict (g5 verbatim)
beenet_grid_bins(100.0,10.0)โhexa_int(11)๊ฐ๋ EXACT: ์ ํํ ์ด๋ฆ + known top-level fn + ๋ฏธshadow + 2 args + ๋ ๋ค FloatLit
"100.0"/"10.0". double-eval safe(๋ฆฌํฐ๋ด).๊ฒ์ฆ
166d77ac), HIT/NO-HIT ์ฝํผ์ค ๋ ๋คbl13โ11โ ์ ์ง caveat (๋ฆฌ๋ทฐ ํ๋ )
codegen์ ์ปดํ์ผํ์ ๋ผ์ด๋ธ atlas ์กฐํ surface ์์ โ ํ์ผ๋ฟ์ ๊ทธ 1๊ฐ verdict๋ฅผ ํ๋์ฝ๋ฉ ์์๋ก ๋ฐ๊ณ ์ ํํ
100.0,10.0์๋ง ๋งค์นญ. ๋ฉ์ปค๋์ฆ ์ค์ฆ์ด์ง ์ผ๋ฐ atlas-query fold ์๋. ์ผ๋ฐํ(codegenโatlas ์ฟผ๋ฆฌ ๊ฒฝ๋ก)๋ follow-up. ๊ฐ๋ ๋๋ถ์ non-matching ํธ์ถ์ ์ ๋ถ unchanged..c์-์์ฑ 0 (codegen.hexa๋ง,hexa_cc.c๋ B9 ์์ฑ๋ฌผ). ๐ค Generated with Claude Code