Commit Graph

52 Commits

Author SHA1 Message Date
Alessandro Di Federico 0c7c20ad48 Introduce model, artifacts and analyses references 2024-12-11 16:15:27 +01:00
Giacomo Vercesi 3fe3a8524a Implement mass testing
Add the `revng mass-testing` commands and auxiliary executables which
simplify running revng on a huge quantity of input executables.
2024-10-01 13:38:21 +02:00
Alessandro Di Federico 99149c1b36 Drop revng lift 2024-08-07 16:07:59 +02:00
Alessandro Di Federico f8776ef8b5 Introduce revng tar-to-yaml 2024-06-20 10:24:50 +02:00
Alessandro Di Federico 757f7e21d7 Import docs 2024-02-09 10:04:24 +01:00
Massimo Fioravanti e5347b2910 Remove llvm pipeline 2024-01-02 11:14:55 +01:00
Giacomo Vercesi 942cf50735 python: create python wheels
Package revng's python code in two wheels: `revng` and `revng_internal`.
The revng wheel contains the
`revng.{pipeline_description,model,tupletree}` modules, while the
`revng_internal` one everything under `revng.internal`.
2023-12-12 14:52:22 +01:00
Giacomo Vercesi f710af9f2f Cleanup revng.daemon graphql API
Drop autogenerated queries from the GraphQL API and switch `revng.api`
to use `PipelineDescriptor`.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi 2a239ddf47 Introduce PipelineDescription
Add the PipelineDescription object that describes the structure of a
pipeline. This will be used by all the downstream users instead of
pipeline accessor methods via PipelineC.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi 90ea42b695 model/_util.py: move into tupletree.py
Move the contents of `model/_util.py` into `tupletree.py` as it's
model-agnostic and used by all generated Python tuple-tree wrappers.
2023-09-14 15:44:32 +02:00
Giacomo Vercesi 13ba286a9a Drop hard-coded analyses list
Remove any use of hard-coded analyses lists, relying on user interaction
(e.g. command-line arguments) to have it instead.
2023-08-23 17:45:36 +02:00
Giacomo Vercesi 9d5b6d1f34 revng cli: migrate legacy scripts to _commands
Move the remaining commands in the `scripts` to be used by the `revng`
command line driver.
2023-05-11 10:02:46 +02:00
Giacomo Vercesi 472710c100 daemon-self-test: Improve usability
Allow debugging commands (e.g. `--gdb`) to be passed through to the
invoked daemon when running `revng daemon-self-test`.
2023-05-09 17:27:00 +02:00
Giacomo Vercesi a2b7d0e0bf PipelineC: add tracing
Add support for tracing onto the PipelineC. This is done by:
1. Creating wrapper functions for each PipelineC function with the
   script in `scripts/PipelineC_add_tracing.py`. These will call a
   special function called `wrap` which will ultimately call a method
   with a `_` prepended to the name
2. Conversion of all PipelineC methods in `PipelineC.cpp` to `static`
   and their rename with a `_` in front, in order for them to work with
   the wrapper function in (1)
3. Generation of 2 additional include files, one for types and one for
   functions, to be used by users of tracing files in order to have
   introspection.

These steps allow the creation of a trace file with the use of the
`REVNG_C_API_TRACE_PATH` environment variable. The traces can then be
used in conjunction with the `revng trace run` and `revng trace
inspect` commands.
2023-04-20 14:43:13 +02:00
Giacomo Vercesi 6f3dc255cf revng.api: adopt rp_error
Change Python's API to handle the new `rp_error` and its two variations:
`DocumentError` and `SimpleError`.
2023-02-09 13:43:33 +01:00
Giacomo Vercesi 88e972c57c revng fifo events: move handling to daemon
Move all the event handling logic to the `revng.daemon` logic, since
now fifo notifications also include the JWT token (if present) of the
request.
2023-02-07 16:54:35 +01:00
Djordje Todorovic 0d6ffa7504 Introduce revng fetch-debuginfo 2022-12-13 11:25:36 +01:00
Giacomo Vercesi 81d25f9805 PipelineC: expose invalidation logic 2022-10-30 09:13:14 +01:00
Alessandro Di Federico 6fae9fc1c5 Stop checking Python requirements 2022-10-11 19:08:10 +02:00
Alessandro Di Federico 5a99154196 Put Python packages into lib/python*/site-packages 2022-10-11 19:08:10 +02:00
Giacomo Vercesi ff48b9de75 Introduce revng daemon-self-test
This new command will, given an executable, try to produce all
artifacts. By default it will run `revng daemon`, however an external
address can be provided to test remote daemons, e.g. running inside a
container.
2022-10-06 15:12:36 +02:00
Giacomo Vercesi df68b2c7c0 revng ptml: merge cat and strip
Merge the cat and strip subcommands within `revng ptml`
Refactor codebase so that both color and plaintext output are handled
in a unified manner.
2022-09-29 15:43:17 +02:00
Djordje Todorovic 753a50895c Introduce revng model import-idb 2022-09-21 18:39:10 +02:00
Massimo Fioravanti 6b099c57e8 Pipeline: introduce options for analyses 2022-08-29 14:43:25 +02:00
Massimo Fioravanti 42b623db06 Pipeline: rework CLI organization 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
Djordje Todorovic 1243d1061c Introduce revng model hard-purge
In addition, introduce a new model Pass:

  revng model opt -prune-unsused-types
