3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-28 07:28:57 +00:00
Commit graph

337 commits

Author SHA1 Message Date
Krystine Sherwin
2aa8d266ad
Update unknown covers as well as asserts
Currently only applicable to smtbmc.
Also don't update assert depth during `cover` mode.
2025-07-08 15:47:33 +12:00
Krystine Sherwin
488d25b625
Don't use induction step for depth 2025-07-08 15:47:33 +12:00
Krystine Sherwin
4fc23bebec
Fix prop.tracefiles 2025-07-08 15:47:33 +12:00
Krystine Sherwin
b3f2889b9e
CSV tidying
Use the same function for csv formatting during live and status reporting.  Reads back the row for live reporting to get the full JOIN data.
Remove unused/unnecessary arguments for setting task property status.
Drop transaction wrapper from read-only db access.
2025-07-08 15:47:33 +12:00
Krystine Sherwin
98ef1c4182
More status tracking unification
- Status database only gets called from summary events instead of from engines.
- More trace witnesses (.aiw and .yw) are tracked as events.
- Multiple tracefiles can be included in the same trace summary, varying only by
  extension.  These are ordered by priority so that in the logfile only a single
  tracefile is listed.
- For engines where multiple properties can be collected for a single trace,
  these properties are now available for all traces until the next step.  If any
  properties are collected but never recorded with a trace, an error is raised.
