经 AI Skill Hub 精选评估,Vera:LLM编程语言 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
Vera是一种专门为LLM设计的编程语言,允许开发者使用LLM写代码。它提供了强大的功能,包括形式验证、契约和算术效果等,极大地提高了代码质量和可靠性。
Vera:LLM编程语言 是一款基于 Python 开发的开源工具,专注于 installable、algebraic-effects、contracts 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
Vera是一种专门为LLM设计的编程语言,允许开发者使用LLM写代码。它提供了强大的功能,包括形式验证、契约和算术效果等,极大地提高了代码质量和可靠性。
Vera:LLM编程语言 是一款基于 Python 开发的开源工具,专注于 installable、algebraic-effects、contracts 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install vera
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install vera
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/aallan/vera
cd vera
pip install -e .
# 验证安装
python -c "import vera; print('安装成功')"
# 命令行使用
vera --help
# 基本用法
vera input_file -o output_file
# Python 代码中调用
import vera
# 示例
result = vera.process("input")
print(result)
# vera 配置文件示例(config.yml) app: name: "vera" debug: false log_level: "INFO" # 运行时指定配置文件 vera --config config.yml # 或通过环境变量配置 export VERA_API_KEY="your-key" export VERA_OUTPUT_DIR="./output"
Vera (v-ERR-a) is a programming language designed for large language models to write. The name comes from the Latin veritas (truth). Programs compile to WebAssembly and run at the command line or in the browser.
public fn safe_divide(@Int, @Int -> @Int)
requires(@Int.1 != 0)
ensures(@Int.result == @Int.0 / @Int.1)
effects(pure)
{
@Int.0 / @Int.1
}
There are no variable names. @Int.0 is the most recent Int binding; @Int.1 is the one before. The requires clause is a precondition the compiler checks at every call site. The ensures clause is a postcondition the SMT solver proves statically. The function is pure — no side effects of any kind. If any of this is wrong, the code does not compile.
A precondition like requires(@Int.1 != 0) becomes a static obligation: the SMT solver proves it holds at every call site, or refuses to compile. A program that calls safe_divide with a divisor the verifier can't prove non-zero is a compile error, not a runtime error.
public fn safe_divide(@Int, @Int -> @Int)
requires(@Int.1 != 0)
ensures(@Int.result == @Int.0 / @Int.1)
effects(pure)
{
@Int.0 / @Int.1
}
The verifier checks the contracts the programmer wrote. A function that performs @Int.1 / @Int.0 without a guarding precondition will type-check, verify, and trap at runtime if called with a zero divisor — with a Vera-native diagnostic explaining how to add the missing precondition. Automatically synthesising obligations for primitive operations is the principled long-term move and tracked in #680.
git clone https://github.com/aallan/vera.git
cd vera
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Tested in CI on every commit:
Untested but expected to work (wheels available for all dependencies):
Out of scope — pip install -e . will fail at dependency resolution (clear "no matching distribution" error rather than a cryptic source-build failure):
The macOS 15+ baseline reflects TelemetryDeck's macOS version distribution data: macOS 26 (~75%) and macOS 15 (~24%) account for ~99% of the macOS install base; macOS 14 is ~1.4% and falling. The cost of supporting older macOS versions does not earn its keep at that share.
$ vera check examples/absolute_value.vera
OK: examples/absolute_value.vera
$ vera verify examples/safe_divide.vera
OK: examples/safe_divide.vera
Verification: 4 verified (Tier 1)
$ vera run examples/hello_world.vera
Hello, World!
vera check parses and type-checks. vera verify adds contract verification via Z3 — Tier 1 contracts (decidable arithmetic, comparisons, Boolean logic, ADTs, termination) are proved automatically; contracts Z3 cannot decide become Tier 3 runtime checks. vera run compiles to WebAssembly and executes.
vera run file.vera --fn f -- 42 # call function f with argument 42
vera compile --target browser file.vera # emit browser bundle
vera test file.vera # contract-driven testing via Z3 + WASM
vera fmt file.vera # format to canonical form
vera verify --json file.vera # JSON diagnostics for agent feedback loops
vera check --explain-slots file.vera # show slot resolution table (which @T.n maps to which param)
vera version # print the installed version
vera compile --target browser produces a self-contained bundle (wasm + JS runtime + HTML) that runs in any browser — no build step, no bundler. Mandatory parity tests ensure identical behaviour between the command-line and browser runtimes for the pure-language surface (arithmetic, ADTs, pattern matching, closures, contracts, effects-as-host-imports, etc.). The IO surface is the documented exception: terminal Vera programs that rely on IO.sleep for animation pacing or ANSI escape codes for cursor control compile cleanly to --target browser but render the escapes as literal text and freeze the tab while sleeping — the browser target expects Vera to be the pure simulation core and JavaScript to drive timing and rendering (SKILL.md §Browser compilation has the recommended pattern).
Vera是一种有前景的编程语言,提供了强大的功能和易于使用的界面,适用于需要形式验证和契约的项目。然而,仍然需要进一步的开发和测试来提高其稳定性和可靠性。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Vera:LLM编程语言 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | vera |
| Topics | installablealgebraic-effectscontractsformal-verificationllmparserpython |
| GitHub | https://github.com/aallan/vera |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-28 · 更新时间:2026-05-28 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。