2022-07-28 15:02:55 +02:00
Djordje Todorovic fdb12947a2 Introduce revng model download-pdb 2022-07-28 14:52:50 +02:00
Giacomo Vercesi 7a9c88e9e7 Introduce revng ptml
This Oython tool will be used to easily work with PTML.

It currently features two subcommands:

* `cat` prints a PTML to the terminal, with color formatting if
  possible;
* `strip` will strip a file of the PTML markup;
2022-07-28 08:49:09 +02:00
Giacomo Vercesi 1a7503183a revng.cli: dynamically load commands
Now `revng.cli` houses the core command-line driver while the individual
commands have been moved to `revng.cli._commands` and are dynamically
loaded.
2022-07-28 08:48:30 +02:00
Giacomo Vercesi 09009836a1 PipelineC: expose globals verification 2022-07-28 08:47:46 +02:00
Giacomo Vercesi 2fc11ab055 revng daemon: introduce notifications
Add the possibility of passing a list of FIFOs to `revng daemon`. These
can be used to notify an external program when a non-reproducible change
(binary, context) has occurred.
2022-06-29 14:50:58 +02:00
Giacomo Vercesi 93f776217d Split revng.daemon.schema
Splits the module in 2:

* static_handlers: as the name suggests this is where handlers for
  static endpoints (e.g. not dependent on the pipeline) are implemented
* schema_generator: this is where the schema is generated from a
  manager's pipeline definition, together with the handler for the
  autogenerated endpoint
2022-06-29 14:50:58 +02:00
Giacomo Vercesi 79c6086d0d revng.api: autodetect files
`revng.api` now autodetects files (libraries, pipeline yamls) for
initialization via the same mechanism used by `revng.cli`. This removes
the need to pass them via environment variables from `revng daemon`
and allows easy interaction with python's C API.
2022-06-29 14:49:29 +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
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
Alessandro Di Federico cafdd7c6f9 Introduce revng model override-by-name 2022-04-29 17:57:49 +02:00
Giacomo Vercesi 4f7908753e Introduce the revng-daemon command 2022-04-26 15:59:35 +02:00
Giacomo Vercesi 172faebacf Introduce the revng.daemon GraphQL API
This commit introduces the `revng.daemon` Python module, a Flask-powered
web application that exposes the functionality from `revng.api` across a
GraphQL API
2022-04-26 15:59:35 +02:00
Giacomo Vercesi 7231ee607a Introduce PipelineC wrapper for Python
Add the revng.api module: a wrapper around the PipelineC API.
2022-04-26 15:59:35 +02:00
Filippo Cremonese 70a460c46a TupleTreeGenerator: use dataclasses
Give up on pydantic.
2022-03-22 17:52:02 +01:00
Alessandro Di Federico 2b55d1df22 Adopt cmake-format 2022-03-17 18:52:18 +01:00
Alessandro Di Federico 6832698e5b Introduce revng llvm pipeline
This is a wrapper to `revng-pipeline` designed to make the adoption of
pipelines easier for places where we are now using `revng opt`.
2022-03-17 16:46:02 +01:00
Alessandro Di Federico 586feabd3d Drop scripts/revng-model-dump 2022-03-17 16:46:02 +01:00
Alessandro Di Federico af6305725d Rewrite revng driver infrastructure
It really needed some fresh air.
2022-03-17 16:46:00 +01:00
Alessandro Di Federico df00a892dd Introduce revng.cli.lift 2022-03-17 14:10:50 +01:00
Alessandro Di Federico da7701bd4e Move all executables except revng to libexec/revng
We used to collect all binaries into the `bin/` directory. However this
led to confusions since certain commands where available both as
`revng-command` and `revng command`.

This commit moves all the executables except `revng` into
`libexec/revng`, which, according to FHS, is dedicated to "internal
binaries that are not intended to be executed directly by users or shell
scripts".
2022-03-17 14:10:50 +01:00
Alessandro Di Federico 0e387938be Move scripts/revng to revng/cli/revng.py 2022-03-16 22:10:15 +01:00
Alessandro Di Federico 997e7f60cb scripts/renvg: handle revng pipeline
Let `scripts/revng` intercept `revng-pipeline` invocations and add, not
only -load, but `-P` (pipelines) too.
2022-03-16 22:10:15 +01:00
Alessandro Di Federico 7d48059800 Turn revng-lift into a script 2022-03-11 15:37:12 +01:00