# The Scheduler

©1998 Research Institute for Symbolic Computation (RISC-Linz)

##### NO WARRANTY

## Package Description

This package contains the implementation of the scheduler. The scheduler is the component of the system which handles the solving process of constraints by commonicating with specific constraint solvers.

#### Usage

## Implementation

### Begin

### Shared Variables

#### Shared Variables Visible from the Outside

##### Vars

**Vars** is a table with entries for the variables of the queries submitted to the scheduler.

**Vars[{1}]** is the list of variables of the first query, ..., **Vars[{CnstrIdx}]** is the list of variables of query **CnstrIdx**.

##### Substitution

**Substitution** is a table with entries for the substitutions computed by the CFLP calculus for the queries submitted to the scheduler.

**Substitution[{1}]** is the substitution computed for the first query, ..., **Substitution[{CnstrIdx}]** is the substitution computed for the **CnstrIdx** query.

##### Constraints

#### Shared Variables which are Private

##### Status

##### CnstrIdx

##### LinkId

**LinkId[{ ***idx ***}]** stores the link to the constraint solver which currently acts on the set of constraints **Constraints[[***idx***]]**

##### MethodList

**MethodList** stores the identifiers for the methods that are applied on the systems of constraints.

### External Processes

#### Links to external processes

##### CSStart

*Syntax call*

**CSStart[ ] **

*Effect*

**CSStart[ ]** attempts to open the links to the external constraint solvers and displays a message about the failure or success of the operation.

*Implementation*

##### CSEnd

*Syntax call*

**CSEnd[ ] **

or

CSEnd[ *link ***]**

*Effect*

**CSEnd[ ]** closes all the links to external constraint solvers.

**CSEnd[ ***link ***]** closes link object *link*

*Implementation*

#### Communication with external solvers

##### SetCSQuery

*Syntax call*

**SetCSQuery[ ***vars, subst, cnstrs ***]**

*Input*

*vars* : the list of variables of cnstrs

*subst* : variable substitution generated by a CFLP refutation

*cnstrs* : the list of constraints generated by a CFLP refutation

*Effect*

get available data from *link*

*Implementation*

##### Ask

*Syntax call*

**Ask[ ***link ***]**

*Input*

*link* : the link object to the external solver

*Effect*

get available data from *link*

*Implementation*

##### LinSolve

##### PolySolve

### Clasifiers

#### IsVar

*Syntax call*

IsVar[*expr***]**

*Input*

expr **: **a *Mathematica* expression

*Output*

**True** if *expr* belongs to **Vars[CnstrIdx]**

**False** otherwise

*Implementation*

*Syntax call*

IsNumericTerm[*term***]**

*Input*

term **: **a term

*Output*

**True** if term is a term without variable

**False** otherwise

*Implementation*

#### IsPolyTerm

*Syntax call*

IsPolyTerm[*expr***]**

*Input*

expr **: **a *Mathematica* expression

*Output*

**True** if *expr* denotes a polynomial term

**False** otherwise

*Implementation*

#### IsLinTerm

*Syntax call*

IsLinTerm[*term***]**

*Input*

term **: **a term

*Output*

**True** if *term* is a *linear* term

**False** otherwise

*Implementation*

### Constraint Filters

#### Auxiliary functions

##### PolyForm

##### GetVars

*Syntax call*

GetVars[*expr***]**

*Input*

expr : a *Mathematica* expression

*Output*

The list of variables of *expr*

*Implementation*

#### PolyFilter

*Syntax call*

PolyFilter[*cnstrs***]**

*Input*

cnstrs **: **a list of constraints

*Output*

The sublist of *cnstrs* which are polynomial equations

*Implementation*

#### LinFilter

*Syntax call*

LinFilter[*cnstrs***]**

*Input*

cnstrs **: **a list of constraints

*Output*

The sublist of *cnstrs* which are linear equations

*Implementation*

### Constraint Selectors

### CS

### The Constraint Scheduler

#### CSolve

*Syntax calls*

CSolve[{*eqs,methods***}***,idx***]**

CSolve[{*eqs,methods,resteqs***}***,idx***]**

*Input*

eqs **: **equations to be solved by the first method of *methods*

*resteqs ***:** equations to be solved by the methods of *methods* except the first

*methods***: **list of solving methods considered for *eqs*

idx** :** position slot for the (partial) solutions of {*eqs*,* methods*} in the nested structure *Sol* of solutions

*Effect*

see implementation

*Implementation*

#### Scheduler

#### FilterSubstitution

### End