MoonBit Liberty standard-cell library parser, NLDM queries and semantic comparison
python scripts/setup-toolchain.py
. ./scripts/use-toolchain.ps1
python scripts/check-toolchain.py --pinnedmoon update
moon test --target native --deny-warn
moon build --release --deny-warn
moon run cmd/moon-liberty -- inspect tests/fixtures/ihp-sg13g2-typ.lib --json
moon run cmd/moon-liberty -- lint tests/fixtures/ihp-sg13g2-typ.lib --json
moon run cmd/moon-liberty -- query tests/fixtures/ihp-sg13g2-typ.lib --cell sg13g2_inv_1 --pin Y --related A --table cell_rise --slew 1e-10 --load 2e-14 --jsonmoon run cmd/moon-liberty -- normalize tests/fixtures/basic.lib -o normalized.lib
moon run cmd/moon-liberty -- diff tests/fixtures/basic.lib normalized.lib --json
moon run cmd/moon-liberty -- extract tests/fixtures/ihp-sg13g2-typ.lib --cells sg13g2_inv_1 -o inv.lib
moon run cmd/moon-liberty -- truth "!(A & B)" --jsonimport {
"SongYZZZ/moon-liberty" @liberty,
}moon run cmd/moon-liberty -- compat tests/fixtures/liberty2017/preserve-models.lib --standard 2017.06 --json
moon run cmd/moon-liberty -- expand tests/fixtures/liberty2017/include-main.lib --sources tests/fixtures/liberty2017/sources.json --standard 2017.06 -o expanded.lib| 入口 | 用途 |
|---|---|
| parse_standard / compatibility_report | 显式版本与已实现格式规则报告 |
| parse_fragment / parse_liberty_sources | 完整语句片段与有界 include 展开 |
| tokenize / parse_liberty / write_liberty | 词法、通用 AST、保留扩展的写出 |
| load_library / lint_library | 建模与结构、引用及表格检查 |
| read_units / parse_unit | 声明单位解析,不猜测缺失单位 |
| validate_units / ModelLimits | 公开单位对象复验、多名称引脚展开与工作预算 |
| standard_findings / standard_rule_ids | 已实现标准结构检查及规则目录 |
| read_table_data / validate_table_data | 标量至三维格式读取和形状校验,不执行三维插值 |
| validate_table / lookup_table | 校验和标量、一维、二维插值 |
| query_timing | 组合弧的秒/法拉输入和秒输出 |
| parse_logic / evaluate_logic / truth_table | 布尔函数和有界真值表 |
| compare_libraries / select_cells | 变更审计与上下文保留的单元提取 |
moon test --target js -p SongYZZZ/moon-liberty --deny-warn
moon test --target wasm-gc -p SongYZZZ/moon-liberty --deny-warn
python scripts/audit-invariants.py --executable _build/native/release/build/cmd/moon-liberty/moon-liberty.exe
python scripts/verify.py --executable _build/native/release/build/cmd/moon-liberty/moon-liberty.exe --identity
pwsh scripts/fetch-oracle.ps1
python scripts/oracle_check.py --executable _build/native/release/build/cmd/moon-liberty/moon-liberty.exe
python scripts/fetch-corpus.py
python -m pip install --target .tools/corpus-oracle -r scripts/corpus-oracle-requirements.txt
python scripts/corpus_check.py --executable _build/native/release/build/cmd/moon-liberty/moon-liberty.exe
moon bench --target native -p SongYZZZ/moon-liberty/benchmarkspub(all) struct Change {
kind : ChangeKind
path : String
before : String?
after : String?
preview_truncated : Bool
} derive(Eq, Debug)pub(all) struct CompatibilityReport {
standard : StandardEdition
library : String
findings : Array[Finding]
features : Array[FormatFeature]
roundtrip_verified : Bool
complete_conformance : Bool
} derive(Debug)fn compare_libraries(left : Library, right : Library, max_changes? : Int) -> Comparison raise LibertyErrorfn compatibility_report(root : Group, standard? : StandardEdition) -> CompatibilityReport raise LibertyErrorfn load_library(text : String, limits? : Limits, model_limits? : ModelLimits) -> Library raise LibertyErrorfn lookup_table(table : Table, x : Double, y? : Double, policy? : RangePolicy) -> Lookup raise LibertyErrorfn parse_liberty_sources(text : String, sources : Map[String, String], limits? : Limits) -> Group raise LibertyErrorfn query_timing(library : Library, cell_name : String, pin_name : String, related_pin : String, table_kind : String, slew_seconds : Double, load_farads : Double, condition? : String, policy? : RangePolicy) -> TimingQuery raise LibertyErrorInstall
Download zipMoonBit Liberty standard-cell library parser, NLDM queries and semantic comparison