Skip to content

Commit

Permalink
Throw exception for difference operation
Browse files Browse the repository at this point in the history
  • Loading branch information
schuessf committed Nov 25, 2024
1 parent ae94f3b commit 5e731c8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import de.uni_freiburg.informatik.ultimate.automata.petrinet.netdatastructures.Transition;
import de.uni_freiburg.informatik.ultimate.automata.statefactory.IBlackWhiteStateFactory;
import de.uni_freiburg.informatik.ultimate.automata.statefactory.IPetriNet2FiniteAutomatonStateFactory;
import de.uni_freiburg.informatik.ultimate.util.datastructures.DataStructureUtils;
import de.uni_freiburg.informatik.ultimate.util.datastructures.ImmutableSet;
import de.uni_freiburg.informatik.ultimate.util.datastructures.relation.HashRelation;

Expand Down Expand Up @@ -165,6 +166,10 @@ public Difference(final AutomataLibraryServices services, final IBlackWhiteState
final LoopSyncMethod loopSyncMethod, final DifferencePairwiseOnDemand<LETTER, PLACE, ?> inputDpod,
final boolean removeRedundantFlow) throws AutomataOperationCanceledException, PetriNetNot1SafeException {
super(services);
if (DataStructureUtils.haveNonEmptyIntersection(originalMinuend.getPlaces(), subtrahendDfa.getStates())) {
throw new UnsupportedOperationException(
"Difference is only supported for operands with distinct places / states.");
}
mSubtrahend = subtrahendDfa;
mContentFactory = factory;
mLoopSyncMethod = loopSyncMethod;
Expand Down

0 comments on commit 5e731c8

Please sign in to comment.