Skip to content

Use UV to manage dependencies - #1

Open
awkless wants to merge 2 commits into
sefcom:masterfrom
awkless-forks:refac/uv-replacement
Open

awkless wants to merge 2 commits into
sefcom:masterfrom
awkless-forks:refac/uv-replacement

Conversation

@awkless

@awkless awkless commented Aug 28, 2026

Copy link
Copy Markdown

Description

First step of a much larger refactoring of the codebase. Instead of using extremely-simple-setup.sh to setup the build environment, we can leverage the UV package and project manager tool. The external static analysis repositories cloned by extremely-simple-setup.sh can be managed through Git submodules; including the patched code written by Bonnie Dong. From there, UV can be directed to build these submodules, and gather any remaining dependencies needed to run the test code for each PLC state machine.

Example workflow for fresh repository clones:

git submodule update --init --recursive
uv sync
cd elevator/test
uv run python test_elevator.py ARM

Notes

  1. The Taveren project does not use conventional Python project structures. Thus, I had to disable packaging to suppress UV build errors that complain about not using a flat or src project layout. Future pull requests will refactor the state machine recovery logic into Pythonic code structures to address this issue.

Took the Git repo dependencies listed in `extremely-simple-setup.sh` and
added them as submodules in the `external/` directory with the correct
commits checked out. Now we can get rid of that portion of the setup
script by simply calling `git submodule update --init --recursive`, and
all dependencies will be setup with the correct context.

Signed-off-by: Jason Pena <jasonpena@awkless.com>
Leverage UV project manager to collect and manage required dependencies
for Taveren. The required repositories needed to build the state
recovery machines used by the project have been added as submodules that
point to the required commits. We point UV to these submodules to build
the patched version of angr and claripy that Bonnie Dong coded. Thus,
the `extremely-simple-setup.sh` bootstrap script is now no longer
needed. A fresh build can simply perform the following commands if and
only if uv is already installed beforehand:

```
git submodule update --init --recursive
uv sync
```

We can now execute the tests through UV like so:

```
cd elevator/test
uv run python test_elevator.py
dot -Tpng graph/elevator.dot > graph/elevator.png
```

Note, this is the first step to refactoring the codebase of Taveren. In
order for UV to actually work, I needed to disable packaging in the
[tool.uv] section of `pyproject.toml`. Taveren does not use a proper
Python project structure. If packaging was not disabled, then UV would
complain that it does not know how to build the project, because there
are multiple module components that do not follow Python programming
conventions. We will need to fix this by using either the flat or src
project layouts as seen in standard Python projects and packages.

Signed-off-by: Jason Pena <jasonpena@awkless.com>
@awkless
awkless force-pushed the refac/uv-replacement branch from 5beab84 to 53939eb Compare August 28, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant