{"id":50128615,"url":"https://github.com/Alignof/Human_C_Compiler_Contest","last_synced_at":"2026-06-09T13:01:14.327Z","repository":{"id":45359966,"uuid":"429312442","full_name":"Alignof/Human_C_Compiler_Contest","owner":"Alignof","description":"HCCC -Human C Compiler Contest-","archived":false,"fork":false,"pushed_at":"2023-09-27T12:52:13.000Z","size":36,"stargazers_count":51,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-27T06:44:37.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alignof.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-18T05:51:11.000Z","updated_at":"2025-09-16T18:53:43.000Z","dependencies_parsed_at":"2023-01-23T07:31:35.333Z","dependency_job_id":null,"html_url":"https://github.com/Alignof/Human_C_Compiler_Contest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Alignof/Human_C_Compiler_Contest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2FHuman_C_Compiler_Contest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2FHuman_C_Compiler_Contest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2FHuman_C_Compiler_Contest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2FHuman_C_Compiler_Contest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alignof","download_url":"https://codeload.github.com/Alignof/Human_C_Compiler_Contest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alignof%2FHuman_C_Compiler_Contest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-23T21:00:29.529Z","updated_at":"2026-06-09T13:01:14.322Z","avatar_url":"https://github.com/Alignof.png","language":"Assembly","funding_links":[],"categories":["Assembly"],"sub_categories":[],"readme":"# 人間Cコンパイラコンテスト(Human C Compiler Contest / HCCC)\n人間Cコンパイラコンテスト(HCCC)とは文字通り競技者自身がCコンパイラとなり\nC言語からアセンブリを生成し，その時間と正確さを競う競技です．  \n与えられるソースコードの中にはコンパイルエラーを出す必要の\nある仕様上間違ったものも含まれています．  \nこのような場合にはコンパイルエラーを出してアセンブリの生成を拒否する必要があります．\n\nつまり，競技者にはC言語の仕様の知識とアセンブリ，ABIの仕様の知識などの低レイヤの力が求められます．\n逆に言えば，競技を通してこれらの力が付くとも言えます．\n豊富なチュートリアルを用意する予定なので，これから低レイヤの領域に触れようという方も是非チャレンジしてほしいなと思います．\n\n## お知らせ\n第3回となる大会が9月30日に行われるSECCONのイベント，SECCONCONで開催します．\n詳しくは以下のリンクをご覧ください．\n[https://www.seccon.jp/2023/seccon_contest/secconcon_1.html](https://www.seccon.jp/2023/seccon_contest/secconcon_1.html)\n\n## チュートリアル\n[https://github.com/Alignof/HCCC_Tutorial](https://github.com/Alignof/HCCC_Tutorial)\n\n## 競技規則\n第3回大会では問題の掲載/提出を行う競技システムと手元でデバッグするための検証環境を用意して以下のような規則で実施する．\n\n### A. 競技概要\n1. 本コンテストは与えられたC言語のソースコードを決められた仕様に沿って解釈し対象となるアーキテクチャのアセンブリを出力する競技である．\n1. 競技者は，与えられたソースコードが仕様上正しければ（コンパイル可能なら）アセンブリに変換し，ソースコードが仕様上正しくなければ（コンパイルエラーを出すべきなら），\n変換を行わずにコンパイル不可であることと正しくないと思われる箇所の最初の行数を示す．\n1. 第3回大会では以下の仕様を基準に競技を行う．\n    1. C言語の仕様はC99に則る[^C99]．\n    1. ABIの仕様はSystem V Application Binary Interfaceの仕様に従う[^ABI]．\n    1. 対象アーキテクチャはx86\\_64とRISC-Vとする．\n    1. 記法はAT\u0026Tとintel記法の双方を許可する．\n    1. アセンブラにはGNU assemblerを使用する[^GAS]．\n1. 第3回大会では評価基準を以下のように定める．\n    1. 各問題に点数を与え，その得点で順位を決定する．\n    1. 得点が同じ場合は最後に正答した回答を提出した順番で順位づけを行う．\n    1. 誤答した場合はその問題でACしたことにより得た得点から誤答の数に応じて減点する（誤答1回に対して1点減点）．減点はACした問題にのみ適用される（マイナスの得点にはならない）．\n    1. 誤答のうちコンパイルできるはずのものにコンパイルエラーを出した場合（WCとなった場合），以後は提出が不可能となる．\n\n### B. 競技システム\n1. 回答が正しいかどうかはジャッジシステムで行う．ジャッジシステムはテストケースを与えて判定を行ったり問題につけられた制約を確認したりする．\n1. ジャッジシステムは以下のいずれかの結果を返す．\n    - AC(**Ac**cepted): 正答．\n    - WA(**W**rong **A**nswer): テストケースの出力が正しくない．\n    - WC(**W**rong **C**ompile error): 本来正しいプログラムにコンパイルエラーを出した．\n    - AE(**A**ssembler **E**rror): アセンブラのエラー．\n    - LE(**L**inker **E**rror): リンカのエラー．\n    - RE(**R**untime **E**rror): 実行時のエラー．\n    - TLE(**T**ime **L**imit **E**xceeded): 実行制限時間オーバー．\n    - Pending: ジャッジ待ち．\n    - SystemError: 上記以外のエラー．運営によるリジャッジが行われる可能性がある．\n1. ジャッジシステムはAE, LE, REなどの場合に各エラーを競技者に表示する．\n1. 実行の制限時間は2000msとする．\n1. ジャッジは以下の環境で行われる．\n    ```\n    $ uname -a \n    Linux 31d57f0f4274 6.5.4-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 21 Sep 2023 11:06:39 +0000 x86\\_64 GNU/Linux\n    $ lld --version\n    Debian GLIBC 2.31-13+deb11u6\n    $ gcc --version\n    gcc (GCC) 12.2.0\n    $ as --version\n    GNU assembler (GNU Binutils for Debian) 2.35.2\n    $ ld --version\n    GNU ld (GNU Binutils for Debian) 2.35.2\n    ```\n\n[^C99]:[https://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf](https://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf)\n[^ABI]:[https://uclibc.org/docs/psABI-x86_64.pdf](https://uclibc.org/docs/psABI-x86_64.pdf)\n[^GAS]:NASM使いのひとごめんなさい．\n\n### C. 許可事項\n競技者は特に以下のことを許可される．\n1. 紙，鉛筆，電卓などを用いること．\n1. 指定された仕様書の閲覧．\n1. 指定された検証環境を使ってローカルでデバッグを行う．\n1. 検証環境内での生成した実行ファイルに対するgdbの使用．\n1. 人間による恣意的な最適化[^1]．\n\n[^1]: 一部の問題では明示的に許可されない場合がある．\n\n### D. 禁止事項\n競技者は特に以下のことを禁止される．\n1. 既存のコンパイラを使用すること．\n1. その他既存のツールを使用すること．\n1. コンパイラやツールを自作して使用すること．\n1. 他者と回答を共有すること．\n1. 回答にジャッジサーバを攻撃するような処理を埋め込むこと．\n\n## 当日の流れ\n1. 競技サーバへの登録と検証環境の配布\n1. 注意事項の連絡\n1. 競技開始\n1. 競技\n1. 競技終了\n1. 結果発表\n1. 解説\n\n## Director\n2022 11.16  \nNorimasa TAKANA  \ngithub: [https://github.com/Alignof/](https://github.com/Alignof/)  \nTwitter: [https://twitter.com/\\_Alignof](https://twitter.com/_Alignof)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlignof%2FHuman_C_Compiler_Contest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlignof%2FHuman_C_Compiler_Contest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlignof%2FHuman_C_Compiler_Contest/lists"}