moon-liberty

    MoonBit Liberty standard-cell library parser, NLDM queries and semantic comparison

    liberty
    eda
    standard-cell
    nldm
    timing
    Download zip
    Author
    Version
    0.4.4
    License
    Apache-2.0
    Last updated
    7 days ago
    Downloads
    106

    #MoonLiberty

    MoonLiberty:芯片标准单元库的 Liberty 解析、NLDM 时序查询与变更审计工具。

    **标准基线固定为 Synopsys Liberty 2017.06。**最终目标是该版本完整格式读写与格式层规则闭环;当前 0.4.4 仍为部分实现,完整符合性明确标为 false。标准兼容契约说明终点、缺口及与受限求值的关系,复审说明说明本轮改动。

    原创 MoonBit 基础库与原生命令行,面向 PDK 维护者、EDA 工具作者和数字电路教学。将文本库转成可检查的结构,按明确的物理单位查询延迟,并在库升级时指出具体字段、逻辑函数或时序表变化。实现使用 Apache-2.0;作者为宋永振(SongYZZZ)。

    #可以实际完成的工作

    • 带行列位置和资源上限的 Liberty 词法、分组及属性解析,保留未知厂商属性和分组,确定性写出。
    • 单元、引脚、时序弧和模板建模;支持 pin(A,B) 多名称标量引脚,检查重复名称、无效数值、引脚引用、函数引用及表格形状。
    • 标量、一维和二维 NLDM 表校验及插值;组合弧查询把秒、法拉映射到声明的库单位,结果输出秒。
    • 布尔函数解析、求值和有输入数上限的真值表。
    • 按结构路径比较库:忽略注释、属性顺序及部分等价数值写法,保留未知字段的差异;选择单元时保留所有库级上下文。
    • 显式标准版本 compat 报告、受控 include 展开、扩展声明及 18 族可追溯结构规则;包括总线、状态表、模板、三维表格和 30 种 2017.06 LVF 矩表的格式检查。
    • 九个原生命令、JSON 输出及明确退出码;写文件默认拒绝覆盖,失败时不发布部分结果。

    本工具不是完整 STA、工艺签核或电气等价证明系统;格式化成功也不代表语义无误。CCS/ECSM/LVF、三维查表、总线展开等不在当前求值范围内,详见支持矩阵。

    #快速运行

    要求 moonc ≥ 0.10.16。当前及 CI 使用 SDK/core 0.10.16+b1a0e846e,固定信息见 toolchain.json;原生后端需 C 工具链。Windows x64 可在仓库根安装独立工具链并选择当前终端:

    python scripts/setup-toolchain.py . ./scripts/use-toolchain.ps1 python scripts/check-toolchain.py --pinned

    安装器校验固定归档,仅写入忽略的 .tools/moon016,下载缓存默认在 D:/Dev/Temp(存在时),不更改全局 PATH 或已有 SDK。其他平台按官方安装说明选择上述 SDK 和对应 core,并运行 python scripts/check-toolchain.py。之后所有命令从本仓库根目录运行:

    moon 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 --json

    公开 IHP SG13G2 样本的实际结果为 84 单元、285 引脚、384 时序弧、1199 表格,当前规则下 lint 为 0 错误、0 警告。上面的查询得到约 1.1540884836886305e-10 秒,未钳位、未外推。这个结果只表示该表的插值结果。

    格式化、比较、提取与布尔函数:

    moon 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)" --json

    已有输出需显式传入 --force。命令行退出码:0 为成功或无差异,1 为 lint/compat 检查发现错误或 diff 发现差异,2 为参数、解析、查询或文件错误。可执行文件位于 _build/native/release/build/cmd/moon-liberty/moon-liberty.exe;Linux 的此版本 MoonBit 也使用 .exe 文件名。

    #用作 MoonBit 库

    项目名为 SongYZZZ/moon-liberty;可用 moon add SongYZZZ/moon-liberty 添加;实际发布版本及独立消费证据见 CONSUMER。moon.pkg 显式设置易读的包别名:

    import {
    "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

    三个标准案例附有 33 次 CLI 执行断言。格式完整兼容的目标包含 CCS/LVF、总线、状态和功耗结构;当前对这些数据保留、审计并明确不求值。

    主要 API:

    入口用途
    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变更审计与上下文保留的单元提取

    库函数使用 LibertyError 报错,包含错误码、消息和位置;lint 返回含严重级别、结构路径和位置的 Finding。CLI 的异步 IO 与纯计算核心分包,核心无运行时领域依赖,可在 native、JS、Wasm GC 使用。设计及数据契约说明返回值、单位、选择条件和差异含义。

    #验证与独立核对

    原生 361 项测试通过;纯核心 336 项测试分别在 JS、Wasm GC 通过。另有 30 次原 CLI、33 次标准 CLI 检查,不变量流程 70 次 CLI 调用(含 55 次高精度 Decimal 对照);新增语料流程有 89 次 CLI 调用,其中 72 次为 Nangate 四个单元上的独立数值核对。使用独立 Python Liberty 解析器对真实库核对结构清单、完整往返、单元提取,并核对 IHP 12 个单元上的 312 次时序数值查询,另加 Nangate 72 次,共 384 次。独立工具仅作为可选测试过程,未复制进 MoonBit 实现或运行时依赖。

    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/benchmarks

    原 IHP oracle 获取脚本需要 gh 及 GitHub API 认证;其核对脚本只用 Python 标准库。新增多来源核对使用另一份独立 GPL-3.0-or-later 读取器,依赖只安装到忽略的 .tools/corpus-oracle。测试工具版本、许可证、命令、实测性能和限制见验证记录与来源说明。仓库 CI 会重复严格编译、三后端测试、CLI 验收与独立核对。

    #贡献与问题反馈

    请提供 SDK 版本、最小可公开的 .lib 样本、实际命令和诊断;敏感工艺数据请先脱敏。行为修复应有针对性回归用例。运行 moon fmt、moon check --deny-warn 和相关测试后提交,范围扩展需同步支持矩阵。

    测试数据来自 Apache-2.0 的 IHP Open PDK,原始头部、固定版本和 SHA-256 均保留。它不是本项目移植来源,也不能证明工艺资格或完整标准符合性。详见 NOTICE 和 LICENSE。

    0.4.0 新增:单元局部 type 的作用域与遮蔽、ff 必需方程、公开数值对象复验、SI 前缀大小写、极值插值与逻辑引号身份修复。新增 Decimal 合成数据对照与 384 次真实库查询分别统计,不相加冒充真实样本数量。全部未完成标准项仍列在标准契约中。

    0.4.1 为保守修复版:统一表格形状校验、拒绝缺轴具名表的标量退化,严格解析 CLI 整数选项,并补齐 latch 的字段配对/状态值检查。SR 锁存器仍可省略 data_in/enable;公开 API 签名与 0.4.0 一致。

    0.4.2:补齐文件及 include 片段开头 UTF-8 BOM 的输入兼容,写出统一不带 BOM;修复紧邻裸值的续行、注释中 NUL 漏检、statetable 内部节点引用误报和有限外推的中间溢出。接口与求值范围保持一致。

    0.4.3 按 2026-10-29 提供的九项验收指南升级工具链。迁移新版 JSON 构造及格式器的 Int32/默认参数规范写法,代表用例的 JSON 和写出内容与旧版一致;详见逐项验收证据。完整标准符合性仍为 false。

    0.4.4 补齐显式宽度、单端点与方向下的总线成员边界检查;修复扩展属性使用复杂语法绕过声明检查、重复作用域诊断放大及负转换时间外推。每个单元只建立一次状态引用环境,4096 个状态组的压力用例已纳入 CI;详见复查报告。

    LibertyError

    pub(all) suberror LibertyError {
    LibertyError(String, String, Position)
    } derive(
    Debug
    )

    LibertyError::render

    fn LibertyError::render(self : LibertyError) -> String

    Atom

    pub(all) enum Atom {
    Word(String)
    Text(String)
    } derive(Eq,
    Debug
    )

    Atom::equal

    fn Atom::equal(Atom, Atom) -> Bool

    Atom::not_equal

    fn Atom::not_equal(x : Atom, y : Atom) -> Bool

    Atom::to_repr

    Cell

    pub(all) struct Cell {
    name : String
    area : Double?
    pins : Array[Pin]
    source : Group
    } derive(
    Debug
    )

    Cell::pin

    fn Cell::pin(self : Cell, name : String) -> Pin?

    Cell::to_repr

    Change

    pub(all) struct Change {
    kind : ChangeKind
    path : String
    before : String?
    after : String?
    preview_truncated : Bool
    } derive(Eq,
    Debug
    )

    Change::equal

    fn Change::equal(Change, Change) -> Bool

    Change::not_equal

    fn Change::not_equal(x : Change, y : Change) -> Bool

    Change::to_repr

    ChangeKind

    pub(all) enum ChangeKind {
    Added
    Removed
    Modified
    } derive(Eq,
    Debug
    )

    ChangeKind::equal

    fn ChangeKind::equal(ChangeKind, ChangeKind) -> Bool

    ChangeKind::not_equal

    fn ChangeKind::not_equal(x : ChangeKind, y : ChangeKind) -> Bool

    Comparison

    pub(all) struct Comparison {
    total_changes : Int
    changes : Array[Change]
    truncated : Bool
    } derive(Eq,
    Debug
    )

    Comparison::equal

    fn Comparison::equal(Comparison, Comparison) -> Bool

    Comparison::not_equal

    fn Comparison::not_equal(x : Comparison, y : Comparison) -> Bool

    CompatibilityReport

    pub(all) struct CompatibilityReport {
    standard : StandardEdition
    library : String
    findings : Array[Finding]
    features : Array[FormatFeature]
    roundtrip_verified : Bool
    complete_conformance : Bool
    } derive(
    Debug
    )

    Finding

    pub(all) struct Finding {
    code : String
    severity : Severity
    path : String
    message : String
    position : Position
    } derive(Eq,
    Debug
    )

    Finding::equal

    fn Finding::equal(Finding, Finding) -> Bool

    Finding::not_equal

    fn Finding::not_equal(x : Finding, y : Finding) -> Bool

    Finding::to_repr

    FormatFeature

    pub(all) struct FormatFeature {
    family : String
    occurrences : Int
    evaluation : String
    } derive(Eq,
    Debug
    )

    FormatFeature::equal

    FormatFeature::not_equal

    fn FormatFeature::not_equal(x : FormatFeature, y : FormatFeature) -> Bool

    Group

    pub(all) struct Group {
    kind : String
    arguments : Array[Array[Atom]]
    items : Array[Node]
    position : Position
    } derive(Eq,
    Debug
    )

    Group::attribute

    fn Group::attribute(self : Group, name : String) -> Array[Atom]?

    Group::complex

    fn Group::complex(self : Group, name : String) -> Array[Array[Atom]]?

    Group::equal

    fn Group::equal(Group, Group) -> Bool

    Group::groups

    fn Group::groups(self : Group, kind : String) -> Array[Group]

    Group::name

    fn Group::name(self : Group) -> String

    Group::not_equal

    fn Group::not_equal(x : Group, y : Group) -> Bool

    Group::text

    fn Group::text(self : Group, name : String) -> String?

    Group::to_repr

    Inventory

    pub(all) struct Inventory {
    cells : Int
    pins : Int
    arcs : Int
    tables : Int
    errors : Int
    warnings : Int
    } derive(Eq,
    Debug
    )

    Inventory::equal

    fn Inventory::equal(Inventory, Inventory) -> Bool

    Inventory::not_equal

    fn Inventory::not_equal(x : Inventory, y : Inventory) -> Bool

    Library

    pub(all) struct Library {
    name : String
    units : Units?
    cells : Array[Cell]
    templates : Array[Group]
    findings : Array[Finding]
    source : Group
    } derive(
    Debug
    )

    Library::cell

    fn Library::cell(self : Library, name : String) -> Cell?

    Library::inventory

    fn Library::inventory(self : Library) -> Inventory

    Library::to_repr

    Limits

    pub(all) struct Limits {
    max_input_chars : Int
    max_tokens : Int
    max_token_chars : Int
    max_depth : Int
    max_nodes : Int
    } derive(Eq,
    Debug
    )

    Limits::default

    fn Limits::default() -> Limits

    Limits::equal

    fn Limits::equal(Limits, Limits) -> Bool

    Limits::not_equal

    fn Limits::not_equal(x : Limits, y : Limits) -> Bool

    Limits::to_repr

    Logic

    pub(all) enum Logic {
    Signal(String)
    Constant(Bool)
    Not(Logic)
    And(Logic, Logic)
    Or(Logic, Logic)
    Xor(Logic, Logic)
    } derive(Eq,
    Debug
    )

    Logic::equal

    fn Logic::equal(Logic, Logic) -> Bool

    Logic::not_equal

    fn Logic::not_equal(x : Logic, y : Logic) -> Bool

    Logic::to_repr

    Lookup

    pub(all) struct Lookup {
    value : Double
    clamped : Bool
    extrapolated : Bool
    x_interval : Int
    y_interval : Int?
    } derive(Eq,
    Debug
    )

    Lookup::equal

    fn Lookup::equal(Lookup, Lookup) -> Bool

    Lookup::not_equal

    fn Lookup::not_equal(x : Lookup, y : Lookup) -> Bool

    Lookup::to_repr

    ModelLimits

    pub(all) struct ModelLimits {
    max_pins : Int
    max_work : Int
    } derive(Eq,
    Debug
    )

    Bounds expansion of shared pin declarations and repeated validation work.

    ModelLimits::default

    fn ModelLimits::default() -> ModelLimits

    ModelLimits::equal

    fn ModelLimits::equal(ModelLimits, ModelLimits) -> Bool

    ModelLimits::not_equal

    fn ModelLimits::not_equal(x : ModelLimits, y : ModelLimits) -> Bool

    Node

    pub(all) enum Node {
    Attribute(String, Array[Atom], Position)
    Complex(String, Array[Array[Atom]], Position)
    Section(Group)
    } derive(Eq,
    Debug
    )

    Node::equal

    fn Node::equal(Node, Node) -> Bool

    Node::not_equal

    fn Node::not_equal(x : Node, y : Node) -> Bool

    Node::to_repr

    Pin

    pub(all) struct Pin {
    name : String
    direction : String?
    capacitance : Double?
    max_capacitance : Double?
    max_transition : Double?
    function : String?
    timings : Array[TimingArc]
    source : Group
    } derive(
    Debug
    )

    Pin::to_repr

    Position

    pub(all) struct Position {
    offset : Int
    line : Int
    column : Int
    } derive(Eq,
    Debug
    )

    Position::equal

    fn Position::equal(Position, Position) -> Bool

    Position::not_equal

    fn Position::not_equal(x : Position, y : Position) -> Bool

    Position::to_repr

    Quantity

    pub(all) enum Quantity {
    Time
    Capacitance
    Voltage
    } derive(Eq,
    Debug
    )

    Quantity::equal

    fn Quantity::equal(Quantity, Quantity) -> Bool

    Quantity::not_equal

    fn Quantity::not_equal(x : Quantity, y : Quantity) -> Bool

    Quantity::to_repr

    RangePolicy

    pub(all) enum RangePolicy {
    Reject
    Clamp
    Extrapolate
    } derive(Eq,
    Debug
    )

    RangePolicy::equal

    fn RangePolicy::equal(RangePolicy, RangePolicy) -> Bool

    RangePolicy::not_equal

    fn RangePolicy::not_equal(x : RangePolicy, y : RangePolicy) -> Bool

    Severity

    pub(all) enum Severity {
    Warning
    Error
    } derive(Eq,
    Debug
    )

    Severity::equal

    fn Severity::equal(Severity, Severity) -> Bool

    Severity::not_equal

    fn Severity::not_equal(x : Severity, y : Severity) -> Bool

    Severity::to_repr

    StandardEdition

    pub(all) enum StandardEdition {
    Liberty2017_06
    } derive(Eq,
    Debug
    )

    A declared interpretation target, never automatic version detection.

    StandardEdition::equal

    StandardEdition::label

    fn StandardEdition::label(self : StandardEdition) -> String

    StandardEdition::not_equal

    fn StandardEdition::not_equal(x : StandardEdition, y : StandardEdition) -> Bool

    Table

    pub(all) struct Table {
    kind : String
    template_name : String
    variable_1 : String?
    variable_2 : String?
    index_1 : Array[Double]
    index_2 : Array[Double]
    values : Array[Double]
    position : Position
    } derive(Eq,
    Debug
    )

    Table::equal

    fn Table::equal(Table, Table) -> Bool

    Table::not_equal

    fn Table::not_equal(x : Table, y : Table) -> Bool

    Table::to_repr

    TableData

    pub(all) struct TableData {
    kind : String
    template_name : String
    axes : Array[Array[Double]]
    rows : Array[Array[Double]]
    position : Position
    } derive(Eq,
    Debug
    )

    Format representation of scalar through 3-D tables, without physical evaluation. Rows of a 3-D table follow (index_1, index_2), with index_3 inside each row.

    TableData::equal

    fn TableData::equal(TableData, TableData) -> Bool

    TableData::not_equal

    fn TableData::not_equal(x : TableData, y : TableData) -> Bool

    TimingArc

    pub(all) struct TimingArc {
    related_pins : Array[String]
    timing_type : String?
    timing_sense : String?
    condition : String?
    tables : Array[Table]
    position : Position
    } derive(
    Debug
    )

    TimingQuery

    pub(all) struct TimingQuery {
    cell : String
    pin : String
    related_pin : String
    table_kind : String
    condition : String?
    slew_seconds : Double
    load_farads : Double
    seconds : Double
    raw_value : Double
    clamped : Bool
    extrapolated : Bool
    } derive(Eq,
    Debug
    )

    TimingQuery::equal

    fn TimingQuery::equal(TimingQuery, TimingQuery) -> Bool

    TimingQuery::not_equal

    fn TimingQuery::not_equal(x : TimingQuery, y : TimingQuery) -> Bool

    Token

    pub(all) struct Token {
    kind : TokenKind
    text : String
    position : Position
    } derive(Eq,
    Debug
    )

    Token::equal

    fn Token::equal(Token, Token) -> Bool

    Token::not_equal

    fn Token::not_equal(x : Token, y : Token) -> Bool

    Token::to_repr

    TokenKind

    pub(all) enum TokenKind {
    Bare
    Quoted
    Symbol
    End
    } derive(Eq,
    Debug
    )

    TokenKind::equal

    fn TokenKind::equal(TokenKind, TokenKind) -> Bool

    TokenKind::not_equal

    fn TokenKind::not_equal(x : TokenKind, y : TokenKind) -> Bool

    TruthRow

    pub(all) struct TruthRow {
    inputs : Array[(String, Bool)]
    output : Bool
    } derive(Eq,
    Debug
    )

    TruthRow::equal

    fn TruthRow::equal(TruthRow, TruthRow) -> Bool

    TruthRow::not_equal

    fn TruthRow::not_equal(x : TruthRow, y : TruthRow) -> Bool

    TruthRow::to_repr

    Units

    pub(all) struct Units {
    time_seconds : Double
    capacitance_farads : Double
    voltage_volts : Double?
    } derive(Eq,
    Debug
    )

    Units::equal

    fn Units::equal(Units, Units) -> Bool

    Units::not_equal

    fn Units::not_equal(x : Units, y : Units) -> Bool

    Units::to_repr

    atom_text

    fn atom_text(atom : Atom) -> String

    atoms_text

    fn atoms_text(atoms : Array[Atom]) -> String

    build_library

    fn build_library(root : Group, model_limits? : ModelLimits) -> Library raise LibertyError

    compare_libraries

    fn compare_libraries(left : Library, right : Library, max_changes? : Int) -> Comparison raise LibertyError

    comparison_json

    fn comparison_json(comparison : Comparison) -> Json

    compatibility_json

    fn compatibility_json(report : CompatibilityReport) -> Json

    compatibility_report

    fn compatibility_report(root : Group, standard? : StandardEdition) -> CompatibilityReport raise LibertyError

    Check implemented format rules and report separate format/evaluation coverage. complete_conformance remains false until the full edition checklist is closed.

    evaluate_logic

    fn evaluate_logic(expression : Logic, values : Map[String, Bool]) -> Bool raise LibertyError

    findings_json

    fn findings_json(findings : Array[Finding]) -> Json

    finite_number

    fn finite_number(text : String, position? : Position) -> Double raise LibertyError

    format_logic

    fn format_logic(expression : Logic) -> String raise LibertyError

    inventory_json

    fn inventory_json(library : Library) -> Json

    lint_json

    fn lint_json(library : Library) -> Json

    lint_library

    fn lint_library(library : Library) -> Array[Finding]

    load_library

    fn load_library(text : String, limits? : Limits, model_limits? : ModelLimits) -> Library raise LibertyError

    logic_signals

    fn logic_signals(expression : Logic) -> Array[String] raise LibertyError

    lookup_table

    fn lookup_table(table : Table, x : Double, y? : Double, policy? : RangePolicy) -> Lookup raise LibertyError

    number_list

    fn number_list(atoms : Array[Atom], position? : Position) -> Array[Double] raise LibertyError

    parse_fragment

    fn parse_fragment(text : String, limits? : Limits) -> Array[Node] raise LibertyError

    Parse an include_file body as complete statements, never as a text splice.

    parse_liberty

    fn parse_liberty(text : String, limits? : Limits) -> Group raise LibertyError

    parse_liberty_sources

    fn parse_liberty_sources(text : String, sources : Map[String, String], limits? : Limits) -> Group raise LibertyError

    Resolve caller-supplied include sources without reading the filesystem. Nested includes and cross-group fragments are rejected (2017.06 include rules).

    parse_logic

    fn parse_logic(text : String) -> Logic raise LibertyError

    parse_standard

    fn parse_standard(text : String) -> StandardEdition raise LibertyError

    parse_unit

    fn parse_unit(text : String, quantity : Quantity) -> Double raise LibertyError

    query_json

    fn query_json(query : TimingQuery) -> Json

    query_timing

    fn 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 LibertyError

    read_table

    fn read_table(group : Group, template? : Group) -> Table raise LibertyError

    read_table_data

    fn read_table_data(group : Group, template? : Group) -> TableData raise LibertyError

    Read and validate format data independently of the scalar/1-D/2-D evaluator.

    read_units

    fn read_units(root : Group) -> Units raise LibertyError

    select_cells

    fn select_cells(library : Library, names : Array[String]) -> Group raise LibertyError

    standard_findings

    fn standard_findings(root : Group) -> Array[Finding]

    Apply documented, implemented 2017.06 rules. This is not complete conformance.

    standard_rule_ids

    fn standard_rule_ids() -> Array[String]

    Identifiers of implemented rule families, not an exhaustive manual inventory.

    tokenize

    fn tokenize(text : String, limits? : Limits) -> Array[Token] raise LibertyError

    truth_table

    fn truth_table(expression : Logic, max_inputs? : Int) -> Array[TruthRow] raise LibertyError

    validate_table

    fn validate_table(table : Table) -> Unit raise LibertyError

    validate_table_data

    fn validate_table_data(data : TableData) -> Unit raise LibertyError

    validate_units

    fn validate_units(units : Units) -> Unit raise LibertyError

    Validate public, possibly caller-constructed unit scales before arithmetic.

    write_liberty

    fn write_liberty(group : Group, limits? : Limits) -> String raise LibertyError