Commit Graph

105 Commits

Author SHA1 Message Date
Giacomo Vercesi 49b2c523ab Add revng merge llvm command
Add the `revng merge llvm` command which allows linking multiple LLVM
IR modules together into a single module.
2026-06-19 15:35:18 +02:00
Giacomo Vercesi 4f9e811110 pypeline: implement Pypeline Data Viewer
Implement the Pypeline Data Viewer, an HTTP server that allows browsing
the data stored by PRSS.
2026-06-17 17:48:13 +02:00
Giacomo Vercesi dfb9a36bb2 pypeline: implement compression
Implement compression of objects before they are saved into the storage
provider. Each container type can specify which algorithm to use
(currently `none` or `zstd`) and the compression level.
2026-06-17 10:06:35 +02:00
Giacomo Vercesi 828bd9c49f pypeline: add remote storage server
Add the PRSS (Pypeline Remote Storage Server) and the relay companion
server.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi ff4c899954 pypeline: add RSSStorageProvider
Add the storage provider (and factory) for the Pypeline Remote Storage
Server (PRSS).
2026-05-22 09:04:35 +02:00
Giacomo Vercesi 25b90139f0 pypeline: rotate notification broker code
Move around the code pertaining to the notification broker, making the
various roles a bit clearer. This also de-couple the broker logic from
the local revng daemon.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi 653f92514b pypeline: adopt hypercorn in place of uvicorn
Switch out from using uvicorn to hypercorn for the pypeline daemon, make
the facilities create hypercorn commands in stand-alone functions, as
they will be re-used for other servers later on.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi 40ae2d73dd Factor out BufferedReader in a standalone file
Move the `BufferedReader` class to a standalone file. This allows the
class to be reused in other packages.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi 6f6cffde3b LocalProvider: add object_id_string to objects
Add the `object_id_string` to the `objects` table. This is for
debugging purposes as it's hard to figure out what is what with binary
objects ids.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi d7d87e237a LocalProvider: add migration logic
Add additional logic to allow the local database to be migrated to newer
versions.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi e6bdae206e pypeline: notifications a duty of StorageProvider
Make the issuing of notification completely out of band with respect to
the `Pipeline`. Now the `StorageProvider` is responsible for providing
notifications to clients. Since some providers are local-only, there is
a `LOCAL_QUEUE` which allows sensing notifications through a local
queue, re-using the local revng daemon.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi dbc734f23a CMake: force use of Python3
Switch from using `find_package(Python ...)` to `find_package(Python3
...)` as it excludes that CMake picks a Python 2 version by accident.
2026-05-14 11:26:41 +02:00
Alessandro Di Federico 51323c4707 Introduce revng model export sqlite
This tool exports into a SQLite DB the prototypes of the functions in a
given model, along with the closure of its type dependencies.
2026-04-23 13:40:43 +02:00
Giacomo Vercesi 3a5dc835de revng.project: port to pypeline
Convert `revng.project` to use the `revng2` command-line and the `revng
project daemon` server instead of the legacy ones.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 90e8cce41e model: rework python mixin infrastructure
Rework the python mixin infrastructure for the model. Mixins are now
specified explicitly instead of using the `ast` module. The mixins are
loaded relative to the generated python file, this allows to have two
models: `revng.model` and `revng.project.model`. The latter is augmented
via mixins to have project-specific facilities such as `get_artifact`
and artifact accessors.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi f626dece53 Add revng2 project dump-pipeline
Add the `revng2 project dump-pipeline` command which allows emitting the
pipeline description from the command-line.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 6dc053e55c pypeline-daemon: rework error propagation
Rework how errors are propagated from the daemon code to the HTTP
client, creating an exception hierarchy to handle the most common
cases.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi 14d95a924d pypeline: rework fields in pipeline metadata
Rework which information is transmitted in the pipeline metadata,
avoiding redundancy and moving some information there instead of
returning it every time a request is made.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi a13cffab19 pypeline: rename pipeline metadata schema file
Rename the schema that describes the metadata of the pipeline from
`web_schema.yml` to `pipeline-description-schema.yml`.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi 773245b893 pypeline/cli: use dataclass for ctx.obj
Add typing to the `ctx.obj` object used to store pypeline-specific data
while parsing the command-line in click.
2026-03-31 17:00:48 +02:00
Ivan Krysak 754cfd57fe Model: introduce migration to version 9 2026-03-27 08:19:21 +00:00
Giacomo Vercesi 6b40322a3c revng2: implement wrappers
Implement wrappers in the `revng2` CLI, this allows running command with
e.g. `--gdb` to allow debugging.
2026-02-16 10:34:38 +01:00
Lauri Vasama aa2597d13b model::Function: add stack frame name and comment
* StackFrameType() is removed.
* StackFrame() is introduced in its place.
* Use StackFrame().Type() to acess the stack frame type.
2026-02-13 08:41:39 +02:00
Giacomo Vercesi d7e605fe63 pypeline: add debug mode
Add the functionality the the pipeline infrastructure and CLI to run
individual pipe and analyses as subcommands instead of in-process. This
allow better debuggability of individual pipes.
2026-01-29 15:00:12 +01:00
Giacomo Vercesi 62c1b44a54 revng: allow execution while in a venv
If a venv is running, the `revng` script should re-exec to allow the
correct modules to be loaded and allow running the `main` function of
the respective modules.
2026-01-29 14:54:24 +01:00
Giacomo Vercesi cda0a9e508 revng2: allow execution in build directory
Change the logic in `python/scripts/revng` to allow executing it as
`revng2`. This allows running `revng2` in the build directory.
2026-01-29 14:26:42 +01:00
Tommaso Fontana 91299b0c18 Pypeline: change daemon pipeline format
Now the dameon's pipeline endpoint doesn't return just the parsed yaml
but it returns a format that's easier to use for the UI.
2025-11-24 16:41:15 +01:00
Tommaso Fontana 8ae70d85d4 Pypeline: replace logging with custom log
Now the pype command has a `--verbose` argument that to enable debug
logging in the pypelien code.
Adapted the codebase to use this new logging format but replacing
`logging` with `revng.pypeline.utils.logger`, this is done in
preparation of debug-log.
2025-11-11 17:15:28 +01:00
Tommaso Fontana 0ad8e8c849 Pypeline: add pypeline.daemon
Add implementation of the generic pype daemon.
It's implementation is split into `daemon.py` where we implement an
http framework agnostic interface, and `app.py` that uses it to serve
them using starlette.
2025-11-11 17:15:28 +01:00
Tommaso Fontana 639593164a Pypeline: add autocomplete and refactor CLI
Now pype has an `autocomplete` command usable to enable autocompletion
and revng2 now is based on `pype`, modifying its defalults and
injecting new commands.
2025-11-11 17:15:27 +01:00
Giacomo Vercesi b622fe8f19 Implement FileProvider interface
Implement the `FileProvider` interface, this allows pipes to request
files given a `FileRequest` (hash and optional size/name).
2025-10-16 17:48:45 +02:00
Giacomo Vercesi 40da49548b Add Binaries list to the model
Add to the model an entry detailing the list of input binaries under
`Binaries`. This will be referenced by `Segments` when needed.
2025-10-16 17:48:45 +02:00
Ivan Krysak 00ea93c99e TTG: move metaschema.yml to share/revng/ 2025-10-13 18:33:10 +03:00
Lauri Vasama 653d451e6c Remove undef name configuration support
Also adds a model migration removing
Configuration.Naming.UndefinedValuePrefix.
2025-09-29 18:05:55 +03:00
Giacomo Vercesi 688b9fe111 Introduce compatibility with revng-pypeline
Add the necessary machinery to allow `Pipe`s, `Analysis`es,
`Container`s, `Model` and `ObjectID` to be implemented in C++ and used
by Python.
2025-09-17 14:02:40 +02:00
Tommaso Fontana 80eb02c207 Pypeline: merge pypeline 2025-09-10 12:05:15 +02:00
Tommaso Fontana 2778458539 Prepare CMakeLists for pypeline merge
Readme and pyproject for revng and revng_internal to the projects
folders.
Updated CMakeLists.txt so we can specify the README and pyproject
paths.
2025-09-10 12:05:15 +02:00
Ivan Krysak 461c49df25 Model: bump version to 5 and introduce migration 2025-07-23 11:38:52 +02:00
Giacomo Vercesi 78e66e0d08 cli: move model import idb in separate dir
Move the two python scripts that compose the `revng model import idb`
command into a separate subdirectory.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi 35b65797eb python: integrate README.md into python package
Allow the README of each respective package to be read by the build
machinery to integrate it into the packages' metadata.
2025-07-15 10:46:19 +02:00
Giacomo Vercesi 5a05b834ed python: autogenerate module version for wheels
Autogenerate a different version for wheels every time the project is
configured.
2025-07-15 10:46:19 +02:00
Ivan Krysak 0d868894a2 model::Function: switch to indices as comment keys 2025-05-08 15:42:00 +02:00
Giacomo Vercesi 890a735610 test_docs: add ignoreoutput option for python
Sometimes the output of a command is not important, in these cases
`doctest` complains nonetheless. This commit introduces a
`IGNORE_OUTPUT` option which still allows checking that the command
executes correctly but skips the checking of the output with the
expected one. In addition to this the `test_docs` command now can parse
a `ignoreoutput` option in the python block which will:
* if numbers are specified (e.g. `ignoreoutput=1,2`): the specified
  line numbers will have `# doctest: +IGNORE_OUTPUT` added at the end
  of the specified line numbers.
