Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ template <typename L> struct ConstantEdgeFunction {
return Value;
}

template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
template <typename ConcreteEF>
[[nodiscard]] static EdgeFunction<l_t>
compose(EdgeFunctionRef<ConcreteEF> This,
const EdgeFunction<l_t> &SecondFunction);
const EdgeFunction<l_t> &SecondFunction)
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>;

template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
template <typename ConcreteEF>
[[nodiscard]] static EdgeFunction<l_t>
join(EdgeFunctionRef<ConcreteEF> This,
const EdgeFunction<l_t> &OtherFunction);
join(EdgeFunctionRef<ConcreteEF> This, const EdgeFunction<l_t> &OtherFunction)
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>;

[[nodiscard]] constexpr bool isConstant() const noexcept { return true; }

Expand Down Expand Up @@ -441,10 +442,12 @@ EdgeFunction<L> EdgeIdentity<L>::join(EdgeFunctionRef<EdgeIdentity> This,
}

template <typename L>
template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
template <typename ConcreteEF>
EdgeFunction<L>
ConstantEdgeFunction<L>::compose(EdgeFunctionRef<ConcreteEF> This,
const EdgeFunction<L> &SecondFunction) {
const EdgeFunction<L> &SecondFunction)
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>
{
if (auto Default = defaultComposeOrNull(This, SecondFunction)) {
return Default;
}
Expand Down Expand Up @@ -482,10 +485,12 @@ ConstantEdgeFunction<L>::compose(EdgeFunctionRef<ConcreteEF> This,
}

template <typename L>
template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
template <typename ConcreteEF>
EdgeFunction<L>
ConstantEdgeFunction<L>::join(EdgeFunctionRef<ConcreteEF> This,
const EdgeFunction<l_t> &OtherFunction) {
const EdgeFunction<l_t> &OtherFunction)
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>
{
if (auto Default = defaultJoinOrNull<l_t>(This, OtherFunction)) {
return Default;
}
Expand Down
Loading