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
Massimo Fioravanti
44720eedbd
Redesign TupleTreeDiff
...
`TupleTreeDiff` is now type-safe and owns the changes.
2022-04-15 15:14:13 +02:00
Giacomo Vercesi
a2b5dbb1dc
TupleTreeGenerator: autogenerate Kind
2022-04-08 17:36:59 +02:00
Giacomo Vercesi
457d782ea8
UpcastablePointer::YAMLTraits: use Kind
2022-04-08 17:32:12 +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
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
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
69cd0db81f
tuple_tree_generator: make Key strongly typed
2022-03-08 12:25:47 +01:00
Alvise de Faveri
9e326682bc
Check-conventions: handle dirs with 0 python files
2022-03-02 15:40:27 +01:00
Filippo Cremonese
6672eb8dbc
Turn Python scripts into modules
2022-02-23 18:02:42 +01:00
Filippo Cremonese
d5e5e16887
Apply and enforce python formatting with black
2022-02-23 18:02:39 +01:00
Filippo Cremonese
1dc7efe2b0
tuple_tree_generator: emit jsonschema
2022-02-23 17:37:03 +01:00
Filippo Cremonese
2877ead7ed
revng-model-to-json: handle SIGINT
2022-02-23 17:36:38 +01:00
Filippo Cremonese
8511cbf40b
tuple_tree_generator: drop tags
...
They were more harmful than beneficial.
2022-02-23 17:36:34 +01:00
Alessandro Di Federico
10dc6744b4
mv include/revng/{Model,TupleTree}/EnumTraits.h
...
`EnumTraits.h` is not model-specific.
2022-02-23 17:32:50 +01:00
Alessandro Di Federico
cca7e5b443
check-revng-conventions: improve performance
...
We used to run `clang-format` and the other checks twice, but it was not
strictly necessary.
2022-02-23 17:31:41 +01:00
Ivan Krysak
bac670a38a
monotone_framework_lattice: move generation notice
...
It made it look like the template was autogenerated.
2022-02-14 10:57:20 +01:00
Alessandro Di Federico
ec6d4dbe74
Ensure all files end with a newline
2022-02-14 10:56:15 +01:00
Massimo Fioravanti
ef1b59158f
revng-translate: propagate arguments after --
2022-02-11 18:45:13 +01:00
Alessandro Di Federico
8f73438a8b
Ban tabs and spaces at end of lines
2022-02-08 17:54:07 +01:00
Massimo Fioravanti
d696197597
scripts/revng: adopt revng-pipeline
...
The revng-translate tool is now a driver for revng-pipeline to perform
the translation.
This commit also drops computing the `-load` "roots". It shouldn't
really be necessary.
2022-02-08 00:05:03 +01:00
Massimo Fioravanti
fe9686be03
revng-pipeline: introduce C API
2022-02-08 00:05:03 +01:00
Alessandro Di Federico
0f084ed620
Minor changes
2022-02-07 16:55:46 +01:00
Alessandro Di Federico
60b2dbab72
revng: support model subcommands
2022-01-31 16:28:26 +01:00
Alessandro Di Federico
78be0e9268
Explode TupleTree.h
2022-01-31 16:28:26 +01:00
Alessandro Di Federico
c0f8110e4e
s/revng-compare-yaml/revng-model-compare/
2022-01-31 16:28:17 +01:00
Alessandro Di Federico
0d7decccb3
s/revng-dump-model/revng-model-to-json/
2022-01-31 16:28:17 +01:00
Alessandro Di Federico
f3634e165f
Introduce model::Type::localCompare
2022-01-27 11:51:03 +01:00
Alessandro Di Federico
54fcc1d7fe
struct_impl.cpp.tpl: include headers in any case
2022-01-27 11:51:03 +01:00
Alessandro Di Federico
0a0b546bdc
Speed up Python dependency checks
...
Checking Python dependencies has significantly slown down CMake
configuration phase.
We were using `pip show` for each dependency, we now do everything in a
single invocation `pip list`.
2022-01-27 11:51:03 +01:00
Alessandro Di Federico
7ea55326e1
tuple_tree_generator: use all_optional_fields
2022-01-27 11:50:37 +01:00
Filippo Cremonese
31354a4cd6
metaschema.yml: actually enforce validation
...
Previously, we didn't specify the type of the root object, which led to
accept any input.
2022-01-21 18:05:52 +01:00
Filippo Cremonese
f10bc1a410
Check pyparsing version at configure time
...
Otherwise, people will get obscure error messages.
2022-01-21 18:05:51 +01:00
Alessandro Di Federico
3ab32cd2ef
tuple_tree_generator: make fully standalone
2022-01-21 18:05:51 +01:00
Filippo Cremonese
c7a0d05379
tuple_tree_generator: remove unused include
2022-01-21 18:05:49 +01:00
Filippo Cremonese
610d5112c7
tuple_tree_generator: fix type lookup
2022-01-21 18:03:07 +01:00
Filippo Cremonese
0a70383e12
tuple_tree_generator: Jinja2 compatibility issue
...
This commit fixes a compatibility issue with Jinja2 2.10.
2022-01-17 16:35:01 +01:00
Filippo Cremonese
6e7439ad6d
Check Python requirements at configure time
2022-01-13 14:34:11 +01:00
Filippo Cremonese
74217b4fe5
Generate C++ model from YAML definition
...
Model classes are now described by a YAML document, which is used to
generate C++ headers containing classes and all the boilerplate
required for YAML serialization/deserialization, usage in
SortedVectors, etc. See the README in include/revng/Model for more
info.
2022-01-13 14:34:11 +01:00
Alessandro Di Federico
6073133545
CodeGenerator: drop IR emission duties
2021-12-22 17:47:54 +01:00
Alessandro Di Federico
777adcbd45
model::Binary: add segments and imported libraries
...
Now, `scripts/revng` uses the model and we no longer need to emit
.li.csv and .need.csv.
2021-12-22 17:47:54 +01:00
Alessandro Di Federico
1ad2522240
Minor changes
2021-12-22 13:47:21 +01:00