Commit Graph

136 Commits

Author SHA1 Message Date
Ivan Krysak 31068f3d43 Pipeline: introduce an optional model path 2025-05-07 10:48:49 +02:00
Giacomo Vercesi e3074ec29a revng artifact: omit kind
When working with `revng artifact`, omit the kind in both the output of
`--list` and the parameters taken specifying which targets to produce.
2025-05-07 10:48:48 +02:00
Alessandro Di Federico 3db971b8b4 Pipeline: invalidate if *any* input is invalidated
We used to invalidate only if *all* inputs were invalidated.
2025-05-07 08:36:44 +02:00
Giacomo Vercesi 50caf5ef9e Pipeline: allow analyses to not be available
An analysis can implement the `isAvailable` function which can tell
users if the analysis is available or not to be run.
2025-05-05 17:28:48 +02:00
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 531d9b866c Remove the now-redundant HEADERS list 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 63469c9cd6 Use unified YAML schemas in the build process
In this commit we instruct the build system to use the unified schema
files  instead of collecting the `TUPLE-TREE-YAML` comments.

The fixes to C++ files are necessary because they depend on the order
of the fields in the schema, which was changed.
2025-04-30 15:08:45 +02:00
Giacomo Vercesi 11f1e532c6 Implement dirty bit on Container
Add a `Dirty` boolean to the `ContainerBase` class. This will be set to
true when the container mutates itself (e.g. remove, mergeBack, clear).
The dirty bit is reset when running `PipelineManager.store`.
2025-04-03 15:59:18 +02:00
Giacomo Vercesi 87872f9fc5 PipelineManager: add save-after-every-analysis
Add a command-line option to pipeline that saves after every analysis is
run.
2025-03-13 18:03:50 +01:00
Giacomo Vercesi f666c70358 storeInvalidationMetadata: avoid file corruption
Wrap `ZstdCompressedOstream` in a scope, as this forces flushing its
output when destroyed. Without flushing the output, the invalidation
metadata could end up being half-written, resulting in a parsing error
and crash on the next startup of the pipeline.
2025-02-25 09:17:25 +01:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Alessandro Di Federico 2128a80cc8 Preserve metadata after Function::deleteBody
Also, introduce and adopt a simple helper class to get this right.
2025-01-28 12:19:16 +01:00
Giacomo Vercesi 05041a302a PipelineManager: save after running analyses
Save the context after an analysis (or analyses-list) has run. This
guarantees that at least the model is preserved in case of crash.
2024-12-20 12:24:28 +01:00
Alessandro Di Federico 1e2a55e372 Minor changes 2024-11-28 13:58:28 +01:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Giacomo Vercesi 8e65716ad8 Use zstd compression in pipeline
Use the zstd compression for:
* The `LLVMContainer` when serializing
* The invalidation cache when writing to disk
2024-10-30 21:57:55 +01:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Alessandro Di Federico 865ffb9892 Minor changes 2024-09-27 20:45:22 +02:00
Alessandro Di Federico 4a14c0abb2 UpdateContract: fix uninitialized Context * 2024-09-27 12:07:18 +02:00
Alessandro Di Federico 33cae7de12 Pipeline: reduce usage of Context 2024-09-27 12:07:18 +02:00
Alessandro Di Federico bc064244d6 s/deserialize/fromString/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico c1cbb4e9a0 Initialize pointers to nullptr 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 2cdedc71f4 s/serialize/toString/
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Alessandro Di Federico c8d4381297 s/Context &Ctx/Context &Context/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 9bdce8e5c4 s/ExecutionContext &Ctx/ExecutionContext &EC/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 12a0a89e15 Ensure every pipe commits what it should
This commit is the final step in ensuring all the pipes commit what they
should. It also asserts this actually happens, enabling us to easily
catch future problems.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico 850276f5c8 Minor changes 2024-09-27 12:07:16 +02:00
Alessandro Di Federico 024c9abda2 Step: fix use-after-free 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 09bc315448 Pipeline: improve invalidation logging 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 3c839cb821 Pipe::mutableContainers: use running containers 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 966caa4137 revng artifact: fix handling of target arguments
This commit adds to `revng artifact` help the part of the command line
accepting a list of targets.
Also, it fixes the parsing of targets.
2024-07-09 08:58:51 +02:00
Alessandro Di Federico 1981f5a433 Minor changes 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 036e9282fe Disable invalidation on const containers 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 51292f3d32 Improve --debug-log=pipeline 2024-06-20 10:24:50 +02:00
Alessandro Di Federico 831ed0db91 TaggedFunctionKind: fix tracking-related issues 2024-06-20 10:24:50 +02:00
Alessandro Di Federico 879b48669d Contract::deduceRequirements: fix Kind-related bug
Preserving contracts kinds logic moved targets to source container
instead of preserving them in the original container.
2024-06-20 10:24:50 +02:00
Alessandro Di Federico 7553e2acf8 Introduce UniquedBy{Prototype,Metadata}
This commit introduces new tags to specify how LLVMContainer should
deduplicate sets of equivalent functions, typically managed by an
`OpaqueFunctionPool`.
2024-06-20 10:24:50 +02:00
Alessandro Di Federico c3751a8c5a Introduce Pipe::invalidate
This method enables pipes to specify a custom invalidation logic.  This
change enables us to supress automatic model tracking in certain parts
and then handle the consequences by hand.

Make sure you read the TODO before using this.
2024-06-20 10:24:50 +02:00
Alessandro Di Federico b0d897b87d Minor changes 2024-06-20 10:24:49 +02:00
Massimo Fioravanti db15f7df9a Propagate info about inputs and outputs of pipes
This comit propagates the deduced info about inputs and outputs of pipes
all the way up to the runner, so that the requested output of a pipe can
be passed to its invocation.
2024-06-20 10:24:49 +02:00
Massimo Fioravanti f0244bc689 Target names: handle : 2024-06-20 09:57:36 +02:00
Massimo Fioravanti 7ee8c8000d Introduce revng pipe 2024-06-20 09:57:36 +02:00
Alessandro Di Federico 84e3fac538 Minor changes 2024-05-29 12:06:03 +02:00
Alessandro Di Federico efe381e839 Improve failed precondition checks reporting 2024-05-22 10:25:25 +02:00
Ivan Krysak fffbd27b99 Pipeline: be more explicit when step names collide 2024-02-09 15:09:37 +00:00
Alessandro Di Federico d9367954a4 Convert all public strings to kebab-case 2024-02-09 10:04:24 +01:00
Alessandro Di Federico 5fbb5ff503 Minor changes 2024-02-09 10:04:17 +01:00
Ivan Krysak 77b1acaf00 Prefer uint64_t to size_t wherever relevant 2024-01-29 11:57:54 +02:00
Giacomo Vercesi 6ac7c0c557 Implement container cache pruning
Implement the pruning of container caches (resume directory) when there
is a mismatch between the current revng components' hash and the saved
one. This functionality is activated via `-check-components-version`.
2024-01-26 17:46:21 +01:00
Massimo Fioravanti 2ec4683874 Fix: invalidation map and invalidation cache
The invalidation map passed by callers of pipeline invalidate was
assumed to be always empty. This requirement has been relaxed.

The pipe invalidation cache now checks that what must be removed is
actually present. This is relevant for targets that are killed by later
pipes before the end of the step.
2024-01-02 15:08:26 +01:00