# HG changeset patch # User Christian Urban # Date 1573337093 0 # Node ID 7ea440e1ffbb6818726f0001615fff9d9d8a43ec # Parent 21b52310bd8bccd11498c08baf581d635706bbba updated diff -r 21b52310bd8b -r 7ea440e1ffbb cws/cw01.pdf Binary file cws/cw01.pdf has changed diff -r 21b52310bd8b -r 7ea440e1ffbb cws/cw01.tex --- a/cws/cw01.tex Wed Nov 06 00:36:45 2019 +0000 +++ b/cws/cw01.tex Sat Nov 09 22:04:53 2019 +0000 @@ -246,7 +246,7 @@ \begin{verbatim} List(List(Some(312.204773), Some(26.782711)), - List(Some(301.0466), Some(41.244694)), + List(Some(301.0466), Some(41.244694)), List(Some(331.462585), Some(51.464207)))) \end{verbatim}\hfill[1 Mark] diff -r 21b52310bd8b -r 7ea440e1ffbb testing4/re_test.sh --- a/testing4/re_test.sh Wed Nov 06 00:36:45 2019 +0000 +++ b/testing4/re_test.sh Sat Nov 09 22:04:53 2019 +0000 @@ -113,6 +113,10 @@ echo -e " simp(ONE | CHAR('a')) == (ONE | CHAR('a'))" >> $out echo -e " simp(ALT((CHAR('a') | ZERO) ~ ONE," >> $out echo -e " ((ONE | CHAR('b')) | CHAR('c')) ~ (CHAR('d') ~ ZERO))) == CHAR('a')" >> $out + echo -e " simp((ZERO | ((ZERO | ZERO) | (ZERO | ZERO))) ~ ((ONE | ZERO) | ONE ) ~ (CHAR('a'))) == ZERO" >> $out + echo -e " simp(ALT(ONE | ONE, ONE | ONE)) == ONE" >> $out + echo -e " simp(ALT(ZERO | CHAR('a'), CHAR('a') | ZERO)) == CHAR('a')" >> $out + echo -e " simp(ALT(ONE | CHAR('a'), CHAR('a') | ONE)) == ALT(ONE | CHAR('a'), CHAR('a') | ONE)" >> $out if (scala_assert "re.scala" "re_test3.scala") then echo -e " --> success" >> $out