Giacomo Vercesi
37caa91e6d
Ranks: fix Rank keys
...
Use model::Function::Key for the Function rank instead of the naked
MetaAddress as it allows forward-compatibility if the model::Function
key is ever changed.
Use a std::tuple<uint64_t> for TypeField as it's the current type for
{Struct,Enum,Union}Field.key()
2022-09-01 17:46:57 +02:00
Giacomo Vercesi
7cff7737ac
Introduce ModelHelpers.h
...
ModelHelpers contains helper functions that produce the appropiate
edit path for the given elements of the model.
2022-09-01 17:46:40 +02:00
Giacomo Vercesi
e443cd3766
YAMLTraits.h: add traits for std::tuple<T>
...
This commit introduces a YAML trait for `std:tuple`s of a single
scalar that allows their serialization/deserialization generically.
2022-09-01 17:46:35 +02:00
Giacomo Vercesi
8aab66a517
Rank.h: restrict keys to scalars and enums
...
Rank keys so far could be of any type as long as it was
yaml-serializable, however this would introduce problems down the
line if a Location contained for example array or mapping.
This commit restricts the type of keys to only scalars and enums,
to limit the chance that a key serializes in an invalid location.
2022-09-01 17:46:30 +02:00
Giacomo Vercesi
7d77d388b5
ConstexprString: allow default construction
2022-09-01 17:46:30 +02:00
Giacomo Vercesi
a05737696f
Introduce revng/Model/ForwardDecls.h
2022-09-01 17:46:25 +02:00
Giacomo Vercesi
b7a23dcd4a
Rename and improve ptml::TagScope
...
Renames ptml::TagScope to ScopeTag and fixes issue when Tag.scope
was called with a temporary.
2022-09-01 17:46:10 +02:00
Giacomo Vercesi
e1adce0f69
PTMLIndentedOstream: rework write_impl
...
Previous implementation would write '\n' if the buffer ended with
'\n\n'.
2022-09-01 17:46:04 +02:00
Giacomo Vercesi
07c2457a16
revng.cli: various improvements
...
This commit introduces some miscellaneous fixes to revng.cli:
* Remove useless subclasses in pipeline_tools.py;
* Improve type annotations in _commands/ptml and fix a help string;
* Add some extra type annotations for `Command`;
* Remove useless namespaces in `commands_registry` and add help text
for the ones in use;
2022-09-01 17:45:44 +02:00
Giacomo Vercesi
bbbcbd080a
revng ptml cat: add C highlighting
2022-09-01 15:49:44 +02:00
Giacomo Vercesi
84e29d6b96
Fix linkage of Tag::scope in Tag.h
2022-09-01 15:49:44 +02:00
Alessandro Di Federico
b0bfa5db4a
CollectCFG: nop if root is absent
2022-09-01 14:58:50 +02:00
Alessandro Di Federico
40f1e06135
CFGAnalyzer, opaque_true: use inaccessiblememonly
...
This prevents EarlyCSE from deduplicating calls to this functions with
the same arguments, which has unintend effects and leads to loss of
code.
2022-09-01 11:32:42 +02:00
Alessandro Di Federico
df34095721
Minor changes
2022-09-01 11:32:12 +02:00
Ivan Krysak
4c08f2153d
install_pattern: do not use git ls-files
2022-08-31 19:42:35 +02:00
Alessandro Di Federico
ed2672d12f
Merge branch 'feature/pipeline-analysis-args'
2022-08-31 18:08:00 +02:00
Massimo Fioravanti
9a4e97d8ea
Pipeline: handle having 0 functions
2022-08-31 18:07:47 +02:00
Alessandro Di Federico
712585be48
CodeGenerator: handle PTC translation failure
2022-08-31 18:07:47 +02:00
Alessandro Di Federico
d8230c3e9a
revng-pipeline: improve error reporting
2022-08-31 18:07:47 +02:00
Alessandro Di Federico
b14b40b1eb
revng: do not print failing command
2022-08-31 18:07:47 +02:00
Alessandro Di Federico
f93eefda66
replaceAll: move to STLExtras.h
2022-08-31 18:07:47 +02:00
Djordje Todorovic
2abd250ae0
model: Skip nameless dyn functions in PE
2022-08-31 18:07:47 +02:00
Alessandro Di Federico
cd7429d100
pipes::Lift: fail if Architecture is Invalid
2022-08-29 15:13:25 +02:00
Massimo Fioravanti
9ce7b1e527
Drop Pipe suffix from pipe names
2022-08-29 14:45:45 +02:00
Massimo Fioravanti
633f49c1ef
Introduce dedicated namespace for kinds and ranks
2022-08-29 14:44:53 +02:00
Massimo Fioravanti
915c083661
Pipes: reorganize who defines pipes
2022-08-29 14:44:35 +02:00
Massimo Fioravanti
a8a8eda9ac
Pipeline/Invokable.h: split
2022-08-29 14:44:20 +02:00
Massimo Fioravanti
2a996ef666
Pipeline: allow analyses to fail
2022-08-29 14:44:10 +02:00
Massimo Fioravanti
7e75a1a4b8
Pipeline: introduce preconditions for pipes
2022-08-29 14:44:02 +02:00
Massimo Fioravanti
6b099c57e8
Pipeline: introduce options for analyses
2022-08-29 14:43:25 +02:00
Alessandro Di Federico
c6c66e70f4
revng.cfg-svg: use one-per-architecture
2022-08-26 18:12:23 +02:00
Alessandro Di Federico
b4c5d3d37e
Merge branch 'feature/import-binary-as-analysis'
2022-08-26 10:42:09 +02:00
Alessandro Di Federico
ef3d24eb08
test.py: get ephemeral port, drop psutil
2022-08-26 09:50:42 +02:00
Alessandro Di Federico
73ae7c89b4
test.py: run preliminary analyses
2022-08-26 09:50:42 +02:00
Alessandro Di Federico
178b58b9d5
ImportBinary: turn into an analysis
2022-08-26 09:50:42 +02:00
Alessandro Di Federico
38d91a793b
AddPrimitiveTypes: turn into an analysis
2022-08-26 09:50:42 +02:00
Alessandro Di Federico
f00a86d491
manager.py: check manager.produce_targets success
2022-08-26 09:50:42 +02:00
Alessandro Di Federico
d81fc9a5f6
getAcceptedKinds: introduce new assertion
2022-08-26 09:50:42 +02:00
Giacomo Vercesi
2ce7b216e8
GraphQL: drop step name conversion
2022-08-26 09:50:42 +02:00
Giacomo Vercesi
f281b5930b
revng.daemon: rework schema_generator.py
...
Rework both classes in schema_generator.py, main changes:
* Drop manager.pipeline_artifact_structure as it was used exclusively
by SchemaGenerator and is no longer needed
* Rename SchemaGen and BindableGen to SchemaGenerator and
DynamicBindableGenerator to better express their role, add
docstrings that explain what they do
* Decouple Artifacts and Analyses discovery, since a step can have
analyses and no artifacts (and vice-versa)
2022-08-26 09:50:37 +02:00
Alessandro Di Federico
1d91ed9beb
tuple_tree_generator: make C++ just a regular backend
...
The `tuple_tree_generator` component was still heavily treating C++ as a
special citizen.
This commit normalizes the situation.
2022-08-11 16:20:42 +02:00
Alessandro Di Federico
ebc9a41044
CMake: fix regeneration of TypeScript code
...
In `add_custom_command` is one of the entries of `DEPENDS` is not a file
(i.e., it's a custom command), the dependency is only an ordering
dependency. This means that the command is not actually re-run when its
dependencies are invalidated.
2022-08-11 11:16:04 +02:00
Alessandro Di Federico
033aca5d9d
Merge branch 'feature/pipeline-cl-reworking'
2022-08-10 09:49:53 +02:00
Massimo Fioravanti
55b2e42139
revng-pipeline: introduce --apply-model-diff
2022-08-10 09:49:24 +02:00
Massimo Fioravanti
bf39373f87
revng-invalidate: drop superfluous dependency
2022-08-10 09:49:24 +02:00
Massimo Fioravanti
42b623db06
Pipeline: rework CLI organization
2022-08-10 09:49:24 +02:00
Massimo Fioravanti
5894867786
revng-pipeline: s/-p/--resume/
2022-08-10 09:49:24 +02:00
Massimo Fioravanti
d250d43ee4
revng-pipeline: factor out common CLI options
...
Common CLI options that were used by multiple tools and have now been
isolated into a single include file to be used before declaring main.
2022-08-10 09:49:24 +02:00
Massimo Fioravanti
261a114d6d
Pipeline: corner-case fix in backward deduction
2022-08-10 09:49:24 +02:00
Massimo Fioravanti
b49062b2d6
revng-pipeline: introduce --produce-all-single
2022-08-10 09:49:24 +02:00