434 Commits

Author SHA1 Message Date
Giacomo Vercesi ca3c5113d9 Add recompile-isolated to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 8f5e7feb4f Add recompile savepoint to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 159ca6b965 Add LinkForTranslation to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi af4b447f89 Add CompileRootModule to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 7462c2daeb Add LinkSupport to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi d5aeb306f6 Add YieldAssembly to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi a834f874c9 Add ProcessAssembly to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 080c5017f1 Add HexDump to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi b77833d2bf Add enforce-abi savepoint to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 77f925c792 Add PromoteCSVs to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi a685cd1055 Add EnforceABI to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 9f46ddac6b Add isolate savepoint to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 0758a95110 Add AttachDebugInfo to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 0df05f97b7 Add Isolate to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 819538a5df Add CollectCFG to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi cf52901d6d Add GenerateModelTypeDefinition to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi ddb36fc70f Add ModelToHeader to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi fe9dda7a13 Add lifted savepoint to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 95365c1fb9 Add PureLLVMPasses{Root,}Pipe to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 97b471c888 Add Lift to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 25d3541864 Add ImportFiles to pypeline 2025-11-18 17:47:54 +01:00
Giacomo Vercesi 3a5b5de96b ImportFiles: fix returned dependencies
Also return a dependency on the `/Binaries` vector, so that if an
element is added it also invalidates.
2025-11-18 17:47:54 +01:00
Giacomo Vercesi 1c07656448 pipebox.py: add initialize function
Add the `initialize` function to `pipebox.py`. This allows passing
command-line arguments to the pipebox.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 000d75dbb7 pypeline: add check_precondition to Pipe
Add the `check_precondition` function to the `Pipe` class. This will be
run before the actual schedule creates containers and runs itself
proper.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 38921a182c Pipe: drop incorrect assertion
In `prerequisites_for`, if a pipe has a container in `READ` then it
needs to be forwarded backward, not asserted on.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 5a530e66dc Savepoint: optimize run function
Optimize the `run` function to skip objects that have just been
serialized when deserializing objects for outgoing requests. For
example, previously if a schedule had for a savepoint:

```yaml
incoming: ["/binary"]
outgoing: ["/binary"]
```

then the `Savepoint.run` function would have first serialized the object
into storage and then deserialized it right after, instead with the new
function the object is only serialized.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 94e9712927 Requests: add overloaded get
Overload the `get` function of `Requests` so that, in addition to the
usual `Mapping` behavior, will return an empty `ObjectSet` if no default
is specified.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi a3a3967625 Pipeline: fix graph function
Fix a few bugs present in the `Pipeline.graph` function which lead to
the graph being completely unconnected.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 437d86d8cb Pipeline: improve schedule
Improve the `schedule` in the `Pipeline` class by introducing two
optimizations:
* Prune all the `ContainerDeclarations` that are not actually used.
* Skip all tasks that have no outgoing elements that would have been
  written by them.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 2875565b9f Pipeline: show minimized request on assertion
When asserting that a request should be empty, show a minimized version
with all the empty members removed, for ease of reading.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 964abca598 pypeline: allow multiple root nodes
Change the `Pipeline` class and `pypeline_parser.py` to allow multiple
root nodes to be specified when creating a `Pipeline` object.
2025-11-17 10:04:12 +01:00
Giacomo Vercesi d42cd5aeab pypeline: allow arbitrary config objects
Allow the `configuration` field of a pipe in a pipeline yaml file to be
of any type. When constructing the pipe object, the object will be
re-serialized via `yaml.dump` before being passed to the constructor.
2025-11-17 10:04:12 +01:00
Giacomo Vercesi c0e35d080e ContainerDeclaration: enable order
`ContainerDeclaration` needs to be orderable (e.g. have `__lt__`) to
allow `deterministic_sort_key` to work.
2025-11-17 10:04:12 +01:00
Giacomo Vercesi 824ec6194a PipelineNode: improve __repr__ function 2025-11-17 10:04:12 +01:00
Giacomo Vercesi d90f6ff0f5 revng2: use cache_directory from support 2025-11-17 10:04:12 +01:00
Giacomo Vercesi e38b55db64 pype project artifact: fix typo in code 2025-11-17 10:04:12 +01:00
Giacomo Vercesi ba4004691d pype project artifact: fix asking all objects
The `objects` argument was missing `required=False` which meant that all
invocations needed to specify the objects to request.
2025-11-17 10:04:12 +01:00
Giacomo Vercesi 32fd86d33a Pipe: drop name argument in constructor
Having a pipe's name different from its class name is useless, drop the
feature entirely.
2025-11-17 10:04:12 +01:00
Tommaso Fontana b38832e251 Pypeline: move epoch to storage_provider
Move the epoch inside the storage_provider, this allows us to make the
storage_provider_factory to return an async context manager.
This way we can simplify the locking for the daemon, but forces the
CLI project commands to deal with async code.
2025-11-11 17:15:28 +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 036411b441 Pypeline: add pipebox initialize and -- args
The pipebox now has to have an initialize function that is called with
all arguments passed to the CLI after --.
2025-11-11 17:15:28 +01:00
Tommaso Fontana a7f77b1704 Pypeline: propagate invalidated artifacts objects
Changed the API of storage_provider to treturn the invalidated object
ids and propagated this info to the CLI and daemon.
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 71fad8b361 Pypeline: replace load_container with from_file 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
Tommaso Fontana 2daa9f938e Pypeline: add mime_type and model_name to Model
Now the model has a mime_type that we expect to return to the UI, and
model_name so the name of the model on disk can be impl-specific.
Moreover, now Model and Container use the same logic to detect if
a mimetype is textual.
2025-11-11 17:15:27 +01:00
Tommaso Fontana 652ffbb0f7 Pypeline: remove abbreviations, normalize quotes 2025-11-11 17:15:27 +01:00
Alessandro Di Federico fd216ef374 daemon: improve logging 2025-10-28 11:43:22 +01:00
Giacomo Vercesi 6abba05d7e Introduce ImportFiles pipe
Introduce the `ImportFiles` pipe which leverages the newly-introduced
`FileStorage` to fetch the required files and store them in the
`BinariesContainer`.
2025-10-16 17:48:45 +02: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