Represents arrays by the indexes up to which the value remains the same. More...
#include <string_refinement_util.h>
array_of(x) with {i:=a} with {j:=b} is converted to an array arr where for all index k smaller than i, arr[k] is a, for all index between i (exclusive) and j it is b and for the others it is x. extra_value. extra_value. array_of(x) with {i:=a} with {j:=b} ... This is the form in which array valuations coming from the underlying solver are given. Represents arrays by the indexes up to which the value remains the same.
For instance ‘{'a’, 'a', 'a', 'b', 'b', 'c'}‘ would be represented by by ('a’, 2) ; ('b', 4), ('c', 5). This is particularly useful when the array is constant on intervals.
Definition at line 98 of file string_refinement_util.h.
An expression of the form array_of(x) with {i:=a} with {j:=b} is converted to an array arr where for all index k smaller than i, arr[k] is a, for all index between i (exclusive) and j it is b and for the others it is x.
Definition at line 105 of file string_refinement_util.h.
Initialize an array expression to sparse array representation, avoiding repetition of identical successive values and setting the default to extra_value.
Definition at line 122 of file string_refinement_util.cpp.
Initialize a sparse array from an array represented by a list of index-value pairs, and setting the default to extra_value.
Indexes must be constant expressions, and negative indexes are ignored.
Definition at line 140 of file string_refinement_util.cpp.
Array containing the same value at each index.
Definition at line 136 of file string_refinement_util.h.
Get the value at the specified index.
Complexity is logarithmic in the number of entries.
Definition at line 169 of file string_refinement_util.cpp.
Convert to an array representation, ignores elements at index >= size.
Definition at line 176 of file string_refinement_util.cpp.
If the expression is an array_exprt or a with_exprt uses the appropriate constructor, otherwise returns empty optional.
Definition at line 158 of file string_refinement_util.cpp.
Definition at line 105 of file string_refinement_util.cpp.