Commit Graph

61 Commits

Author SHA1 Message Date
Alessandro Di Federico 2a2ef04ec0 Minor changes
Comment refresh, formatting and small no-op tweaks across unrelated
files.
2026-06-11 17:39:52 +02:00
Ivan Krysak 1a91707a2b GenericGraph: introduce empty() method 2026-02-25 14:10:44 +01:00
Ivan Krysak f0e00d66ab Do not use doxygen for TODOs 2026-02-25 12:47:27 +01:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Alessandro Di Federico c1cbb4e9a0 Initialize pointers to nullptr 2024-09-27 12:07:17 +02:00
Andrea Gussoni 70734496f3 GenericGraph: remove Undirected
Remove the `Undirected` `GraphTraits`
2024-09-20 16:08:50 +02:00
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
Andrea Gussoni c32a4776ab GenericGraph: edge traits for llvm::Inverse 2024-08-12 12:32:45 +02:00
Ivan Krysak 6a1018b860 Remove unused linter suppressors 2024-06-27 11:05:48 +02:00
Alessandro Di Federico ab3d546b0a Introduce GenericGraph::dumpGraph() 2024-04-18 17:50:33 +02:00
Alessandro Di Federico dcfb4621a7 Improve GenericGraph::verify 2024-04-18 17:50:33 +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
Alessandro Di Federico 73a7041396 Introduce GenericGraph::verify 2023-07-26 10:16:25 +02:00
Ivan Krysak bc98e0079f Formatting: change PenaltyReturnTypeOnItsOwnLine
The new value is 21.
2023-07-02 13:20:49 +02:00
Alessandro Di Federico 4c01d9c28d BidirectionalNode: implement edge removal 2023-06-30 13:38:27 +02:00
Alessandro Di Federico b21861b7f9 GraphTraits<GenericGraph>: fix const support
GraphTraits were not fully usable in case of a `const` graph due to a
missing std::conditional_t for the definition of the `Node` type.
2023-06-30 12:35:18 +02:00
Alessandro Di Federico 84dd10cbdb GenerichGraph.h: nullptr-initialize Edge::Neighbor 2023-06-30 12:35:18 +02:00
Ivan Krysak 5b2af637de Minor Changes 2023-05-25 06:25:07 +00:00
Giacomo Vercesi 31cd2b53f9 rcc: add codespell
Add codespell to the list of checks performed by
revng-check-conventions. This should reduce the amount of typos present
in the revng codebase.
2023-05-11 10:05:32 +02:00
Alessandro Di Federico 579b9a749f Introduce GenericGraph::operator= 2023-05-10 09:17:35 +02:00
Ivan Krysak 5034488766 GenericGraph: hasSuccessor and hasPredecessor
Older node types didn't have these helpers, so they were added
for compatibility.
2023-04-27 17:28:22 +02:00
Ivan Krysak 7ca012dbc3 Minor improvements 2023-04-27 17:28:22 +02:00
Alessandro Di Federico b2f22c168f Adopt clang-format 16 2023-04-08 08:42:23 +02:00
Ivan Krysak 9e098d2c9b GenericGraph: fix trait ordering and add inverse 2022-09-26 10:33:43 +02:00
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
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