public class CSPReader extends org.sat4j.reader.Reader implements ICSPCallback
Constructor and Description |
---|
CSPReader(org.sat4j.specs.ISolver solver,
boolean allDiffCard) |
protected Relation[] relations
public final org.sat4j.specs.IProblem parseInstance(Reader in) throws org.sat4j.reader.ParseFormatException, org.sat4j.specs.ContradictionException, IOException
parseInstance
in class org.sat4j.reader.Reader
org.sat4j.reader.ParseFormatException
org.sat4j.specs.ContradictionException
IOException
public void decode(int[] model, PrintWriter out)
decode
in class org.sat4j.reader.Reader
public String decode(int[] model)
decode
in class org.sat4j.reader.Reader
protected void manageAllowedTuples(int relnum, int arity, int nbtuples)
public void beginInstance(String arg0)
beginInstance
in interface ICSPCallback
public void beginDomainsSection(int nbdomain)
beginDomainsSection
in interface ICSPCallback
public void beginDomain(String id, int size)
beginDomain
in interface ICSPCallback
public void addDomainValue(int arg0)
addDomainValue
in interface ICSPCallback
public void addDomainValue(int begin, int end)
addDomainValue
in interface ICSPCallback
public void endDomain()
endDomain
in interface ICSPCallback
public void endDomainsSection()
endDomainsSection
in interface ICSPCallback
public void beginVariablesSection(int expectedNumberOfVariables)
beginVariablesSection
in interface ICSPCallback
public void addVariable(String idvar, String iddomain)
addVariable
in interface ICSPCallback
public void endVariablesSection()
endVariablesSection
in interface ICSPCallback
public void beginRelationsSection(int nbrel)
beginRelationsSection
in interface ICSPCallback
public void beginRelation(String name, int arity, int nbTuples, boolean isSupport)
beginRelation
in interface ICSPCallback
public void addRelationTuple(int[] tuple)
addRelationTuple
in interface ICSPCallback
public void endRelation()
endRelation
in interface ICSPCallback
public void endRelationsSection()
endRelationsSection
in interface ICSPCallback
public void beginPredicatesSection(int arg0)
beginPredicatesSection
in interface ICSPCallback
public void beginPredicate(String name)
beginPredicate
in interface ICSPCallback
public void addFormalParameter(String name, String type)
addFormalParameter
in interface ICSPCallback
public void predicateExpression(String expr)
predicateExpression
in interface ICSPCallback
public void endPredicate()
endPredicate
in interface ICSPCallback
public void endPredicatesSection()
endPredicatesSection
in interface ICSPCallback
public void beginConstraintsSection(int arg0)
beginConstraintsSection
in interface ICSPCallback
public void beginConstraint(String name, int arity)
beginConstraint
in interface ICSPCallback
public void constraintReference(String ref)
constraintReference
in interface ICSPCallback
public void addVariableToConstraint(String arg0)
addVariableToConstraint
in interface ICSPCallback
public void addEffectiveParameter(String arg0)
addEffectiveParameter
in interface ICSPCallback
public void addEffectiveParameter(int arg0)
addEffectiveParameter
in interface ICSPCallback
public void beginParameterList()
beginParameterList
in interface ICSPCallback
public void addIntegerItem(int arg0)
addIntegerItem
in interface ICSPCallback
public void addVariableItem(String arg0)
addVariableItem
in interface ICSPCallback
public void endParamaterList()
endParamaterList
in interface ICSPCallback
public void addConstantParameter(String arg0, int arg1)
addConstantParameter
in interface ICSPCallback
public void constraintExpression(String arg0)
constraintExpression
in interface ICSPCallback
public void endConstraint()
endConstraint
in interface ICSPCallback
public void endConstraintsSection()
endConstraintsSection
in interface ICSPCallback
public void endInstance()
endInstance
in interface ICSPCallback
public org.sat4j.specs.IProblem parseInstance(InputStream in) throws org.sat4j.reader.ParseFormatException, org.sat4j.specs.ContradictionException, IOException
parseInstance
in class org.sat4j.reader.Reader
org.sat4j.reader.ParseFormatException
org.sat4j.specs.ContradictionException
IOException
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.