59 releases (6 breaking)
new 0.7.4 | Dec 3, 2024 |
---|---|
0.7.3 | Nov 28, 2024 |
0.6.14 | Nov 13, 2024 |
0.4.11 | Jul 30, 2024 |
0.1.1 | Dec 16, 2022 |
#67 in Development tools
1,939 downloads per month
770KB
15K
SLoC
liberty-db
Highlight Features
- Support all
liberty
attributes with typed datastructure, rather than syntax tree (AST) only, in the definition of Liberty Version R-2020.09, September 2020 - Support
liberty
boolean expression syntax, employ binary decesion diagram (BDD) to identify (hashing) - Parser & formatter are implemented by static macros, providing a decent preformance and tiny ~3MB
parser & formatter
binary. See benchmark summary - Support
define define_group
user-defined attributes - Verified with library-complier, well defined document, and examples provided
Usage
This library is implemented in Rust, with document.
[dependencies]
liberty_db = "0.7"
You can run examples with commands:
# example0
cargo run --example 0_parse_fmt
# example1
cargo run --example 1_parse_fmt_file -- dev/tech/cases/ocv.lib
# example2
cargo run --example 2_prune_lib -- dev/tech/cases/ocv.lib
Benchmark
Basic information as follow, see latest benchmark summary.
Project Comparison
Project | Lang | Version | Type Support | Boolean Expression | Comment | ||
---|---|---|---|---|---|---|---|
All | Partly | AST only | |||||
liberty-db | rust | latest | ✓ | ✓ | current version | ||
si2dr_liberty | C | 1.0 | ✓ | ✓ | Synopsys's version at 2005, many attributes are not supported | ||
OpenTimer | C++17 | 2 | ✓ | ✓ | STA tool's liberty component | ||
liberty-io | rust | 0.0.4 | ✓ | ||||
libertyparse | rust | 0.3.0 | ✓ | ✓ | |||
liberty2json | rust | 0.1.0 | ✓ |
Self Regression
Project | Lang | Version | Type Support | Boolean Expression | Comment | ||
---|---|---|---|---|---|---|---|
All | Partly | AST only | |||||
liberty-db | rust | latest | ✓ | ✓ | current version | ||
liberty-db | rust | 0.6.3 | ✓ | ✓ | published at 2024-09-07 | ||
liberty-db | rust | 0.5.9 | ✓ | ✓ | published at 2024-08-27 | ||
liberty-db | rust | 0.4.13 | ✓ | ✓ | published at 2024-08-13 | ||
liberty-db | rust | 0.3.1 | ✓ | published at 2023-08-03 |
Dev
Run unit-test and regression.
cargo test
cargo test --package dev
Run benchmark, it will takes 5h.
cargo bench --bench dev
TODO
-
Reconstruction:
- parser to
GroupBuilder
, e.g., useVec
to storeGroupSet
, no comment attribute - build/link
GroupBuilder
toGroup
, providing parent'sscope
, e.g.- all
Pin
name set to build BDD - supper group like
timing::TimingTableLookUp
- check all rules
- all
- parser to
-
Parse:
OnlyVec<NotNan<f64>>
andValue
complex attributes need quotes vector, usefast_float2::parse_partial
Fix error whenmake_golden
intrinsic_parasitic
groupleakage_current
groupdynamic_current
group
- async
- stream input
-
CI:
- only do comparsion after tag new version
- fast regression self in build.yml
-
Other:
- BDD use ArcStr
- Linked Group
- like IndexMap, only sort once and store
- bitcode support
-
Finished
userdefine
removeGroupWapper
,ComplexWapper
,SimpleWapper
. At leaset remove it in parser and formatterfix missing newline at enddingrecursive parse boolean expressionmacrosformat toliberty
support multi-line\
support commentUseMutSet
to store GroupMap
Dependencies
~3–4.5MB
~86K SLoC