I didn't notice that we have some new stuff for ktest. It seems pretty nice. Unfortunately, it requires quite some work to revise those regex to make it work for the Java backend.

As you can see below, the biggest problem is that the pretty printed results from the Java backend have sort information ```Term``` after the variable and much less parentheses. 

```
ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/takeout-1.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3633 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( a (  ), cons ( b (  ), nil (  ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( a, cons (  b, nil  ) )

Solution 2:
Solution:K -->
L:Term |-> cons ( b, cons (  a, nil  ) )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-fast-2.logik' '--search' '--bound' '1' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3988 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( c (  ), cons ( b (  ), cons ( a (  ), nil (  ) ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( c, cons ( b, cons (  a, nil  ) ) )


Done with ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/fact-2.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] (time 3557 ms)
ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-slow-3.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3992 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( c (  ), cons ( X, cons ( a (  ), nil (  ) ) ) )\E\n\Q"T" |-> cons ( a (  ), cons ( X, cons ( c (  ), nil (  ) ) ) )\E\n\Q"X" |-> X\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( c, cons ( X:Term, cons (  a, nil  ) ) )
T:Term |-> cons ( a, cons ( X, cons (  c, nil  ) ) )
X:Term |-> X


Done with ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/fact-4.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] (time 3119 ms)
ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-fast-1.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3443 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( c (  ), cons ( b (  ), cons ( a (  ), nil (  ) ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( c, cons ( b, cons (  a, nil  ) ) )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/family-2.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 4814 ms)
Unexpected program output:
Expected result to match regular expression:
"X".*david

but found:
Search results:

Solution 1:
Solution:K -->
X:Term |-> david

Solution 2:
Solution:K -->
X:Term |-> jim

Solution 3:
Solution:K -->
X:Term |-> steve


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-slow-palindromes-1.logik' '--search' '--bound' '5' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 5084 ms)
Unexpected program output:
Expected result to match regular expression:
"L" |-> cons \( (.*?), cons \( \1, nil \(  \) \) \)

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( _113:Term, cons ( _113, nil ) )

Solution 2:
Solution:K -->
L:Term |-> cons ( _113:Term, cons ( _146:Term, cons ( _113, nil ) ) )

Solution 3:
Solution:K -->
L:Term |-> cons ( _113:Term, cons ( _146:Term, cons ( _146, cons ( _113, nil )
   ) ) )

Solution 4:
Solution:K -->
L:Term |-> cons ( _113:Term, nil )

Solution 5:
Solution:K -->
L:Term |-> nil


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/append-1.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3349 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"V" |-> cons ( a (  ), cons ( b (  ), nil (  ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
V:Term |-> cons ( a, cons (  b, nil  ) )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-fast-palindromes-1.logik' '--search' '--bound' '5' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3767 ms)
Unexpected program output:
Expected result to match regular expression:
"L" |-> cons \( (.*?), cons \( \1, nil \(  \) \) \)

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( _123:Term, cons ( _123, nil ) )

Solution 2:
Solution:K -->
L:Term |-> cons ( _123:Term, cons ( _157:Term, cons ( _123, nil ) ) )

Solution 3:
Solution:K -->
L:Term |-> cons ( _123:Term, cons ( _157:Term, cons ( _157, cons ( _123, nil )
   ) ) )

Solution 4:
Solution:K -->
L:Term |-> cons ( _123:Term, nil )

Solution 5:
Solution:K -->
L:Term |-> nil


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-fast-3.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3477 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( c (  ), cons ( X, cons ( a (  ), nil (  ) ) ) )\E\n\Q"T" |-> cons ( a (  ), cons ( X, cons ( c (  ), nil (  ) ) ) )\E\n\Q"X" |-> X\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( c, cons ( X:Term, cons (  a, nil  ) ) )
T:Term |-> cons ( a, cons ( X, cons (  c, nil  ) ) )
X:Term |-> X


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/takeout-2.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3443 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( a (  ), cons ( b (  ), cons ( c (  ), cons ( d (  ), nil (  ) ) ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( a, cons ( b, cons ( c, cons (  d, nil  ) ) ) )

Solution 2:
Solution:K -->
L:Term |-> cons ( b, cons ( a, cons ( c, cons (  d, nil  ) ) ) )

Solution 3:
Solution:K -->
L:Term |-> cons ( b, cons ( c, cons ( a, cons (  d, nil  ) ) ) )

Solution 4:
Solution:K -->
L:Term |-> cons ( b, cons ( c, cons ( d, cons (  a, nil  ) ) ) )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-slow-1.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3720 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( c (  ), cons ( b (  ), cons ( a (  ), nil (  ) ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( c, cons ( b, cons (  a, nil  ) ) )


Done with ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/fact-1.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] (time 3066 ms)
ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/append-2.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3320 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L1" |-> cons ( a (  ), cons ( b (  ), nil (  ) ) )\E\n\Q"L2" |-> nil (  )\E

but found:
Search results:

Solution 1:
Solution:K -->
L1:Term |-> cons ( a, cons (  b, nil  ) )
L2:Term |-> nil

Solution 2:
Solution:K -->
L1:Term |-> nil
L2:Term |-> cons ( b, cons (  a, nil  ) )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/append-4.logik' '--search' '--bound' '5' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3607 ms)
Unexpected program output:
Expected result to match regular expression:
"L1" |-> cons \( (.*?), cons \( ((?!\1).*?), cons \( ((?!\1|\2).*?), cons \( ((?!\1|\2|\3).*?), nil \(  \) \) \) \) \)\n"L2" \|-> L2\n"L3" \|-> cons \( \1, cons \( \2, cons \( \3, cons \( \4, cons \( a \(  \), L2 \) \) \) \) \)

but found:
Search results:

Solution 1:
Solution:K -->
L1:Term |-> cons ( _99:Term, cons ( _133:Term, cons ( _170:Term, cons ( _210
  :Term, nil ) ) ) )
L2:Term |-> L2:Term
L3:Term |-> cons ( _99, cons ( _133, cons ( _170, cons ( _210, cons ( a, L2 ) 
  ) ) ) )

Solution 2:
Solution:K -->
L1:Term |-> cons ( _99:Term, cons ( _133:Term, cons ( _170:Term, nil ) ) )
L2:Term |-> L2:Term
L3:Term |-> cons ( _99, cons ( _133, cons ( _170, cons ( a, L2 ) ) ) )

Solution 3:
Solution:K -->
L1:Term |-> cons ( _99:Term, cons ( _133:Term, nil ) )
L2:Term |-> L2:Term
L3:Term |-> cons ( _99, cons ( _133, cons ( a, L2 ) ) )

Solution 4:
Solution:K -->
L1:Term |-> cons ( _99:Term, nil )
L2:Term |-> L2:Term
L3:Term |-> cons ( _99, cons ( a, L2 ) )

Solution 5:
Solution:K -->
L1:Term |-> nil
L2:Term |-> L2:Term
L3:Term |-> cons ( a, L2 )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-fast-palindromes-2.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3269 ms)
Unexpected program output:
Expected result to match regular expression:
"A" \|-> A\n"B" \|-> B\n"C" \|-> A

but found:
Search results:

Solution 1:
Solution:K -->
A:Term |-> A:Term
B:Term |-> B:Term
C:Term |-> A


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/append-3.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3475 ms)
Unexpected program output:
Expected result to match regular expression:
"Y" \|-> (.*?)\n"Z" |-> cons \( a \(  \), \1 \)

but found:
Search results:

Solution 1:
Solution:K -->
Y:Term |-> Y:Term
Z:Term |-> cons ( a, Y )


Done with ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/fact-3.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] (time 3174 ms)
ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/family-1.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 4740 ms)
Unexpected program output:
Expected result to match regular expression:
"A".*jim.*\n"B".*john.*\n"X".*david.*

but found:
Search results:

Solution 1:
Solution:K -->
A:Term |-> jim
B:Term |-> john
X:Term |-> david

Solution 2:
Solution:K -->
A:Term |-> nathan
B:Term |-> david
X:Term |-> jim

Solution 3:
Solution:K -->
A:Term |-> nathan
B:Term |-> david
X:Term |-> steve

Solution 4:
Solution:K -->
A:Term |-> nathan
B:Term |-> jim
X:Term |-> steve

Solution 5:
Solution:K -->
A:Term |-> nathan
B:Term |-> john
X:Term |-> david

Solution 6:
Solution:K -->
A:Term |-> nathan
B:Term |-> john
X:Term |-> jim

Solution 7:
Solution:K -->
A:Term |-> nathan
B:Term |-> john
X:Term |-> steve

Solution 8:
Solution:K -->
A:Term |-> steve
B:Term |-> david
X:Term |-> jim

Solution 9:
Solution:K -->
A:Term |-> steve
B:Term |-> john
X:Term |-> david

Solution 10:
Solution:K -->
A:Term |-> steve
B:Term |-> john
X:Term |-> jim


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-slow-palindromes-2.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3698 ms)
Unexpected program output:
Expected result to match regular expression:
"A" \|-> A\n"B" \|-> B\n"C" \|-> A

but found:
Search results:

Solution 1:
Solution:K -->
A:Term |-> C:Term
B:Term |-> B:Term
C:Term |-> C


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/reverse-slow-2.logik' '--search' '--bound' '1' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 4376 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"L" |-> cons ( c (  ), cons ( b (  ), cons ( a (  ), nil (  ) ) ) )\E

but found:
Search results:

Solution 1:
Solution:K -->
L:Term |-> cons ( c, cons ( b, cons (  a, nil  ) ) )


ERROR: ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/fact-5.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] output doesn't match with expected output (time: 3244 ms)
Unexpected program output:
Expected result to match regular expression:
\Q"X" |-> john (  )\E

but found:
Search results:

Solution 1:
Solution:K -->
X:Term |-> john


Done with ['/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/bin/krun' '/home/yilongli/Eclipse-Workspaces/sbtg-workspace/k/tutorial/2_languages/4_logik/basic/tests/append-5.logik' '--search' '--pattern' '<solution> Solution:K </solution>'] (time 2676 ms)
FAIL

FAIL (see details above)
----------------------------
Definitions kompiled: 1 (time: 0'8'' elapsed, 0'8'' CPU)
PDF posters kompiled: 0 (time: 0'0'' elapsed, 0'0'' CPU)
Programs krun: 24 (time: 0'44'' elapsed, 1'28'' CPU)
Total time: 0'52'' elapsed, 1'36'' CPU
----------------------------

```