Commit Graph

5 Commits

Author SHA1 Message Date
Giacomo Vercesi 2f0519c3c5 GraphQL: Introduce run_all_analyses 2022-05-24 10:56:04 +02:00
Giacomo Vercesi e5704ede11 Make Python API thread-safe and non-blocking
Since PipelineC is not thread-safe, add a lock to all function calls to
it to avoid any thread safety-related issues.

At the same time, use a thread pool to run "expensive" PipelineC
functions in GraphQL (specifically `produce_target` and `run_analysis`)
to avoid problems due to the cooperative nature of Python coroutines.
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
Giacomo Vercesi 7c3d9a3fcd Python API: automatically call destructors
Use the owning annotation in PipelineC/Prototypes.h to automatically
destroy resources when they go out of scope on the python side.
2022-05-24 08:59:08 +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