Commit Graph

72 Commits

Author SHA1 Message Date
Alessandro Di Federico bf6cefc05a Externalize functions to improve build times 2024-05-03 21:52:40 +02:00
Massimo Fioravanti c276a439b5 Add pipeline invalidation
Replace the stub implementation of invalidation with the proper
implementation. A ReadPathCache is added to each global so that it can
keep tracks of what target are associated to which read paths.
2024-01-02 11:14:56 +01:00
Massimo Fioravanti 643d96698d Preliminaries for pipeline invalidation
Fix various bugs already present in the codebase.
2024-01-02 11:06:48 +01:00
Giacomo Vercesi 0cb3e497a4 Fix typos 2023-11-02 16:48:33 +01:00
Alessandro Di Federico d8147aa62e Introduce TupleTreeReference::dump 2023-10-05 10:19:44 +02:00
Alessandro Di Federico c6425b2618 TupleTree::verify: more fine grained assertions 2023-10-05 10:19:44 +02:00
Giacomo Vercesi d2967d2a49 Tuple Tree Generator: remove Model headers
This commit removes the inclusion of the `Binary.h` header in
Tuple-Tree Generator files, allowing Model-independent Tuple Trees to be
generated.
2023-09-14 15:44:32 +02:00
Alessandro Di Federico 247879f7fc model::Type::ID: switch to progressive IDs
This commit switches `model::Type::ID` from being a GUID to be a
progressive number, in order to make things easier for humans.

On top of this, this commit introduces the following changes:

* TypeCopier: import all the necessary PrimitiveTypes and improve
  handling of CustomName.
* Move Kind as the last field of the key of each TupleTree type used in
  an `UpcastablePointer`.
* Update the ground truth of tests to ignore the `CustomName` in favor
  of focusing on `OriginalName`.
* Increase adoption of `model::Binary::makeType`, equivalent to
  `Binary.recordNewType(makeType<model::*Type>())`.
2023-08-23 16:14:04 +02:00
Ivan Krysak ee0dc1866d Forbid clang format off 2023-07-03 15:23:10 +00:00
Ivan Krysak 690df84eca Concepts: prefer non-strict SpecializationOf
Not every case can benefit from extra liniency, so they were manually
reviewed on a case by case basis.

Additionally, this drops a couple of "this should be a non-strict
specialization" commits, because of a bug with clang
(see the GenericGraph concepts rework commit for more details) as
to avoid confusion (we wouldn't want anyone trying to solve these
"todo"s) until the clang struct type deduction is fixed. Especially
considering that there are currently no cases where these softer
versions would be beneficial (we never inherit from templates in
question).
2023-07-02 15:06:11 +00:00
Ivan Krysak a123ec2c35 Remove clang-format off around concepts
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00
Ivan Krysak 01b4ec36c9 Formatting: set AllowShortEnumsOnASingleLine
The new value is `false`.
2023-07-02 13:15:08 +02:00
Giacomo Vercesi 31cd2b53f9 rcc: add codespell
Add codespell to the list of checks performed by
revng-check-conventions. This should reduce the amount of typos present
in the revng codebase.
2023-05-11 10:05:32 +02:00
Massimo Fioravanti 69aafd4181 TupleTree: implement tracking data manipulation
Implement the core visits that are able to inspect the model bypassing
the instrumentation.
2023-04-21 17:51:05 +02:00
Alessandro Di Federico 5ed9432a68 Fix ambiguous template function
Bumping LLVM version turned these into compiler errors.
2023-04-08 08:42:23 +02:00
Alessandro Di Federico 52521f8cac Adopt more standard library's features 2023-04-08 08:42:23 +02:00
Alessandro Di Federico b2f22c168f Adopt clang-format 16 2023-04-08 08:42:23 +02:00
Ivan Krysak bcca3ac8b7 TupleTree: introduce replaceReferencesIf 2023-03-15 10:19:02 +01:00
Ivan Krysak 11c0d7f02e Stop using \brief doxygen command 2023-03-15 10:19:01 +01:00
Massimo Fioravanti 95ec36eea3 Fix error messages capitalization 2023-02-09 13:44:22 +01:00
Massimo Fioravanti 68ae1c986c DiffErrors now use DiffLocations
DiffLocation now allows to pinpoint which change of a diff generated a
issue.
2023-02-09 13:43:51 +01:00
Massimo Fioravanti 4dc2e92782 Introduce DocumentError
`DocumentError`s are the inteded way of propagating errors from the
pipeline to the frontend when a location is required to inform the user
of the error whereabouts.
2023-02-09 13:42:50 +01:00
Antonio Frighetto 7c671ed6de TupleTreeDiff: evict cached references in apply
As the input model requires to be mutable, `evictCachedReferences`
is needed in order to invalidate cached references.
2023-02-06 09:37:23 +01:00
Antonio Frighetto ea0a06a876 revng.daemon: accept no arguments for analysis
Let GraphQL accept zero or more parameters for analyses.
2023-02-06 09:37:23 +01:00
Massimo Fioravanti dad043027d Rework and EFA yield cross relations
Yield and EFA shared the same namespace, this commits splits them and
introduces tuple tree containers as well.
2023-02-06 09:37:23 +01:00
Massimo Fioravanti 4d2f1f71b4 Remove static asserts in tuple tree references
`TupleTreeReference`s use the Root type as a pointer only so they can
operate with forward declarations. Before this commit there were static
asserts that prevented this use case, and thus required the headers
defining the root type to be included before this one to work correctly.

