@Test void test_transitive_constraint_copy() throws Exception { SymbolicValue aNEb = relationalSV(Tree.Kind.NOT_EQUAL_TO, b, a); SymbolicValue bNEc = relationalSV(Tree.Kind.NOT_EQUAL_TO, c, b); ProgramState programState = ProgramState.EMPTY_STATE; List<ProgramState> programStates = aNEb.setConstraint(programState, TRUE); programState = Iterables.getOnlyElement(programStates); programStates = bNEc.setConstraint(programState, TRUE); programState = Iterables.getOnlyElement(programStates); SymbolicValue aNEc = relationalSV(Tree.Kind.NOT_EQUAL_TO, c, a); programStates = aNEc.setConstraint(programState, FALSE); assertThat(programStates).hasSize(1); programStates = aNEc.setConstraint(programState, TRUE); assertThat(programStates).hasSize(1); }
@Override public List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint) { return setConstraint(initialProgramState, booleanConstraint, new HashSet<>(initialProgramState.knownRelations())); }
RelationalSymbolicValue extends BinarySymbolicValue { @Override public List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint) { return setConstraint(initialProgramState, booleanConstraint, new HashSet<>(initialProgramState.knownRelations())); } }
RelationalSymbolicValue extends BinarySymbolicValue { @Override public List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint) { return setConstraint(initialProgramState, booleanConstraint, new HashSet<>(initialProgramState.knownRelations())); } RelationalSymbolicValue(Kind kind); @VisibleForTesting  RelationalSymbolicValue(Kind kind, SymbolicValue leftOp, SymbolicValue rightOp); }
RelationalSymbolicValue extends BinarySymbolicValue { @Override public List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint) { return setConstraint(initialProgramState, booleanConstraint, new HashSet<>(initialProgramState.knownRelations())); } RelationalSymbolicValue(Kind kind); @VisibleForTesting  RelationalSymbolicValue(Kind kind, SymbolicValue leftOp, SymbolicValue rightOp); @Override List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint); @Override boolean equals(Object o); boolean isEquality(); @Override int hashCode(); @Override String toString(); @VisibleForTesting Kind kind(); }
RelationalSymbolicValue extends BinarySymbolicValue { @Override public List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint) { return setConstraint(initialProgramState, booleanConstraint, new HashSet<>(initialProgramState.knownRelations())); } RelationalSymbolicValue(Kind kind); @VisibleForTesting  RelationalSymbolicValue(Kind kind, SymbolicValue leftOp, SymbolicValue rightOp); @Override List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint); @Override boolean equals(Object o); boolean isEquality(); @Override int hashCode(); @Override String toString(); @VisibleForTesting Kind kind();  }