Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
32bc3e3
state_exec: grammar spec, conformance cases and parse corpus (grammar…
transfix Oct 17, 2026
1381d6d
state_exec grammar: make the nesting limit configurable (default 256)
transfix Oct 17, 2026
c6486e2
state_exec grammar: parser settings live on the state tree
transfix Oct 17, 2026
e221ac7
state_exec: parser settings on the state tree, with a nesting limit (…
transfix Oct 17, 2026
7a4b4b1
state_exec: make the parser stackless (explicit frame stack, resumabl…
transfix Oct 17, 2026
c040bdd
state_exec: read submitted scripts inside the process, a slice per step
transfix Oct 17, 2026
97c2a92
state_exec: the app's exec scheduler reads scripts in steps (1024 tok…
transfix Oct 17, 2026
9ed8702
pycvc: give Exec the same state_exec defaults as the app's exec sched…
transfix Oct 17, 2026
753abb1
pycvc: expose the state_exec parser-settings surface under its C++ names
transfix Oct 17, 2026
ffa9a26
pycvc: parse_options_from_state takes the State root, as in C++
transfix Oct 17, 2026
2a697c0
pycvc: state_exec parity part 1 (values, parsing, parse_error, value …
transfix Oct 17, 2026
73b3f7a
pycvc: state_exec parity part 2 (environments, builtins, schedulers)
transfix Oct 18, 2026
cd292e0
Merge master into feat/pycvc-state-exec-parity (#653 landed)
transfix Oct 18, 2026
40d0ce2
Merge branch 'feat/pycvc-state-exec-parity' into feat/pycvc-state-exe…
transfix Oct 18, 2026
0c24a14
Rerun CI on master (the merge push ran while the PR still targeted #6…
transfix Oct 18, 2026
b2b772a
pycvc: environment.frozen (#660), and the set_existing note now that …
transfix Oct 18, 2026
41411dc
Merge master into feat/pycvc-state-exec-parity (#658 landed: keep its…
transfix Oct 18, 2026
4f05226
Merge #661 (with master: #658) into feat/pycvc-state-exec-parity-2; w…
transfix Oct 18, 2026
8b18056
Merge master (#661 squash-merged as 50c6d02, plus #665/#667/#663) int…
transfix Oct 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/pycvc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ if(CVC_BUILD_PYCVC_CORE)
pycvc_exec_async:test_pycvc_exec_async.py
pycvc_exec_coro:test_pycvc_exec_coro.py
pycvc_state_exec:test_pycvc_state_exec.py
pycvc_state_exec_sched:test_pycvc_state_exec_sched.py
pycvc_world_clock:test_pycvc_world_clock.py
pycvc_world_units:test_pycvc_world_units.py
pycvc_dataprep:test_pycvc_dataprep.py
Expand Down
26 changes: 25 additions & 1 deletion bindings/pycvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,28 @@ Values convert to native Python types, with `pycvc.symbol` for symbols and
`pycvc.value` as an opaque handle for closures and other non-data values. Such
a handle converts back to the same value when passed into the DSL. Conversion
is strict: non-`str` dict keys, ints outside 64 bits and unsupported types
raise. Contract tests: `test_pycvc_exec.py`, `test_pycvc_state_exec.py`.
raise.

The schedulers are the real classes too, with environments, builtins and the
process types:

```python
from pycvc import process_status, scheduling_policy
env = pycvc.builtins.make_default_environment()
pycvc.builtins.register_fn(env, "greet", lambda n: "hi " + n) # a Python callable
opts = pycvc.execute_options()
opts.env = env
opts.on_complete = print # called with the result
sched = pycvc.scheduler(scheduling_policy.round_robin) # or pycvc.async_scheduler()
pid = sched.execute('(greet "ann")', opts)
sched.run() # {pid: 'hi ann'}; releases the GIL
sched.get_process_info(pid).status # process_status.terminated
ex.scheduler().list_processes() # Exec's own async_scheduler
```

The enums are `enum.IntEnum` classes, and an enum argument must be one of their
members. Where C++ returns an empty `std::optional` or a null pointer, Python gets
`None`, except for a value: `get_result`, `pop_pending_message` and
`environment.lookup` raise `KeyError` instead, because `None` is the nil value.
Contract tests: `test_pycvc_exec.py`, `test_pycvc_state_exec.py`,
`test_pycvc_state_exec_sched.py`.
Loading
Loading