We drop those `static_assert`s to make sure that all headers are parsable
on their own.
2022-12-09 14:01:10 +01:00
Alessandro Di Federico a96270a8aa TupleTree::visit: externalize 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 22c1ec78eb TupleTree: handle type-erased visitors
This commit reduces build times by introducing a type-erasure layer when
performing a visit on TupleTrees. Basically instead of propagating the
type of the visitor along all of the template castle, we wrap the
visitor into a virtual class with one method for each possible type in
the TupleTree.
This enables a single instatiation of visit algorithm.
2022-12-09 09:10:39 +01:00
Alessandro Di Federico 693b361e4a TupleTree: externalize several methods 2022-12-09 09:08:40 +01:00
Alessandro Di Federico c3fc2d1f88 TupleTreeDiff deserialization: fix initialization
We used to assign an uninitialized field to `false`. However, what we
really wanted to is to construct the optional by invoking the default
constructor of the `value_type` of the optional.
2022-12-09 09:02:35 +01:00
Alessandro Di Federico c75a3450c1 TupleTree::deserialize: drop useless yaml::Input
This was a leftover from yaml::Input usages centralization.
2022-12-09 08:58:30 +01:00
Pietro Fezzardi 4334481894 UpcastablePointer: upcast with mutable callables 2022-11-15 14:15:20 +01:00
Giacomo Vercesi 0b80801b2b TupleTreeDiff: applyDiff uses ErrorList
Change how TupleTreeDiff and Visitor work so they can populate an
ErrorList in case the deserialization/apply of a diff fails.
2022-10-30 09:13:44 +01:00
Pietro Fezzardi d04e2e73d3 TupleTree: caching methods for TupleTreeReferences 2022-10-29 16:46:19 +02:00
Pietro Fezzardi 0795c7e331 TupleTreeReference: cache target pointers 2022-10-29 16:46:19 +02:00
Pietro Fezzardi cf3103d3d7 TupleTree{Path,Reference}: add operator<=> 2022-10-29 16:46:19 +02:00
Pietro Fezzardi 8e9170eb60 Enforce that TTRs in TupleTree are mutable 2022-10-29 16:46:19 +02:00
Pietro Fezzardi 6173d154a3 TupleTree: visitReferences with non-const visitors 2022-10-29 16:46:19 +02:00
Pietro Fezzardi 5f8dab184d Move ConstOrNot to Concepts.h 2022-10-29 16:46:19 +02:00
Ivan Krysak 6638055ecf TupleTreeCompatible: drop NotTupleTreeCompatible 2022-09-26 12:01:56 +02:00
Massimo Fioravanti 261a114d6d Pipeline: corner-case fix in backward deduction 2022-08-10 09:49:24 +02:00
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
Giacomo Vercesi 09009836a1 PipelineC: expose globals verification 2022-07-28 08:47:46 +02:00
Massimo Fioravanti f0a5ffe3b3 revng-pipeline: globals, extractOne and analyses 2022-05-24 08:58:48 +02:00
Massimo Fioravanti 2c48713af9 Make TupleTreeDiff compatible with regular vectors 2022-05-24 08:50:24 +02:00
Pietro Fezzardi 741d55279b TupleTree: add copy-constructor and -assignment
The copy of a TupleTree is potentially very expensive, so it was
disabled until now and only allowed via the explict method clone().

We have now decided to make TupleTree copiable.
This commit adds a copy-constructor and a copy-assignment, killing the
clone() method that was already unused and is now effectively useless.
2022-05-11 16:16:49 +02:00
Massimo Fioravanti 016a9464b8 Model diff: handle UpcastablePointer correctly 2022-04-29 17:57:49 +02:00
Massimo Fioravanti df2413962b Introduce TupleTreePath::isPrefixOf(Other) 2022-04-15 15:16:02 +02:00
Massimo Fioravanti 44720eedbd Redesign TupleTreeDiff
`TupleTreeDiff` is now type-safe and owns the changes.
2022-04-15 15:14:13 +02:00
Massimo Fioravanti 38a3c5a086 Introduce TupleTree::deserialize 2022-04-15 15:14:02 +02:00