* Without numbers (e.g. `{python ignoreoutput}`) then all lines will
  have a `# doctest: +IGNORE_OUTPUT` appended.
2025-05-07 10:48:54 +02:00
Giacomo Vercesi 3e3779498e Implement python interface for revng
Add a python interface (`revng.profile`) for interacting with the rev.ng
infrastructure as a whole; either through the CLI (`CLIProject`) or the
GraphQL API (`DaemonProject`).
2025-05-07 10:48:51 +02:00
Giacomo Vercesi e95ad01ff8 Implement revng llm-rename 2025-05-05 17:28:48 +02:00
Giacomo Vercesi 591107cdce Overhaul PTML functionality
The logic of the `revng ptml` command was too tightly coupled with the
parsing of the xml. Overhaul the structure of the ptml code and split it
in two locations:
* `revng.ptml`: this module contains functions that allow easy
  manipulation of PTML, both for printing it and for obtaining the split
  metadata/text version.
* `revng.internal.cli._commands.ptml`: this implements the actual `revng
  ptml` command. This leverages the new logic in the `revng.ptml` module
  while maintaining the same functionality.
2025-05-05 17:28:48 +02:00
Giacomo Vercesi bfed42ed1e Add revng.support.get_llvmcpy helper
Add the `get_llvmcpy` helper function which returns an instance of
`LLVMCPy` which uses the `llvm-config` that's present in the search
paths.
2025-05-05 16:02:40 +02:00
Khaled Ismaeel 9d80594ddc Bump model version to v3 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 8b355fc896 Add primitive support for generating migrations 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 9b07b3bcce Add primitive migration support to the CLI 2025-04-30 15:08:45 +02:00