Commit Graph

356 Commits

Author SHA1 Message Date
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
Massimo Fioravanti 633f49c1ef Introduce dedicated namespace for kinds and ranks 2022-08-29 14:44:53 +02:00
Massimo Fioravanti 2a996ef666 Pipeline: allow analyses to fail 2022-08-29 14:44:10 +02:00
Massimo Fioravanti 6b099c57e8 Pipeline: introduce options for analyses 2022-08-29 14:43:25 +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
Massimo Fioravanti 5894867786 revng-pipeline: s/-p/--resume/ 2022-08-10 09:49:24 +02:00
Massimo Fioravanti 0bb115a4f3 revng-pipeline: rework syntax for targets
Was: step:container:p/a/t/h:kind
Now: step/container/p/a/t/h:kind
2022-08-10 09:49:24 +02:00
Massimo Fioravanti 4cd5abe2b0 revng-pipeline: introduce --produce and --analyze 2022-08-10 09:49:24 +02:00
Massimo Fioravanti 96bd5835d8 revng-pipeline: rework file-to-container syntax 2022-08-10 09:49:24 +02:00
Massimo Fioravanti c97187fd0e Add cross relations role 2022-08-05 21:45:19 +03:00
Ivan Krysak 67bff75b7f Add basic location tests 2022-08-05 21:42:45 +03:00
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
Ivan Krysak 240f334d78 Fix minor wording issues 2022-08-05 17:27:56 +03:00
Ivan Krysak 8305e020b0 Move ranks into their own namespace 2022-08-05 17:27:56 +03:00
Djordje Todorovic a36e22729f Model: Add PDB support 2022-07-28 14:52:50 +02:00
Davide Depau 7a067bd172 Fix lint issues due to usage of abort() 2022-07-26 10:31:44 +02:00
Davide Depau 63ba4bc5e5 Fix lint issues in bad behavior tests 2022-07-26 09:52:30 +02:00
Massimo Fioravanti da30cf9e99 Pipeline: add read-only containers 2022-07-25 16:24:27 +02:00
Davide Depau 363fa21fe0 Introduce PipelineC API shutdown method 2022-07-22 21:04:03 +02:00
Davide Depau c034c67c58 Add tests for stack trace signal handler
This ensures that, on crash, revng-pipeline prints a stack trace
2022-07-22 21:04:03 +02:00
Davide Depau 8d89be44fc Add initialization utility to all main functions 2022-07-22 21:04:03 +02:00
Giacomo Vercesi 018518d783 revng.model: remove tags from dumper
Tags in the yaml have been deprecated for a while, remove them from
being outputted from YAML dumper.
2022-07-22 14:56:15 +02:00
Giacomo Vercesi a741e39f76 revng-check-conventions: introduce prettier
Adds the formatting tool prettier to allow formatting JS, TS, JSON,
YAML and HTML files.
2022-06-28 15:29:09 +02:00
Alessandro Di Federico bee6872414 Fix CMake formatting 2022-06-21 18:24:43 +02:00
Alessandro Di Federico f4684e244d Switch to new testsuite 2022-06-20 19:04:18 +02:00
Massimo Fioravanti 55fb87b268 PipelineC: introduce dead kinds
We need to prevent stub kinds used just to represent dead elements to be
displayed in the GUI and CL.
We do so by introducing a DeadKind which expands their targets to the
empty list.
2022-06-20 19:03:17 +02:00
Ivan Krysak ac74ae2fff Add the cfg generation test 2022-06-15 16:04:44 +03:00
Ivan Krysak f536ba46f0 Separate process-assembly from yield-assembly 2022-06-15 15:52:25 +03:00
Massimo Fioravanti 22bce466b1 revng-pipeline: support handles multiple branches
This commit introduces the possibility to have multiple pipeline
branches in a single YAML pipeline file.
2022-06-13 18:34:03 +02:00
Alessandro Di Federico 071fe1c0e4 [FIXUP] Support analyses and global in Python 2022-05-24 10:56:04 +02:00
Giacomo Vercesi 7052f2a8a0 Support analyses and globals in Python
This commit adds the newly implemented functionality in PipelineC both
in revng.api and the graphql api, allowing:

