nl.uu.cs.ape.models.sltlxStruc.SLTLxNegatedConjunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of APE Show documentation
Show all versions of APE Show documentation
APE is a command line tool and an API for the automated exploration of possible computational pipelines (workflows) from large collections of computational tools.
The newest version!
package nl.uu.cs.ape.models.sltlxStruc;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import nl.uu.cs.ape.solver.minisat.SATSynthesisEngine;
/**
* Structure used to model NAND (not (and x y)) operation in SLTLx.
*
* @author Vedran Kasalica
*
*/
public class SLTLxNegatedConjunction extends SLTLxFormula {
private Set nconjunctedFacts;
public SLTLxNegatedConjunction(SLTLxFormula arg1, SLTLxFormula arg2) {
super();
this.nconjunctedFacts = new HashSet<>();
this.nconjunctedFacts.add(arg1);
this.nconjunctedFacts.add(arg2);
}
public SLTLxNegatedConjunction(Collection extends SLTLxFormula> nconjunctedFacts) {
super();
this.nconjunctedFacts = new HashSet<>();
nconjunctedFacts.forEach(fact -> this.nconjunctedFacts.add(fact));
}
@Override
public Set getCNFEncoding(int stateNo, SLTLxVariableSubstitutionCollection variableMapping,
SATSynthesisEngine synthesisEngine) {
return new SLTLxConjunction(nconjunctedFacts).getNegatedCNFEncoding(stateNo, variableMapping, synthesisEngine);
}
@Override
public Set getNegatedCNFEncoding(int stateNo, SLTLxVariableSubstitutionCollection variableMapping,
SATSynthesisEngine synthesisEngine) {
return new SLTLxConjunction(nconjunctedFacts).getCNFEncoding(stateNo, variableMapping, synthesisEngine);
}
}