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
Tommaso Fontana
680f5cacf2
Apply revng check-conventions --force-format
2025-09-10 12:05:14 +02:00
Giacomo Vercesi
1a515afe07
CLIProject: fix _load_model
...
Fix the `_load_model` method of `CLIProject`. Before this commit it
erroneously did not call `_set_model` on all codepaths, resulting in
cases where `self.model` was incorrectly missing the `_project` field.
2025-09-08 17:36:12 +02:00
Giacomo Vercesi
62421eeaa2
fetch debuginfo: switch default servers
...
Switch the default servers used by `fetch debuginfo` to revng-managed
ones, as especially the elfutils.org once has been spotty in the past.
2025-08-08 17:52:57 +02:00
Giacomo Vercesi
9f63c7c476
revng daemon: handle PipelineManager no init
...
Handle the case in `revng daemon` where the `PipelineManager` fails to
init. In this scenario the server responds to all requests with a 500
(with the exception of `/` and `/status`, which return 200).
2025-07-30 15:43:02 +02:00
Giacomo Vercesi
140a49d088
revng daemon: handle ClientDisconnect exceptions
...
Gracefully handle the occurrence of a `ClientDisconnect` exception while
processing requests in `revng daemon`.
2025-07-30 14:54:17 +02:00
Giacomo Vercesi
615b2a69f8
synchronizer: avoid using multipart
...
Change the `TransferConfig` used by `S3Synchronizer._upload_file` to
effectively never use multipart upload.
2025-07-28 12:45:11 +02:00
Giacomo Vercesi
f027129399
revng daemon: increase logging
...
Add additional logs to communicate when an upload happens, when a
produce is run and when an analysis is run.
2025-07-25 16:50:19 +02:00
Ivan Krysak
461c49df25
Model: bump version to 5 and introduce migration
2025-07-23 11:38:52 +02:00
Giacomo Vercesi
29d7f2d8a8
artifacts: allow parsing the recompilable archive
...
Allow the artifacts machinery to parse, via `pycparser`, the
recompilable archive provided by revng via the
`emit-recompilable-archive` artifact.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi
fb21b4aef3
revng.tupletree: drop enum_value_to_index
...
Drop the `enum_value_to_index` function, as it is unused in the entire
codebase.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi
d8ec6b7721
revng.model: add serialize() to all TTG types
2025-07-18 09:30:56 +02:00
Giacomo Vercesi
9665b55182
revng.tupletree: assert same type in diffing
...
Assert that the types are the same when diffing, instead of silently
returning an empty array.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi
82dccc0bea
revng.tupletree: add TypedListDescriptor
...
Add a class implementing the descriptor protocol to allow TypedList
fields to be assigned a `list` and automatically convert it to the
TypedList class.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi
a8f0a844bb
revng.project: fix auto-extraction bug
...
When producing artifacts, if the rank is 0 the only element should be
extracted from the produced dict. Fix a wrong assertion that checked
that the returned dict has 0 keys instead of 1.
2025-07-18 09:30:56 +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
1e857500fb
LLVMArtifact: work without zstd support
...
Have a fallback method that allows creating an llvm module even if the
LLVM used is not patched to read zstd-compressed modules.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi
69dc55fa9d
get_artifact: produce all when using binary
...
When passing the binary root object, produce all the targets.
2025-07-18 09:30:55 +02:00
Giacomo Vercesi
38b50c2977
tupletree: fix Reference class
...
Fix the `Reference` class, make it work with the new model and allow it
to be dereferences via the `_accessor` attribute.
2025-07-18 09:30:55 +02:00
Giacomo Vercesi
8065ebf634
Add revng.model.TypeId
...
Add a class that allows indexing `model.TypeDefinitions` with a single
object.
2025-07-18 09:30:55 +02:00
Giacomo Vercesi
f3cccf8bda
revng/project: make some attributes private
...
Rename some attributes to make them private, as they won't be used by
the end-user.
2025-07-18 09:30:55 +02:00
Giacomo Vercesi
460ffbf965
project: move some methods to Binary
...
Move some methods from the `Project` class to `model.Binary`.
2025-07-18 09:30:55 +02:00
Giacomo Vercesi
d22d9201f5
Artifact: replace dump() with raw_data
...
Replace the `dump()` function with the `raw_data` attribute.
2025-07-18 09:30:55 +02:00
Alessandro Di Federico
4378576eed
Python scripting: get_example_binary{,_path}
2025-07-18 09:29:09 +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
Giacomo Vercesi
8484f3c4b8
Fix backslash in f-string causing an error
...
In python versions prior to 3.12, using a backslash in an f-string would
cause a `SyntaxError`, change the expression to use string
concatenation.
2025-07-11 17:06:13 +02:00
Giacomo Vercesi
e8198eb862
pyproject.toml: add missing dependencies
2025-07-11 17:05:51 +02:00
Ivan Krysak
452612eaea
import-idb: fix misuse of PrimitiveType object
2025-06-27 17:42:27 +03:00
Giacomo Vercesi
d62b7b6b1a
TTG: inline root type in schema
...
Move the root type inside the schema definition, as it is a property of
it and not of the generator.
2025-06-25 15:40:13 +02:00
Giacomo Vercesi
087192cac4
mass-testing: add max_rss to database
...
Add the `max_rss` column to the database generated by the `revng
mass-testing generate-report` command.
2025-06-04 13:30:42 +02:00
Giacomo Vercesi
deeae6d904
mass-testing run: auto-detect max-jobs
...
With the information propagated by `meta.yml`, compute the maximum
number of jobs based on the max memory limit.
2025-06-04 13:30:42 +02:00
Giacomo Vercesi
f63cd5ff6f
mass-testing configure: add env to sample
...
Add an environment variable to the `revng mass-testing configure`
command that allows sampling the inputs to a limited amount.
2025-06-04 13:30:42 +02:00
Giacomo Vercesi
6e59f45c89
mass-testing configure: add env for seed
...
Add an environment variable that allows setting the seed of the RNG for
`revng mass-testing configure`. Drop the `--seed` command line option.
2025-06-04 13:30:42 +02:00
Giacomo Vercesi
14f951effe
mass-testing configure: change input format
...
Change the input format accepted by the `revng mass-testing configure`
command. This allows knowing in `meta.yml` the limits (ram, time)
imposed on each test set.
2025-06-04 13:30:41 +02:00
Giacomo Vercesi
8b9aad7292
mass-testing generate-report: fix exception
...
Fix an exception that happened when generating the report. In some cases
the `stacktrace.json` file has a line like this:
```
{"Address":"0x7f7","Error":{"Message":"No such file or directory"},"ModuleName":"linux-vdso.so.1"}
```
This is a valid line that maps to `(linux-vdso.so.1+0x7f7)`, however
this was not properly handled in the code. This commits fixes it so that
a dummy line is added and the line is skipped.
2025-06-04 13:30:41 +02:00
Giacomo Vercesi
130a2bfc9f
Command: fix typing of command in constructor
2025-06-04 13:30:41 +02:00
Ivan Krysak
f3cce00c3f
Migrations: fix the template
2025-05-08 15:42:01 +02:00
Ivan Krysak
0d868894a2
model::Function: switch to indices as comment keys
2025-05-08 15:42:00 +02:00
Giacomo Vercesi
89b17d2325
Python client: add user manual
2025-05-07 12:04:15 +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
de997ca2e4
python TTG: add mixins infrastructure
...
Add the infrastructure code needed to allow to add mixins to Tuple-Tree
Generated classes in python.
2025-05-07 10:48:50 +02:00
Giacomo Vercesi
0f6b6e00bd
Add revng init
...
Add a new `revng` command that allows to initialize a resume directory.
2025-05-07 10:48:49 +02:00
Giacomo Vercesi
8ba134bb45
TypedList: also implement mapping functions
...
Allow `TypedList`s to also be used as a dictionary-like structure if
the base class is keyable.
2025-05-07 10:48:47 +02:00
Giacomo Vercesi
d8fffc0980
Improve Python's TTG typing
...
Improve the typing signatures in a few place in the `revng.tupletree`
package and in the auto-generated python TTGs.
2025-05-07 10:48:46 +02:00
Jurij Srebrnič
3050b291b1
Implement diff and apply for python model wrapper
...
Add the necessary code for the python model wrapper to allow diffing and
applying a diff.
2025-05-07 10:48:45 +02:00
Jurij Srebrnič
3bc63b833e
Fixed python and typescript doc-test not executing
2025-05-07 10:48:23 +02:00