* retrieval of global variable names
* unwrapping of a single target
* execution of analyses
2022-05-24 10:56:02 +02:00
Massimo Fioravanti f0a5ffe3b3 revng-pipeline: globals, extractOne and analyses 2022-05-24 08:58:48 +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
Giacomo Vercesi efcc636483 Introduce roundtrip tests for TypeScript 2022-05-09 13:38:51 +02:00
Ivan Krysak 6a50787dd4 Add runtime html assembly output tests 2022-05-06 18:51:47 +02:00
Ivan Krysak 2a6a7943f4 Fix a couple of minor typos 2022-05-06 18:51:47 +02:00
Alessandro Di Federico aa07b96d61 EFA: fix Block.End in ground truth 2022-05-06 16:04:23 +02:00
Giacomo Vercesi 70f7337f28 Substitute Flask with Starlette
In the future we will need to use GraphQL subscriptions. This is done
via websockets and is supported in Ariadne. However this support is
limited to ASGI frameworks, which Flask isn't a part of.
Startlette is a direct depencency of Ariadne, and all of Ariadne's
features are fully integrated with Starlette, so the switch allows to
drop some Flask integration cruft and streamline the revng.daemon
package.
Starlette does not have a built-in development server, instead
Hypercorn, which is an ASGI-compliant HTTP server, is used in place of
Flask's Werkzeug/Gunicorn for both the development and production
server roles.
2022-05-06 15:04:19 +02:00
Massimo Fioravanti 016a9464b8 Model diff: handle UpcastablePointer correctly 2022-04-29 17:57:49 +02:00
Giacomo Vercesi b9794b84bb revng.daemon: introduce tests
Add end-to-end tests checking that every GraphQL endpoint is properly
working and returning the expected result
2022-04-26 15:59:35 +02:00
Giacomo Vercesi 99ae9c98e0 Add MIMEType to container
Add additional field MIMEType to Container.

This allows API consumers to know at runtime how to treat the data
within a container without any prior knowledge.
2022-04-26 15:59:35 +02:00
Pietro Fezzardi d70eec060c Fix test implementation of mergeBackImpl
The previous implementation worked like `insert`, while the proper
semantics is `insert_or_assign`
2022-04-20 17:39:59 +02:00
Giacomo Vercesi 31a836e48c revng-check-conventions: introduce flake8 2022-04-20 09:56:44 +02:00
Giacomo Vercesi d81dc49809 revng-check-conventions: license check 2022-04-20 09:55:18 +02:00
Giacomo Vercesi 52a5c700e1 revng-check-conventions: add shellcheck
Add bash script checks with shellcheck + `set` rule.
Also, all existing bash scripts have been fixed.
2022-04-20 09:54:51 +02:00
Ivan Krysak 66c96fb128 ABI: improve RegisterStateDeductions
Split the interface into two functions: `enforce.*` returning the map by
value and `tryApply.*` returning an `std::optional`.

Improve non-positional single deduction function to better reflect
some corner cases (for example how a required `NoOrDead` register
argument is handled).

Enforce a position-based deduction corner case where it's impossible to
deduce whether the argument is passed in the GPR or the vector one -
now GPR takes precedence in those cases.
2022-04-15 18:25:11 +02:00
Antonio Frighetto c2815949c7 Adopt std::same_as of libcxx 2022-04-15 18:25:08 +02:00
Massimo Fioravanti eef9ba74da Introduce ModelInvalidationEvent 2022-04-15 15:17:58 +02:00
Massimo Fioravanti 3b5d255451 Introduce pipeline invalidation test 2022-04-15 15:16:10 +02:00
Massimo Fioravanti c4aa92694c Introduce revng model apply 2022-04-15 15:15:41 +02:00