Alessandro Di Federico
f6c9b04c81
Adopt clang-tidy: readability-identifier-naming
2022-04-04 21:15:52 +02:00
Alessandro Di Federico
5e38805063
Rename detail namespaces into revng::detail
2022-03-11 15:37:12 +01:00
Alessandro Di Federico
cfb47157b9
clang-tidy: readability-identifier-naming
...
This commit fixes all the non-compliance with our preliminary clang-tidy
configuration, which will be merged soon.
2022-01-07 09:18:05 +01:00
Ivan Krysak
6714c4cb58
Add Node::copy() and Node::move()
...
Those member functions are an easy way to reach the underlying node data
without affecting the edges stored by the node.
2021-10-04 14:38:42 +02:00
Ivan Krysak
612461cffa
Enable more explicit edge iteration
...
Add reverse iterator support
2021-09-02 11:09:29 +03:00
Ivan Krysak
509ee3c41a
Disallow label-less mutable edge graphs
2021-09-02 11:09:17 +03:00
Ivan Krysak
95e983fef3
Rename has_parent into HasParent
2021-09-02 11:09:04 +03:00
Ivan Krysak
b6d95c2cbc
Add GenericGraph::clear
2021-09-02 11:08:52 +03:00
Ivan Krysak
3f1f99deff
Add GenericGraph::reserve
2021-09-02 11:08:39 +03:00
Ivan Krysak
9a902cc8ab
Implement in-place node creation
2021-09-02 11:08:27 +03:00
Ivan Krysak
009a5ae060
Rework EdgeView to improve code consistency
2021-09-02 11:08:14 +03:00
Ivan Krysak
7d24eeaf48
Add a move-only addNode overload
2021-09-02 11:08:01 +03:00
Ivan Krysak
4df418fcbc
Add a EdgeLabel alias
2021-09-02 11:07:49 +03:00
Ivan Krysak
334cdf9f05
Make iterators and mapping filters consistent
2021-09-02 11:07:39 +03:00
Ivan Krysak
e5be45ab3b
Add explicit names for iterator types
2021-09-02 11:05:10 +03:00
Ivan Krysak
8535f166a9
Prevent multiple edges between a pair of nodes
2021-09-02 11:04:59 +03:00
Ivan Krysak
f15e41433f
Make graph testing node type agnostic
2021-09-02 11:04:44 +03:00
Ivan Krysak
c8a60f9d8e
Implement safe node removal
2021-09-02 09:14:20 +03:00
Ivan Krysak
5b60c22feb
Implement the core of the mutable edge node
2021-09-02 09:14:20 +03:00
Ivan Krysak
2050561716
Add a comment on top explaining the node types
2021-09-02 09:14:20 +03:00
Ivan Krysak
d768d5d89a
Add getters for successor and predecessor counts
2021-09-02 09:14:20 +03:00
Alessandro Di Federico
6d10581163
Whitespace and other minor changes
2021-07-15 13:30:25 +02:00
Pietro Fezzardi
b96fbd091d
Fix check-conventions with clang-format-12
2021-06-14 23:04:02 +02:00
Alessandro Di Federico
871931b9cd
Test TupleTreeDiff on Model
...
`TupleTreeDiff` was not being tested.
This commit implements several `operator==` that are required to
successfully instantiate `TupleTreeDiff`.
2021-05-06 15:42:16 +02:00
Pietro Fezzardi
50681284c0
Conceptify revng
...
Use concepts across revng wherever possible, to keep the code concise
and easier to understand.
2021-05-05 17:10:12 +02:00
Alessandro Di Federico
694b76a8e2
GenericGraph: propagate graph properties to nodes
2021-04-22 18:03:53 +02:00
Alessandro Di Federico
e3157ffdd4
GenericGraph: initialize EntryNode
2021-04-22 18:03:53 +02:00
Alain Carlucci
8e275ed957
ADT: Add SerializableGraph
2021-02-09 22:44:01 +01:00
Massimo Fioravanti
8ba9930638
Invert inheritance of GenericGraph nodes
...
GenericGraphs no longer require CRTP.
2021-01-27 19:46:53 +01:00
Alessandro Di Federico
6359edebb7
GenericGraph: Node::has{Successors,Predecessors}
2021-01-26 17:44:21 +01:00
Alvise de Faveri
9eb9e9b1a1
ADT: fix neighbor constness for GenericGraph
...
Problem:
1. `ForwardNode::getConstNeighbor` returns a reference to a non-`const`
object, but the referenced pointer is `const`
2. `FowardNode::toNeighborRange` checks if the type of the argument is
const, but since `Successors` is not declared const the resulting
`toNeighborRange(Successors)` is never executed in the const version
Solution:
1. Make `getConstNeighbor()` return a reference to a `const` pointer
2. Explicitly declare a separate `toNeighborRange()` function which
returns a `const_child_iterator` and remove the template parameter
2021-01-26 17:41:58 +01:00
Pietro Fezzardi
9869f057b9
Use #pragma once for header include guards
2020-11-13 14:12:18 +01:00
Pietro Fezzardi
cd9bc34d9d
Enforce new include conventions
2020-11-13 10:00:24 +01:00
Alessandro Di Federico
d72f69c975
Import GenericGraph
...
This commit imports `GenericGraph`, its tests and fixes some related
issues in `FilteredGraphTraits`.
2020-10-21 10:34:01 +02:00