@cella-lang/c

中文文档
0.1.202611090959发布于 2026/11/09Apache-2.0零依赖近 30 天下载 2.2万

C11 for Cella Lang, as a branch of the C family's deep embedding (@cella-lang/cfamily): a C program is a data value (the JSON semorphe sends), checked by C's rules and run by its small-step semantics; verdicts (accept, reject, unknown with the clause of t

原始使用文档
文档目录4 节
  1. Programs
  2. Entries
  3. Loading
  4. Per-definition hashes

@cella-lang/c

C11 for the Cella proof checker, as a compiled module pack: the C branch of the C family's deep embedding (@cella-lang/cfamily). A program is checked by C11's rules and run by a small-step semantics; the verdict is accept, reject or unknown, with the node and the clause of the standard.

Depends on @cella-lang/cfamily and @cella-lang/machine.

Programs

The JSON of cfamily's syntax with "lang": {"k": "langC"}, on LP64. The branch covers the integer types with C's promotions and conversions, control flow (if, loops, switch, goto), arrays (multi-dimensional, variable length, const), pointers with their provenance, malloc, realloc and free, structs and unions, function pointers, floating point and <math.h>, <string.h> and <ctype.h>, printf, scanf and their string and file forms, strtok, qsort and bsearch, and standard input. A C program names no board (one that does is invalid: an Arduino program is C++).

Entries

  • c.verdict src input fuel: the verdict JSON (format in @cella-lang/cfamily); input is standard input, fuel bounds the steps. A verdict proved by the kernels: kernel_verdict_in("c", "c.verdict", …) in cella-lang.
  • c.types src candidates: the type query (format in @cella-lang/cfamily).
  • The debugger, for cella-lang/dap: load, run, stopConf, stopKind, stopNode, stopOut, stopErr, stopDetail, divergences, feed, globals, frames, setVarErr, setVarConf, env; and report input fuel session, a whole run with all the input given at once.

Loading

Load the packs into the cella-lang build named by index.json (checkerHash, cbfVersion; the peerDependencies pin it): the standard modules in index.requires["cella-lang"].modules, the packages in index.requires.packages (each the same way), then this package's modules in the order of index.modules.c.deps. cella-lang's README (Official packages) has the code.

Per-definition hashes

index.json lists, for every definition, own (its own content) and merkle (its content and everything it depends on). A definition whose merkle did not change between two versions means the same; a changed one is listed in CHANGES.md.

版本与发布记录

@cella-lang/c 共发布 134 个版本,首次发布于 2026/10/11;过去 12 个月发布了 134 个版本。

版本发布日期距今
0.1.202611090959latest2026/11/09今天
0.1.2026110909552026/11/09今天
0.1.2026110822142026/11/09今天
0.1.2026110809592026/11/081 天前
0.1.2026110805242026/11/081 天前
0.1.2026110804162026/11/081 天前

关于 @cella-lang/c 的常见问题

@cella-lang/c 是什么?

C11 for Cella Lang, as a branch of the C family's deep embedding (@cella-lang/cfamily): a C program is a data value (the JSON semorphe sends), checked by C's rules and run by its small-step semantics; verdicts (accept, reject, unknown with the clause of t

如何安装 @cella-lang/c?

在项目目录运行 npm install @cella-lang/c,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:cella-lang(0.1.202611090954)、@cella-lang/cfamily(0.1.202611090959)、@cella-lang/machine(0.1.202611090959)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cella-lang/c 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cella-lang__c 是否存在。

@cella-lang/c 可以商用吗?

@cella-lang/c 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@cella-lang/c 的下载量有多少?

根据 npm 官方下载统计,@cella-lang/c 在 2026/10/10 – 2026/11/08 这 30 天内被下载 21,552 次,日均约 718 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cella-lang/c 还在维护吗?

最新版本 0.1.202611090959 发布于 2026/11/09(今天);至今共发布 134 个版本,其中过去 12 个月发布了 134 个;首次发布于 2026/10/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。