Commit Graph

267 Commits

Author SHA1 Message Date
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 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
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
Massimo Fioravanti 44720eedbd Redesign TupleTreeDiff
`TupleTreeDiff` is now type-safe and owns the changes.
2022-04-15 15:14:13 +02:00
Pietro Fezzardi e40ded965f QualifiedType RawFunctionType.StackArgumentsType
The `StackArgumentsType` field of `RawFunctionType` was the only
cross-reference between `model::Type`s that did not use
`model::QualifiedType` but a naked `TupleTreeReference`.

Switching it to `QualifiedType` make all cross-references across
`model::Type`s homogeneous.
2022-04-08 18:58:58 +02:00
Pietro Fezzardi 63a6676551 Make EnumType.UnderlyingType a QualifiedType
This was one of the few places left in the type system where a
`model::Type` referred to another one not using QualifiedType, but a
naked `TupleTreeReference`.

Switching it to be a `model::QualifiedType` makes cross-references
between `model::Type`s more homogenenous, requiring less corner-cases
to handle for whoever manipulates types.
2022-04-08 18:58:58 +02:00
Giacomo Vercesi 457d782ea8 UpcastablePointer::YAMLTraits: use Kind 2022-04-08 17:32:12 +02:00
Giacomo Vercesi 039f7db93e model::*: ensure Kind -> Class correspondence 2022-04-08 17:31:05 +02:00
Antonio Frighetto dddd8ecbcb Update EFA tests to support CFG out of the model 2022-04-05 15:37:57 +02:00
Antonio Frighetto c223b0aadc Fix end address in EFA tests 2022-04-05 15:37:57 +02:00
Antonio Frighetto bb7102f647 Move old tests to EarlyFunctionAnalysis 2022-04-05 15:37:57 +02:00
Alessandro Di Federico f6c9b04c81 Adopt clang-tidy: readability-identifier-naming 2022-04-04 21:15:52 +02:00
Ivan Krysak c7fe3b0a42 Improve ABI testing artifact naming 2022-03-28 15:43:34 +02:00
Ivan Krysak 2313335feb abi-verify: move to a byte array-oriented approach 2022-03-28 15:43:34 +02:00
Ivan Krysak a7617f3567 Describe the ABI testing utilities 2022-03-28 15:43:32 +02:00
Ivan Krysak 23173aef29 Add a specialized model comparison tool
It fixes mistreated RFT stack arguments before relying on model passes
for the comparison itself.
2022-03-28 15:38:04 +02:00
Ivan Krysak 974229b171 Optimize the ABI testing script 2022-03-28 15:38:01 +02:00
Ivan Krysak 640ab18d60 Rework renvg-abi-verify 2022-03-28 15:38:01 +02:00
Ivan Krysak fdfaf754c0 Improve ABI test directory name and tags 2022-03-28 15:37:59 +02:00
Ivan Krysak 326624f517 Fix TupleTreeCompatible linkage problem
Now all the generated `.cpp` include `Binary.h`. This ensures we don't
trigger the wrong concept due to forward declarations.

Also, this commit introduces a couple of `static_assert`s which should
enable us to early identification of similar problems.
2022-03-28 15:33:30 +02:00
Massimo Fioravanti c05b5dbb28 Steps now represent the *end* of a step
A special "begin" step has been introduced.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti b362d926ec pipeline: drop implicit rank 0 2022-03-28 12:17:05 +02:00
Massimo Fioravanti ec0275c9aa Minor changes to PipelineC tests 2022-03-28 12:17:05 +02:00
Massimo Fioravanti b1dac5d17b ContainerBase: introduce serialization primitives 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 58768aca42 YAML pipelines: rename pipe "Name" to pass "Type" 2022-03-28 12:17:05 +02:00
Massimo Fioravanti b2dfd2bc64 TupleTreeGenerator.cmake: single call generation 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 15bb56eb49 Minor changes 2022-03-28 12:17:05 +02:00
Pietro Fezzardi c6d2899374 Drop torture tests
Torture tests have become useless, since with over time they have
become bitwise identical to regular tests.

This commit removes them since they are now just a waste of time.
2022-03-22 18:27:01 +01: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 af6305725d Rewrite revng driver infrastructure
It really needed some fresh air.
2022-03-17 16:46:00 +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 5e38805063 Rename detail namespaces into revng::detail 2022-03-11 15:37:12 +01:00
Alessandro Di Federico cd7f1fced5 Update test results 2022-03-08 20:57:46 +01:00
Alessandro Di Federico 60cce26768 Support streaming llvm::Errors to Loggers 2022-03-08 15:04:34 +01:00
Alessandro Di Federico 0a5d2c04a7 Rework LoadModelPass 2022-03-08 15:04:34 +01:00
Alessandro Di Federico a88a9e52c3 Improve model::Segment 2022-03-08 13:06:47 +01:00
Alessandro Di Federico 69cd0db81f tuple_tree_generator: make Key strongly typed 2022-03-08 12:25:47 +01:00
Filippo Cremonese 7f7a222410 python-model: handle importing multiple versions 2022-02-23 18:03:36 +01:00
Filippo Cremonese 09a995ba51 python-model: generate from jsonschema 2022-02-23 18:03:35 +01:00
Ivan Krysak 1df6bbc6d6 Introduce ABI testing infrastructure 2022-02-14 13:35:37 +01:00