solver: add an integrity constraint for virtual nodes (#43582)
Upon close inspection of clingo answer sets, in some cases we have "equivalent" (i.e. same hash for the concrete spec) duplicates that differ only because of virtual nodes that are added to the answer set, without any edge using them.
This commit is contained in:
parent
3b6e99381f
commit
263007ba81
@ -523,6 +523,12 @@ attr("virtual_on_edge", PackageNode, ProviderNode, Virtual)
|
||||
provider(ProviderNode, node(_, Virtual)),
|
||||
not external(PackageNode).
|
||||
|
||||
% If a virtual node is in the answer set, it must be either a virtual root,
|
||||
% or used somewhere
|
||||
:- attr("virtual_node", node(_, Virtual)),
|
||||
not attr("virtual_on_incoming_edges", _, Virtual),
|
||||
not attr("virtual_root", node(_, Virtual)).
|
||||
|
||||
attr("virtual_on_incoming_edges", ProviderNode, Virtual)
|
||||
:- attr("virtual_on_edge", _, ProviderNode, Virtual).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user