You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Variable :x is assigned to the first RuleNode r1 encountered.
Other matches with variable :x are then pairwise compared to RuleNode r1.
Any SoftFails involved are not combined to a HardFail.
The tests below demonstrate HardFails that are not caught by the pattern_match:
@testset"3 VarNodes: pairwise Softfail, triplewise HardFail"begin#TODO: this test fails because, in the current implementation, variable comparisons are done pairwise# domains of holes within vars should be updated for stronger inference
rn =RuleNode(4, [
RuleNode(4, [Hole(BitVector((1, 1, 0))), Hole(BitVector((0, 1, 1)))]),
Hole(BitVector((1, 0, 1)))
])
mn =RuleNode(4, [
RuleNode(4, [VarNode(:x), VarNode(:x)]),
VarNode(:x)
])
@testpattern_match(rn, mn) isa HerbConstraints.PatternMatchHardFail
end@testset"3 VarNodes: HardFail on instance 2 and 3"begin#TODO: this test fails because, in the current implementation, only (1, 2) and (1, 3) are compared# domains of holes within vars should be updated for stronger inference
rn =RuleNode(4, [
RuleNode(4, [Hole(BitVector((1, 1, 1))), RuleNode(1)]),
RuleNode(2)
])
mn =RuleNode(4, [
RuleNode(4, [VarNode(:x), VarNode(:x)]),
VarNode(:x)
])
@testpattern_match(rn, mn) isa HerbConstraints.PatternMatchHardFail
end
Why is this not here yet
Forbidden constraints with 3 or more occurrences of the same VarNode are considered an edgecase.
The text was updated successfully, but these errors were encountered:
Variable
:x
is assigned to the first RuleNoder1
encountered.Other matches with variable
:x
are then pairwise compared to RuleNoder1
.Any SoftFails involved are not combined to a HardFail.
The tests below demonstrate HardFails that are not caught by the pattern_match:
Why is this not here yet
Forbidden constraints with 3 or more occurrences of the same
VarNode
are considered an edgecase.The text was updated successfully, but these errors were encountered: