1 \section{\protect\isl/ interface
}
5 The
\barvinok/ library currently supports just two
6 functions that interface with the
\isl/ library.
7 In time, this interface will grow and is set to replace
8 the
\PolyLib/ interface.
9 For more information on the
\isl/ data structures, see
10 the
\isl/ user manual.
13 __isl_give isl_pw_qpolynomial *isl_set_card(__isl_take isl_set *set);
15 Compute the number of elements in an
\ai[\tt]{isl
\_set}.
16 The resulting
\ai[\tt]{isl
\_pw\_qpolynomial} has purely parametric cells.
19 __isl_give isl_pw_qpolynomial *isl_map_card(__isl_take isl_map *map);
21 Compute a closed form expression for the number of image elements
22 associated to any element in the domain of the given
\ai[\tt]{isl
\_map}.
23 The union of the cells in the resulting
\ai[\tt]{isl
\_pw\_qpolynomial}
24 is equal to the domain of the input
\ai[\tt]{isl
\_map}.
27 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sum(
28 __isl_take isl_pw_qpolynomial *pwqp);
30 Compute the sum of the given piecewise quasipolynomial over
31 all integer points in the domain. The result is a piecewise
32 quasipolynomial that only involves the parameters.
34 \subsection{Calculator
}
36 The
\ai[\tt]{iscc
} calculator offers an interface to some
37 of the functionality provided by the
\isl/ and
\barvinok/
39 The supported operations are shown in
\autoref{t:iscc
}.
40 Here are some examples:
42 P :=
[n, m
] ->
{ [i,j
] :
0 <= i <= n and i <= j <= m
};
45 f :=
[n,m
] ->
{ [i,j
] -> i*j + n*i*i*j : i,j >=
0 and
5i +
27j <= n+m
};
48 s @
[n,m
] ->
{ [] :
0 <= n,m <=
20 };
50 f :=
[n
] ->
{ [i
] ->
2*n*i - n*n +
3*n -
1/
2*i*i -
3/
2*i-
1 :
51 (exists j :
0 <= i <
4*n-
1 and
0 <= j < n and
52 2*n-
1 <= i+j <=
4*n-
2 and i <=
2*n-
1 )
};
55 u @
[n
] ->
{ [] :
0 <= n <=
10 };
57 m :=
[n
] ->
{ [i,j
] ->
[i+
1,j+
1] :
1 <= i,j < n;
58 [i,j
] ->
[i+
1,j-
1] :
1 <= i < n and
2 <= j <= n
};
64 \begin{tabular
}{lp
{0.7\textwidth}}
68 $q$ :=
\ai[\tt]{card
} $s$ &
69 number of elements in the set $s$
71 $q$ :=
\ai[\tt]{card
} $m$ &
72 number of elements in the image of a domain element
74 $s$ :=
\ai[\tt]{dom
} $m$ &
77 $s$ :=
\ai[\tt]{ran
} $m$ &
80 $s_2$ :=
\ai[\tt]{lexmin
} $s_1$ &
81 lexicographically minimal element of $s_1$
83 $m_2$ :=
\ai[\tt]{lexmin
} $m_1$ &
84 lexicographically minimal image element
86 $s_2$ :=
\ai[\tt]{lexmax
} $s_1$ &
87 lexicographically maximal element of $s_1$
89 $m_2$ :=
\ai[\tt]{lexmax
} $m_1$ &
90 lexicographically maximal image element
92 $s_2$ :=
\ai[\tt]{sample
} $s_1$ &
93 a sample element of the set $s_1$
95 $m_2$ :=
\ai[\tt]{sample
} $m_1$ &
96 a sample element of the map $m_1$
98 $q_2$ :=
\ai[\tt]{sum
} $q_1$ &
99 sum $q_1$ over all integer points in the domain of $q_1$
101 $f$ :=
\ai[\tt]{ub
} $q$ &
102 upper bound on the piecewise quasipolynomial $q$ over
103 all integer points in the domain of $q$.
104 This operation is only available if
105 \ai[\tt]{GiNaC
} support was compiled in.
107 $s_3$ := $s_1$
\ai{$+$
} $s_2$ & union
109 $m_3$ := $m_1$
\ai{$+$
} $m_2$ & union
111 $q_3$ := $q_1$
\ai{$+$
} $q_2$ & sum
113 $s_3$ := $s_1$
\ai{$-$
} $s_2$ & set difference
115 $m_3$ := $m_1$
\ai{$-$
} $m_2$ & set difference
117 $q_3$ := $q_1$
\ai{$-$
} $q_2$ & difference
119 $s_3$ := $s_1$
\ai{$*$
} $s_2$ & intersection
121 $m_3$ := $m_1$
\ai{$*$
} $m_2$ & intersection
123 $q_3$ := $q_1$
\ai{$*$
} $q_2$ & product
125 $q_2$ := $q_1$
\ai{@
} $s$ &
126 evaluate the piecewise quasipolynomial $q_1$ in each element
127 of the set $s$ and return a piecewise quasipolynomial
128 mapping each of the individual elements to the resulting
131 $q$ := $f$
\ai{@
} $s$ &
132 evaluate the piecewise quasipolynomial fold $f$ in each element
133 of the set $s$ and return a piecewise quasipolynomial
134 mapping each of the individual elements to the resulting
137 $l$ := $m$
\ai[\tt]{\^
{}+
} &
138 compute an overapproximation of the transitive closure
139 of $m$ and return a list containing the overapproximation
140 and a boolean that is true if the overapproximation
144 the element at position $i$ in the list $l$
147 \caption{\protect\ai[\tt]{iscc
} operations. The variables
148 have the following types,
151 $q$: piecewise quasipolynomial,
152 $f$: piecewise quasipolynomial fold,