Commit Graph

457 Commits

Author SHA1 Message Date
Andrea Gussoni eeca8f781c GenericGraph: introduce Undirected
Introduce the `Undirected` GraphTraits, which treats a `MutableEdgeNode`
`GenericGraph` as an undirected graph.

The trait uses the newly introduced `UndirectedChildIterator`, which is
a special custom iterator to get successors and predecessors
concatenated together.

Add some unit tests for `UndirectedChildIterator`.
2024-08-12 12:32:45 +02:00
Alessandro Di Federico f87ba8a0d3 Introduce TypeShrinking tests 2024-07-10 16:19:27 +02:00
Ivan Krysak 5f570b99fa Fix a boost exception not found compilation error 2024-06-27 11:06:11 +02:00
Ivan Krysak 4a2db0ba4f UpcastablePointer: streamline empty behavior 2024-06-27 11:05:52 +02:00
Ivan Krysak 3eb4445c29 RegisterStateDeduction: fix heap-buffer-overflow 2024-06-27 11:05:52 +02:00
Ivan Krysak a2aa805e41 FilteredGraphTraits: fix stack-use-after-scope 2024-06-27 11:05:52 +02:00
Ivan Krysak 823e561806 TTG: rework polymorphic serialization
For now, the only serialization trait we were verifying
a polymorphic TTG type to have was the wrong (the one
that only printed base class's fields).

This commit explicitly disables said serializer and
ensures it's never used.

Here's an illustration of the impact of the changes:
```
model::UpcastableType MyType = getTypeFromSomewhere();
model::Type &View = *MyType;
model::PointerType &Pointer = MyType->asPointer();

serialize(MyType); // Good
serialize(Pointer); // Good
serialize(View); // new: explicit error
                 // old: only print base type's fields
```
2024-06-27 11:05:51 +02:00
Ivan Krysak 150d992368 Pipes: rename Type rank into TypeDefinition 2024-06-27 11:05:51 +02:00
Ivan Krysak 52aa0b5942 Model: introduce filters 2024-06-27 11:05:51 +02:00
Ivan Krysak 2fbb06f642 ABI-tests: remove an obsolete check
The new `prepare-tested-model.yml` script takes care of it.
2024-06-27 11:05:51 +02:00
Ivan Krysak dfa7478685 Adopt reworked model::Type 2024-06-27 11:05:51 +02:00
Ivan Krysak 73c43add70 TupleTree: revamp the visitors 2024-06-27 11:05:50 +02:00
Ivan Krysak 927e8006b9 Model: rename TypePath to DefinitionReference 2024-06-27 11:05:49 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Ivan Krysak b2959e36df Minor improvements 2024-06-27 11:05:48 +02:00
Alessandro Di Federico b5f7576573 Rework TupleTreeGenerator tracking 2024-06-20 10:24:50 +02:00
Alessandro Di Federico b0d897b87d Minor changes 2024-06-20 10:24:49 +02:00
Massimo Fioravanti db15f7df9a Propagate info about inputs and outputs of pipes
This comit propagates the deduced info about inputs and outputs of pipes
all the way up to the runner, so that the requested output of a pipe can
be passed to its invocation.
2024-06-20 10:24:49 +02:00
Massimo Fioravanti 43349943a7 Stop serializing the model in the IR 2024-06-20 09:57:36 +02:00
Massimo Fioravanti 7ee8c8000d Introduce revng pipe 2024-06-20 09:57:36 +02:00
Lauri Vasama 9f7117fe81 Move ModelType test into an .inc file for sharing 2024-05-29 15:42:15 +02:00
Lauri Vasama 3e33a300d5 Introduce RawFunctionType::Architecture 2024-05-29 15:42:15 +02:00
Alessandro Di Federico 31b1b66f44 Reorder model::Binary fields 2024-05-22 10:25:25 +02:00
Alessandro Di Federico c061f1f971 Make Pipe::checkPrecondition mandatory 2024-05-22 10:25:25 +02:00
Alessandro Di Federico 25c7834b21 Introduce test_adt
This should reduce build times.
2024-05-03 21:52:40 +02:00
Alessandro Di Federico 0459b9d084 Introduce RegisterUsageAnalyses 2024-04-19 18:33:00 +02:00
Alessandro Di Federico a1b0ba752c GenericGraph: implement Edge::operator==
This fixes a subtle bug in GenericGraph. Basically, if the label of an
Edge was the Empty data structure, whose `operator==` always returns
`true`, the comparison between edges was broken.
2024-04-18 17:50:32 +02:00
Alessandro Di Federico dae9f33544 Minor changes 2024-04-18 17:50:31 +02:00
Ivan Krysak 8ecdd76e68 ABI-tests: improve ABI mismatch error message 2024-03-15 19:05:10 +01:00
Alessandro Di Federico 0da9d1e1a4 Model: fix handling of 0-sized arguments
We used to support having a single `void` argument. It was for some
C-compatibility ambitions, but just omitting the argument is perfectly
fine.

Also, the DWARF importer has been fixed to handle typedef'd void as
arguments.

More in general, arguments are now required to always have a size.
2024-03-01 14:53:06 +01:00
Ivan Krysak b73d4934c8 ABI-tests: extend register comparison
It now accounts for endianness.
2024-02-09 15:09:37 +00:00
Ivan Krysak 52c9ae0b4d ABI-tests: fix vector-less MIPS tests 2024-02-09 15:09:37 +00:00
Ivan Krysak bd6ab10454 ABI-tests: stop using unsupported primitives 2024-02-09 15:09:37 +00:00
Ivan Krysak 16feb420c3 ABI-tests: handle stack argument offset gracefully 2024-02-09 15:09:37 +00:00
Ivan Krysak 654e0958e9 ABI-tests: remove obsolete abi replacement
See the `replace-abi.py` script for how it's done now.
2024-02-09 15:09:37 +00:00
Ivan Krysak b75406f711 ABI-tests: make ID matching more robust 2024-02-09 15:09:37 +00:00
Ivan Krysak 5fcdfebbaf ABI-tests: support pointers-to-copy on the stack 2024-02-09 15:09:37 +00:00
Ivan Krysak 24e907525e ABI-tests: support pointers-to-copy in registers 2024-02-09 15:09:37 +00:00
Ivan Krysak a1ddbe5d83 ABI-tests: improve reported errors 2024-02-09 15:09:37 +00:00
Ivan Krysak d1a78d903b ABI-tests: make tested function set leaner 2024-02-09 15:09:37 +00:00
Ivan Krysak 43c6780baf ABI-tests: introduce ID list deduplication 2024-02-09 15:09:37 +00:00
Ivan Krysak f08d1a2f81 ABI-tests: prefer model::Type::Key to RFT * 2024-02-09 15:09:37 +00:00
Ivan Krysak cf0ce66674 ABI-tests: use updated stdout.yml file format
This also allows to simplify the resulting datastructure somewhat.
2024-02-09 15:09:37 +00:00
Ivan Krysak 4a8455e994 ABI-tests: separate value preservation verifier 2024-02-09 15:09:37 +00:00
Ivan Krysak d13e83163d Minor improvements 2024-02-09 15:09:37 +00:00
Alessandro Di Federico 03642de797 Standardize unit test names 2024-02-09 10:04:27 +01:00
Alessandro Di Federico aaa1b26468 AAPCS ABI: drop support for int128_t 2024-02-09 10:04:26 +01:00
Alessandro Di Federico d9367954a4 Convert all public strings to kebab-case 2024-02-09 10:04:24 +01:00
Alessandro Di Federico 5fbb5ff503 Minor changes 2024-02-09 10:04:17 +01:00
Ivan Krysak a52243037b Model: add basic unit tests for TypeBucket 2024-01-29 11:57:54 +02:00