- Fix formatting for events without steps (e.g. running abc with `vcd off`).
- Drop task_property_data table entirely, since it is now redundant and unused.
- Fix properties being skipped in all status dump if they don't have a trace.
2025-07-08 15:47:33 +12:00
Krystine Sherwin
f0aca6c75e
Add traces to database
Setting task property status accepts an optional trace id for associating a prop status with a trace.
Where relevant, delays adding prop status(es) to the database until the corresponding tracefile is known, similar to how tracefiles and prop statuses are linked during the summary.
2025-07-08 15:47:33 +12:00
Krystine Sherwin
1d233405bf
Warn on --livecsv in --status* block 2025-07-08 15:47:32 +12:00
Krystine Sherwin
48a5859a1e
Add kind to csv (and database) 2025-07-08 15:47:32 +12:00
Krystine Sherwin
4a14207b37
statuscsv: Better error handling 2025-07-08 15:47:32 +12:00
Krystine Sherwin
0fa5715909
Add --statuscsv
Prints summary of properties for each task, selecting only a single row for each unique status/property/task.  Prefers the earliest FAIL or the latest non-FAIL, using the same formatting as the `--livecsv`.
2025-07-08 15:47:32 +12:00
Krystine Sherwin
e2b1e85090
Add --livecsv
Gate csv dump on status updates.
Format 'csv' heading in yellow.
2025-07-08 15:47:32 +12:00
Krystine Sherwin
e9f4f06fe9
smtbmc updates db at each step
All properties marked UNKNOWN get dumped to the db for the previous step, each time the current step is updated.
2025-07-08 15:47:32 +12:00
Krystine Sherwin
a332b017e4
More depth tracking
`SbyTask::update_status()` optionally takes the current step/depth, which gets used for some solvers/engines when exiting to pass unknown properties.
btor engine tracks the current step, but it doesn't track/report which property triggered a CEX so it's only useful on exit.
Use data source as a fallback if engine isn't provided (such as when coming from the `task_status` instead of an engine update).
2025-07-08 15:47:31 +12:00
Krystine Sherwin
0367db76f5
Initial live csv dumping
Currently unconditional, and only for aiger and smtbmc.
Uses task.name from intertask cancellation.
Stores `time.time()` when calling `SbyStatusDb::create_task()` in order to calculate time since start of task (consider reducing to integer seconds).
2025-07-08 15:47:31 +12:00
Krystine Sherwin
f63cd46d12
Store task name in task and statusdb 2025-07-08 15:47:31 +12:00
Krystine Sherwin
de59dcc9c4
statusdb: Safer setup
Always call `_setup()`, but use `CREATE TABLE IF NOT EXISTS`. The sql schema doesn't include this, so inject it during the setup instead of adding it to the `SQLSCRIPT`.
2025-07-08 15:44:02 +12:00
Krystine Sherwin
3493f2152f
statusdb: Retry backoff for PRAGMAs 2025-07-08 15:44:02 +12:00
Krystine Sherwin
bd0d615b2a
Fix raw string 2025-07-08 15:44:02 +12:00
Krystine Sherwin
233d5f1264
Actually use foreign key constraints 2025-07-08 15:44:02 +12:00
Krystine Sherwin
a64f29de6c
Add note to bad schema exception
Requires python >= 3.11 (oss-cad-suite is 3.11.6, but there isn't any minimum python version given for SBY that I can find).
Makes the error less opaque (even though it still has the trace), which I think is necessary given that using the status db is totally optional and otherwise using a different version of SBY with an extra db field in a directory where a previous version has run will just crash with an obscure sqlite3.OperationalError.
2025-07-08 15:44:02 +12:00
Krystine Sherwin
10040ce859
Test status db schema
`--status` reports if the schema doesn't match.
`--statusreset` is able to perform a hard reset, dropping all the existing tables and calling `_setup()`.
2025-07-08 15:44:01 +12:00
Krystine Sherwin
ad9382d46c
Re-disable db debug mode 2025-07-08 15:44:01 +12:00
Krystine Sherwin
f84e648391
Better transaction control
Use context manager to handle commit/rollback.
Use `sqlite3.Connection.in_transaction` property instead of rolling our own.
Read-only methods don't need the transaction wrapper and we never read-update-write.
2025-07-08 15:44:01 +12:00
Krystine Sherwin
03244c4f96
Use a cursor for PRAGMAs 2025-07-08 15:44:01 +12:00
KrystalDelusion
236f0ec59c
Revert "work around pypy bug"
This reverts commit b47d2829f9.
2025-07-08 15:44:01 +12:00
Krystine Sherwin
ef8ca40a5d
Don't fail cover props on failed assert 2025-07-05 12:53:54 +12:00
Krystine Sherwin
4d8462b58e
Add cover_assert option 2025-07-05 11:17:05 +12:00
Krystine Sherwin
aa7d8ab4ce
Reapply "Remove asserts during cover mode"
This reverts commit 205245c827.
2025-07-02 18:00:28 +12:00
Krystine Sherwin
205245c827
Revert "Remove asserts during cover mode"
This reverts commit 81873292c9.
2025-07-02 17:59:46 +12:00
Krystine Sherwin
81873292c9
Remove asserts during cover mode 2025-07-02 17:57:31 +12:00
Robin Ole Heinemann
b47d2829f9 work around pypy bug
ref: https://github.com/pypy/pypy/issues/3183
2025-05-14 14:54:06 +01:00
SeddonShen
ca93e43cec feat(sby_engine_aiger): add rIC3 support for BMC mode 2025-03-18 16:06:16 +08:00
Yuheng Su
8da7174b16 update rIC3 backend
Signed-off-by: Yuheng Su <gipsyh.icu@gmail.com>
2024-12-17 04:41:58 +00:00
Yuheng Su
daf4e4cb39 Support rIC3 as backend
Signed-off-by: Yuheng Su <gipsyh.icu@gmail.com>
2024-12-16 11:02:45 +00:00
Krystine Sherwin
176e59c3d8
Replace (read_)ilang with (read_)rtlil 2024-11-05 12:55:09 +13:00
N. Engelhardt
0f13fc6bc7 fix lookup of mangled path names 2024-10-16 13:56:36 +02:00
George Rennie
9583985d06 smtbmc: match on full property paths instead of just names
* to address #296
* this also required some changes to the formatting of the output from
  smtbmc to allow more unambiguous parsing, so corresponds to a matching
  change in yosys
2024-09-24 03:13:07 +01:00
Jannis Harder
b8a001eab2 Add support for the imctk-eqy-engine
This is not added to the documentation, as this is currently intended
for internal use only.
2024-09-08 16:04:26 +02:00
Jannis Harder
8709c8a8ee Add --version option based on git describe 2024-07-08 18:39:23 +02:00
Jannis Harder
e0dda21555 abc: Support arbitrary prep abc commands 2024-04-19 16:40:30 +02:00
Emily Schmidt
da46e1984b Fixes issue #269 by removing an erroneous "if sbyfile" check.
This commit removes an erroneous "if sbyfile" that would turn '-f' into a no-op
for stdin input files. Presumably this check was originally intended to handle
the case of stdin input file and no specified workdir (which uses a temporary
workdir). In the current version the check is redundant for this particular
case. The check is erroneous in the case of stdin input file and a specified
workdir, so we simply remove the check.
2024-04-02 13:32:24 +01:00
KrystalDelusion
6c8b838eb3
Update sby_engine_abc.py
ABC will sometimes return negative frame numbers when proving by convergence, e.g.
```
engine_0: Proved output 1 in frame -698905656 (converged).
engine_0: Proved output 4 in frame -698905656 (converged).
```
This change fixes these properties being missed and causing the engine status to return UNKNOWN due to `proved_count != len(proved)`.
2024-03-12 10:48:26 +13:00
Jannis Harder
cba77083c3 Print a message when SBY is waiting for a config on stdin 2024-03-11 16:35:03 +01:00
Jannis Harder
fd381ade05 Print an error message when using "--status" with no project specified 2024-03-11 15:37:39 +01:00
Jannis Harder
b6e41a388b Support for the new anytime schedule in yosys-abc's pdr 2024-03-06 12:26:01 +01:00
Jannis Harder
d3a6f2d758 Emit status db update from aigsmt 2024-02-20 14:06:43 +01:00
Jannis Harder
6ba762db4c Support for "abc --keep-going pdr" via new "pdr -X" mode 2024-02-20 14:06:43 +01:00
Jannis Harder
52184e5bf0 Initial support for a multi-task property status database
This adds initial support for an sqlite database that is shared across
multiple tasks of a single SBY file and that can track the status of
individual properties.

The amount of information tracked in the database is currently quite
minimal and depends on the engine and options used. This can be
incrementally extended in the future.

The ways in which the information in the database can be queries is even
more limited for this initial version, consisting of a single '--status'
option which lists all properties and their status.
2024-02-20 13:34:58 +01:00
Jannis Harder
40bf8fcb87 sby_design: Also track fairness assumptions 2024-01-24 16:08:31 +01:00
Jannis Harder
881082c990 sby_design: Discover properties represented using $check cells 2024-01-22 18:11:16 +01:00