The language of inca extends the one of gringo by multi-valued
(constraint) variables and constraints over finite domains. The
domains of all variables have to be specified, and constraint
expressions work like any other proposition in the logic program.


CONSTRAINT VARIABLE DECLARATION
Constraint variables are preceded by a dollar sign ($). A constraint
variable $v taking integer values in the range l..u, for integer
constants l and u is declared as follows, using the #var statement:

       #var $v = l..u.

Sets of constraint variables can be declared in a more general way
using pooling or first-order variables, e.g.,

	#var $cell(X,Y) : row(X) : column(Y) = 1..n.

	#var $pigeon(1..n) = 1..(n-1).


PRIMITIVE CONSTRAINTS
A primitive constraint relates the value of a constraint variable to
a constant. Supported relations are #<, #<=, #==, #!=, #>=, #>. E.g.

	$v(X) #== N :- assign(X,N).

	in_range :- $v #>= 3, $v #<= 5.

In principle, all constraints can be encoded into rules over only
primitive constraints.


GLOBAL CONSTRAINTS
At present, inca supports integer linear, alldifferent, and its
special case, permutation constraints. Alldifferent and permutation
works over a set of constraint variables, e.g.,

	#alldifferent { $u, $v, $w }.

	#alldifferent { $pigeon(1..n) }.

	#permutation { $cell(X,Y) : row(X) } :- column(X).

Integer linear constraints work similar to gringo's sum aggregates,
e.g.,

	#linear [ $u, 3 * $v, -1 * $w ] #== 3.

	in_range :- 3 #linear [ -1 * $x, $y ] 8.


OUTPUT
inca prints constraint answer sets, i.e., a pair of all true
propositions and a constraint variable assignment.


EXAMPLE
The following program has one constraint answer set.

	#var $v = 1..3.
	a.
	$v #< 2.

Accordingly, inca prints the following result:

	Answer: 1
	a 
	$v=1 
	SATISFIABLE


OPTIONS
There are several options for inca available. Run inca --help for
a complete list. See file libinca/inca/inca.h for more experimental
options on lazy nogood generation.

