org.sat4j.csp.xml
Interface ICSPCallback

All Known Implementing Classes:
SimpleCallback

public interface ICSPCallback


Method Summary
 void addConstantParameter(String name, int value)
          provides a constant value
 void addDomainValue(int v)
          add a single value to the current domain
 void addDomainValue(int first, int last)
          add the range of values [first..last] to the current domain
 void addEffectiveParameter(int value)
          add an effective parameter which is a simple integer
 void addEffectiveParameter(String name)
          add an effective parameter which is a simple variable to the current constraint
 void addFormalParameter(String name, String type)
          add a formal parameter to the current predicate
 void addIntegerItem(int value)
          provides an integer value in a parameter list of a constraint
 void addRelationTuple(int[] tuple)
          add a single tuple to the current relation
 void addVariable(String name, String domain)
          callback called to define a new variable
 void addVariableItem(String name)
          provides the name of a variable in a parameter list of a constraint
 void addVariableToConstraint(String name)
          declares that a variable is in the constraint scope
 void beginConstraint(String name, int arity)
          callback called at the beginning of the declaration of one constraint
 void beginConstraintsSection(int nbConstraints)
          callback called at the beginning of the constraints declarations
 void beginDomain(String name, int nbValue)
          callback called at the beginning of the declaration of one domain
 void beginDomainsSection(int nbDomains)
          callback called at the beginning of the domains declarations
 void beginInstance(String name)
          signal the beginning of parsing
 void beginParameterList()
          begins the list tag for parameters of a constraint
 void beginPredicate(String name)
          callback called at the beginning of the declaration of one predicate
 void beginPredicatesSection(int nbPredicates)
          callback called at the beginning of the predicates declarations
 void beginRelation(String name, int arity, int nbTuples, boolean isSupport)
          callback called at the beginning of the declaration of one relation
 void beginRelationsSection(int nbRelations)
          callback called at the beginning of the relations declarations
 void beginVariablesSection(int nbVariables)
          callback called at the beginning of the variables declarations
 void constraintExpression(String expr)
          provide the expression of the current constraint as an expression in a syntac chosen by the solver
 void constraintReference(String name)
          provide the definition of the current constraint
 void endConstraint()
          ends the definition of the current constraint
 void endConstraintsSection()
          end the definition of all constraints
 void endDomain()
          ends the definition of the current domain
 void endDomainsSection()
          end the definition of all domains
 void endInstance()
          signal the end of parsing
 void endParamaterList()
          ends the list tag for parameters of a constraint
 void endPredicate()
          ends the definition of the current predicate
 void endPredicatesSection()
          end the definition of all predicates
 void endRelation()
          ends the definition of the current relation
 void endRelationsSection()
          end the definition of all relations
 void endVariablesSection()
          end the definition of all variables
 void predicateExpression(String expr)
          provide the expression of the current predicate
 

Method Detail

beginInstance

void beginInstance(String name)
signal the beginning of parsing

Parameters:
name - name of the instance

beginDomainsSection

void beginDomainsSection(int nbDomains)
callback called at the beginning of the domains declarations

Parameters:
nbDomains - number of domains that will be declared

beginDomain

void beginDomain(String name,
                 int nbValue)
callback called at the beginning of the declaration of one domain

Parameters:
name - identifier of the domain
nbValue - number of values in the domain

addDomainValue

void addDomainValue(int v)
add a single value to the current domain

Parameters:
v - value to add to the domain

addDomainValue

void addDomainValue(int first,
                    int last)
add the range of values [first..last] to the current domain

Parameters:
first - first value to add to the domain
last - last value to add to the domain

endDomain

void endDomain()
ends the definition of the current domain


endDomainsSection

void endDomainsSection()
end the definition of all domains


beginVariablesSection

void beginVariablesSection(int nbVariables)
callback called at the beginning of the variables declarations

Parameters:
nbVariables - number of variables that will be declared

addVariable

void addVariable(String name,
                 String domain)
callback called to define a new variable

Parameters:
name - identifier of the variable
domain - identifier of the variable domain

endVariablesSection

void endVariablesSection()
end the definition of all variables


beginRelationsSection

void beginRelationsSection(int nbRelations)
callback called at the beginning of the relations declarations

Parameters:
nbRelations - number of relations that will be declared

beginRelation

void beginRelation(String name,
                   int arity,
                   int nbTuples,
                   boolean isSupport)
callback called at the beginning of the declaration of one relation

Parameters:
name - identifier of the relation
arity - arity of the relation
nbTuples - number of tuples in the relation
isSupport - true if tuples represent support, false if tuples represent conflicts

addRelationTuple

void addRelationTuple(int[] tuple)
add a single tuple to the current relation

Parameters:
tuple - tuple to add to the relation (contains arity elements)

endRelation

void endRelation()
ends the definition of the current relation


endRelationsSection

void endRelationsSection()
end the definition of all relations


beginPredicatesSection

void beginPredicatesSection(int nbPredicates)
callback called at the beginning of the predicates declarations

Parameters:
nbPredicates - number of predicates that will be declared

beginPredicate

void beginPredicate(String name)
callback called at the beginning of the declaration of one predicate

Parameters:
name - identifier of the predicate

addFormalParameter

void addFormalParameter(String name,
                        String type)
add a formal parameter to the current predicate

Parameters:
name - name of the parameter
type - type of the parameter

predicateExpression

void predicateExpression(String expr)
provide the expression of the current predicate

Parameters:
expr - the abstract syntax tree representing the expression

endPredicate

void endPredicate()
ends the definition of the current predicate


endPredicatesSection

void endPredicatesSection()
end the definition of all predicates


beginConstraintsSection

void beginConstraintsSection(int nbConstraints)
callback called at the beginning of the constraints declarations

Parameters:
nbConstraints - number of constraints that will be declared

beginConstraint

void beginConstraint(String name,
                     int arity)
callback called at the beginning of the declaration of one constraint

Parameters:
name - identifier of the constraint
arity - arity of the constraint

constraintReference

void constraintReference(String name)
provide the definition of the current constraint

Parameters:
name - the refererence to the definition of this constraint. May be a relation, a predicate or the name of a global constraint

addVariableToConstraint

void addVariableToConstraint(String name)
declares that a variable is in the constraint scope

Parameters:
name - name of the variable

addEffectiveParameter

void addEffectiveParameter(String name)
add an effective parameter which is a simple variable to the current constraint

Parameters:
name - name of the variable passed as parameter

addEffectiveParameter

void addEffectiveParameter(int value)
add an effective parameter which is a simple integer

Parameters:
value - value of the parameter

beginParameterList

void beginParameterList()
begins the list tag for parameters of a constraint


addIntegerItem

void addIntegerItem(int value)
provides an integer value in a parameter list of a constraint

Parameters:
value - value of current list item

addVariableItem

void addVariableItem(String name)
provides the name of a variable in a parameter list of a constraint

Parameters:
name - name of the current list item

endParamaterList

void endParamaterList()
ends the list tag for parameters of a constraint


addConstantParameter

void addConstantParameter(String name,
                          int value)
provides a constant value


constraintExpression

void constraintExpression(String expr)
provide the expression of the current constraint as an expression in a syntac chosen by the solver

Parameters:
expr - the expression

endConstraint

void endConstraint()
ends the definition of the current constraint


endConstraintsSection

void endConstraintsSection()
end the definition of all constraints


endInstance

void endInstance()
signal the end of parsing



Copyright © 2012 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.