Giacomo Vercesi
c32bc92f9c
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:05:30 +02:00
Giacomo Vercesi
0d49b4a982
Introduce the revng-daemon command
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
d51e19dbac
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:05:30 +02:00
Giacomo Vercesi
4f7e295a36
Introduce PipelineC wrapper for Python
...
Add the revng.api module: a wrapper around the PipelineC API.
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
8b2da15c18
revng-pipeline: introduce artifacts
...
Add a new key to a Step, named Artifacts. If present, it indicates that
the step has a "default" Kind and Container that can be easily retrieved
without explicitly specifying either when producing an artifact.
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
9b16efefc2
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:05:30 +02:00
Giacomo Vercesi
f4d63759de
PipelineC: expose kinds, ranks and more
...
Adds missing API functions to PipelineC that will be needed by the
GraphQL API:
* Kinds enumeration
* Get Rank and parent of a Kind
* Enumerate and inspect Ranks
* Get a Step's parent
Included are some docstring fixes
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
87b09fd401
PipelineC: Refactor headers
...
Split PipelineC.h in 4 separate header, this is due to cffi not
being able to interpret `#ifdef`s so C++ declarations need to be
in a separate file.
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
e5c9141ccc
Refactor revng.cli.support
...
* Removed shadowed `relative` function
* Clean up imports
* Add type hints to functions
* Use Path where possible
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
b90773b642
Move librevngRecompile to analyses
2022-04-26 15:05:30 +02:00
Giacomo Vercesi
a831fa8e74
ContainerSet: add isContainerRegistered
...
This function allows to check if a container is registered,
irrespective of its initialization status
2022-04-26 15:05:30 +02:00
Filippo Cremonese
1bab3d8137
PipelineC: fix returning reference to local
...
'PathComponents` was copied on the stack by the assignment and then a
pointer to it is returned by `c_str`, leading to a use-after-free since
it is freed when going out of scope
2022-04-26 15:05:30 +02:00
Filippo Cremonese
19ff90e499
PipelineC: fix off-by-! in LoadLibraryPermanently
2022-04-26 15:05:30 +02:00
Filippo Cremonese
1af425c730
Minor changes
2022-04-26 15:05:30 +02:00
Alessandro Di Federico
3cb0100976
Merge branch 'feature/string-map-container'
2022-04-21 14:46:18 +02:00
Pietro Fezzardi
0ff8a6933b
Add StringMapContainer
2022-04-20 17:39:59 +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
Alvise de Faveri
a3110c0b59
Add QualifiedType::is(TypeKind)
2022-04-20 11:25:46 +02:00
Alessandro Di Federico
58c8f96317
Merge branch 'feature/revng-check-conventions-improvements'
2022-04-20 09:57:31 +02:00
Giacomo Vercesi
bbce0b33e5
revng-check-conventions: introduce isort
2022-04-20 09:57:08 +02:00
Giacomo Vercesi
46821cee5f
revng-check-conventions: introduce mypy
2022-04-20 09:57:01 +02:00
Giacomo Vercesi
31a836e48c
revng-check-conventions: introduce flake8
2022-04-20 09:56:44 +02:00
Giacomo Vercesi
daa3388389
Add commit range option to revng-check-conventions
...
This commit also introduces `--HEAD` which is useful for `git rebase -x`
checks.
2022-04-20 09:56:06 +02:00
Giacomo Vercesi
8758c7fcc3
Print header for run_revng_checks
2022-04-20 09:55:41 +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
Giacomo Vercesi
56b004bfd2
Improve revng-check-conventions
...
* Only check dirty files by default (--all checks all files).
* Better file identification
* Various bash improvements
* Report more explicative errors
2022-04-20 09:53:19 +02:00
Alessandro Di Federico
427a3ca30e
Merge branch 'feature/enforce-abi-deductions'
2022-04-15 18:52:12 +02:00
Antonio Frighetto
ab4bdf398d
EFA: leverage ABI-specific layer
...
Architecture-agnostic results provided by EarlyFunctionAnalysis
are refined through an ABI-specific layer.
2022-04-15 18:25:11 +02:00
Antonio Frighetto
7235f69a99
EFA: add final results to ABIAnalysis::dump
...
Output `FinalReturnValuesRegisters` results for aiding debugging tasks.
2022-04-15 18:25:11 +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
Ivan Krysak
c374f8013a
ABI: separate mips and mipsel ABIs
2022-04-15 18:25:11 +02:00
Ivan Krysak
ddd2968faa
ABI: make abi::RegisterState::Map assignable
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
Alessandro Di Federico
8c31b6d974
Merge branch 'feature/invalidation'
2022-04-15 16:07:42 +02:00
Massimo Fioravanti
ea02b4080a
PipelineC: introduce rp_apply_model_diff
...
This exposes the invalidation to users of the C API.
2022-04-15 15:18:56 +02:00
Massimo Fioravanti
3d752f6c7f
Introduce revng pipeline --invalidate-all
2022-04-15 15:18:28 +02:00
Massimo Fioravanti
eef9ba74da
Introduce ModelInvalidationEvent
2022-04-15 15:17:58 +02:00
Massimo Fioravanti
60fd53b1fb
Introduce Kind::verify
2022-04-15 15:17:37 +02:00
Massimo Fioravanti
1b489d9d8c
FileContainer: remove invalidated container
...
If a file container becomes empty, it the old file on disk has to be
removed.
2022-04-15 15:16:24 +02:00
Massimo Fioravanti
3b5d255451
Introduce pipeline invalidation test
2022-04-15 15:16:10 +02:00
Massimo Fioravanti
df2413962b
Introduce TupleTreePath::isPrefixOf(Other)
2022-04-15 15:16:02 +02:00
Massimo Fioravanti
c4aa92694c
Introduce revng model apply
2022-04-15 15:15:41 +02:00
Massimo Fioravanti
bf1de27239
revng model diff: keep output
2022-04-15 15:14:41 +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
Massimo Fioravanti
a75eaae66a
Introduce Logger::getAsLLVMStream
2022-04-15 15:13:43 +02:00
Alessandro Di Federico
8cca1b04d6
Merge branch 'feature/revng-c-pipelines'
2022-04-14 18:57:04 +02:00
Pietro Fezzardi
7f65b1117a
New AddPrimitiveTypesPipe
...
This pipe is executed during the Lift step and populates the model with
all the required primitive types.
2022-04-12 16:40:27 +02:00
Pietro Fezzardi
0c12c47514
Pipes: initialize all llvm passes
2022-04-12 16:17:57 +02:00