Fourth Task
Our fourth task will be in the context of programming-by-example, a popular application of program synthesis. For this task, you will not have access to sub-specifications.
In addition, we reproduce the definitions of strat and substr as used in SMT-LIB :
1- string strat(string s, int i) : Singleton string containing a character at given position or empty string when position is out of range. The leftmost position is 0.
2- string substr(string s, int i, int n) : It evaluates to the longest substring of s of length at most n starting at position i. It evaluates to the empty string if n is negative or i is not in the interval [0,l-1] where l is the length of s.