Having the initial rank threshhold too low caused them to sometimes
loop around and become negative, causing problems later down the line.
This sets the rank of the "entry" node to 4 offsetting the possible
causes of this issue quite a bit.
Without this patch, the import part would fail with an assertion
even for a simple case since it doesn't expect that file size
could be larger than virtual.
From the microsoft documentation:
```
Because the SizeOfRawData field is rounded but the VirtualSize field
is not, it is possible for SizeOfRawData to be greater than
VirtualSize as well. When a section contains only uninitialized data,
this field should be zero.
```
We rather choose not to percolate this into the Model.
The `ptml` namespace contains utilities for easier PTML manipulation.
These include:
* A few constants (e.g. standard attributes) available in
`revng/PTML/Constants.h`
* The `Tag` class to easily construct html/xml tags with attributes
without having to use format strings.
* The `PTMLIndentedOstream`, a llvm::raw_ostream wrapper that
automatically adds tagged indentation to the output
`Segment` now includes a `Type` of struct kind. This is intended to
emit the segment as a struct later in decompilation. The implementation
of name has also been added.
A step's artifacts now include singleTargetFilename, which gives a
suggested filename to use when a single element is extracted from the
underlying container.
`recalculateAllPossibleTarget` is now a private member of
PipelineManager This was done since all calls that can trigger a change
in the target list have been isolated and the call is done implicitly.
This removes rp_manager_recompute_all_available_targets from PipelineC,
since it was added as a stopgap until the above was implemented.
This commit introduces some changes to how the revng pipeline handles
serializing to disk. Specificaly:
* Pipeline globals (specifically model.yml) are better handled if they
are in a subdirectory. They are now saved in the "context"
subdirectory.
* In python:revng.api the pipeline is serialized whenever there is a
non-reproducible change to the state (e.g. binary upload or model
change).
In the case of analyses this is done conservatively by checking that
the diff produced is not empty.
* The logic for computing a step's subdirectory has been moved to the
pipeline runner, consequently if a step is asked to serialize it
will not create any subdirectories.
* Functionality for saving a single step/context has been exposed in
Pipeline C.
* Finally, all path concatenations are now handled by
llvm::sys::path::append, for extra os-agnosticism.
We need to prevent stub kinds used just to represent dead elements to be
displayed in the GUI and CL.
We do so by introducing a DeadKind which expands their targets to the
empty list.
(the following is the original commit message)
The last step is pretty simple. All that's left to do is to take the
ordered edge container and to `append` their points to their `Path`
(the following is the original commit message)
Now that the problematic edges are dealt with, all the normal edges
need to also get routed, but first, it's a good idea to order them.
As such, the DAG is consumed to produce the list of all the edges in
the optimal order for them to get routed.
(the following is the original commit message)
Now that every single node has gotten its exact position, the only
thing left to do is to route all the edges between them. First of
all, the special edges (like corners) need to be handled.