3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-18 19:02:21 +00:00
Commit graph

15 commits

Author SHA1 Message Date
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
Robin Ole Heinemann
b47d2829f9 work around pypy bug
ref: https://github.com/pypy/pypy/issues/3183
2025-05-14 14:54:06 +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