10.35.13.1 Syntax of Indexicals

Constant ::= integer
| inf { minus infinity }
| sup { plus infinity }

Term ::= Constant
| var { suspend until assigned }
| min(var) { min. of domain of X }
| max(var) { max. of domain of X }
| card(var) { size of domain of X }
| - Term
| Term + Term
| Term - Term
| Term * Term
| Term /> Term { division rounded up }
| Term /< Term { division rounded down }
| Term mod Term
| Term rem Term

TermSet ::= {Term,...,Term}

Range ::= TermSet
| dom(var) { domain of X }
| Term .. Term { interval }
| Range /\ Range { intersection }
| Range \/ Range { union }
| \ Range { complement }
| - Range { pointwise negation }
| Range + Range { pointwise addition }
| Range - Range { pointwise subtraction }
| Range mod Range { pointwise modulo }
| Range rem Range { pointwise remainder }
| Range + Term { pointwise addition }
| Range - Term { pointwise subtraction }
| Term - Range { pointwise subtraction }
| Range mod Term { pointwise modulo }
| Range rem Term { pointwise remainder }
| Range ? Range
| unionof(var,Range,Range)
| switch(Term,MapList)

ConstantSet ::= {integer,...,integer}

ConstantRange ::= ConstantSet
| Constant .. Constant
| ConstantRange /\ ConstantRange
| ConstantRange \/ ConstantRange
| \ ConstantRange

MapList ::= []
| [integer-ConstantRange|MapList]

CTable ::= []
| [CRow|CTable]

CRow ::= []
| [integer|CRow]
| [ConstantRange|CRow]

CList ::= []
| [integer|CList]

VList ::= []
| [var|VList]

Indexical ::= var in Range

Indexicals ::= Indexical
| Indexical , Indexicals

ConstraintBody ::= var { X stands for X#=1 }
| true
| false
| 1
| 0
| var in ConstantRange
| element(var,CList,var)
| table([VList],CTable)
| LinExpr RelOp LinExpr
| #\ ConstraintBody
| ConstraintBody #/\ ConstraintBody
| ConstraintBody #\/ ConstraintBody
| ConstraintBody #=> ConstraintBody
| ConstraintBody #\ ConstraintBody
| ConstraintBody #<=> ConstraintBody

IxConstraintBody ::= Indexicals
| ConstraintBody

Head ::= term { a compound term with unique variable args }

TellPos ::= Head +: IxConstraintBody
TellNeg ::= Head -: Indexicals
AskPos ::= Head +? Indexical
AskNeg ::= Head -? Indexical

ConstraintDef ::= TellPos
| TellNeg
| AskPos
| AskNeg

Send feedback on this subject.