Index: doc/theses/mike_brooks_MMath/programs/sharing-demo.cfa
===================================================================
--- doc/theses/mike_brooks_MMath/programs/sharing-demo.cfa	(revision 7611631c1ed3f861feb1c82089e4604ab0d74177)
+++ doc/theses/mike_brooks_MMath/programs/sharing-demo.cfa	(revision 06ffa958c2cbd678e3ccc85025b02513968da3d4)
@@ -11,7 +11,7 @@
 //	sout | "Consider two strings @s1@ and @s1a@ that are in an aliasing relationship, and a third, @s2@, made by a simple copy from @s1@.";
 
-	#define S1 string s1  = "abc"
-	#define S1A string s1a = s1`shareEdits
-	#define S2 string s2  = s1
+	#define S1 string s1 = "abc"
+	#define S1A string s1a = s1`share
+	#define S2 string s2 = s1a
 	S1;
 	S1A;
@@ -23,34 +23,34 @@
 	open( outfile, "build/sharing1.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{@{}llll@{}}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\";
-	outfile | xstr(S1) | "\t\\\\";
-	outfile | xstr(S1A) | "\t\\\\";
-	outfile | xstr(S2) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2;
-	outfile | "\\end{tabular}";
-	outfile | "\\end{cquote}";
-	close( outfile );
-
-//	sout | "Aliasing (@`shareEdits@) means that changes flow in both directions; with a simple copy, they do not.";
+	outfile | xstr(S1) | "\t& @\"" | s1 | "\"@\t\\\\";
+	outfile | xstr(S1A) | "\t& \t& @\"" | s1a | "\"@\t\\\\";
+	outfile | xstr(S2) | "\t& \t& \t& @\"" | s2 | "\"@";
+	outfile | "\\end{tabular}";
+	outfile | "\\end{cquote}";
+	close( outfile );
+
+//	sout | "Aliasing (@`share@) means that changes flow in both directions; with a simple copy, they do not.";
 	open( outfile, "build/sharing2.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{@{}llll@{}}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\";
-	outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
-
-	#define S1s1 s1 [1] = '+'
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
+
+	#define S1s1 s1[1] = '+'
 	S1s1;
 	assert( s1 == "a+c" );
-	outfile | xstr(S1s1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S1s1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S1As1 s1a[1] = '-'
 	S1As1;
 	assert( s1a == "a-c" );
-	outfile | xstr(S1As1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
-
-	#define S2s1 s2 [1] = '|'
+	outfile | xstr(S1As1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
+
+	#define S2s1 s2[1] = '|'
 	S2s1;
 	assert( s2 == "a|c" );
-	outfile | xstr(S2s1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2;
+	outfile | xstr(S2s1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -61,22 +61,22 @@
 	open( outfile, "build/sharing3.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{llll}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\";
-	outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S1qrs s1  = "qrs"
 	S1qrs;
 	assert( s1 == "qrs" );
-	outfile | xstr(S1qrs) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S1qrs) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S1Atuv s1a = "tuv"
 	S1Atuv;
 	assert( s1a == "tuv" );
-	outfile | xstr(S1Atuv) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S1Atuv) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S2wxy s2  = "wxy"
 	S2wxy;
 	assert( s2 == "wxy" );
-	outfile | xstr(S2wxy) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2;
+	outfile | xstr(S2wxy) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -87,7 +87,7 @@
 	open( outfile, "build/sharing4.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{llll}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\";
-	outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S1S2 s1  = s2
@@ -96,5 +96,5 @@
 	assert( s1a == "wxy" );
 	assert( s2 == "wxy" );
-	outfile | xstr(S1S2) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S1S2) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S1aaa s1  = "aaa"
@@ -103,5 +103,5 @@
 	assert( s1a == "aaa" );
 	assert( s2 == "wxy" );
-	outfile | xstr(S1aaa) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S1aaa) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S2S1 s2  = s1
@@ -110,5 +110,5 @@
 	assert( s1a == "aaa" );
 	assert( s2 == "aaa" );
-	outfile | xstr(S2S1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S2S1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S2bbb s2  = "bbb"
@@ -117,5 +117,5 @@
 	assert( s1a == "aaa" );
 	assert( s2 == "bbb" );
-	outfile | xstr(S2bbb) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S2bbb) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S2S1a s2  = s1a
@@ -124,5 +124,5 @@
 	assert( s1a == "aaa" );
 	assert( s2 == "aaa" );
-	outfile | xstr(S2S1a) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S2S1a) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S2ccc s2  = "ccc"
@@ -131,5 +131,5 @@
 	assert( s1a == "aaa" );
 	assert( s2 == "ccc" );
-	outfile | xstr(S2ccc) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S2ccc) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define S1xxx s1  = "xxx"
@@ -138,5 +138,5 @@
 	assert( s1a == "xxx" );
 	assert( s2 == "ccc" );
-	outfile | xstr(S1xxx) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(S1xxx) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -149,31 +149,31 @@
 	open( outfile, "build/sharing5.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{llll}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t& @s2@\t\\\\";
 
-	#define D2_s1_abcd string s1     = "abcd"
+	#define D2_s1_abcd string s1 = "abcd"
 	D2_s1_abcd;
-	outfile | xstr(D2_s1_abcd) | "\t\\\\";
-
-	#define D2_s1mid_s1 string s1_mid = s1(1,2)`shareEdits
+	outfile | xstr(D2_s1_abcd) | "\t& @\"" | s1 | "\"@\t\\\\";
+
+	#define D2_s1mid_s1 string s1_mid = s1(1,2)`share
 	D2_s1mid_s1;
-	outfile | xstr(D2_s1mid_s1) | "\t\\\\";
-
-	#define D2_s2_s1 string s2     = s1(1,2)
+	outfile | xstr(D2_s1mid_s1) | "\t& \t& @\"" | s1_mid | "\"@\t\\\\";
+
+	#define D2_s2_s1 string s2 = s1_mid(0,2)
 	D2_s2_s1;
 	assert( s1 == "abcd" );
 	assert( s1_mid == "bc" );
 	assert( s2 == "bc" );
-	outfile | xstr(D2_s2_s1) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
-	outfile | "\\end{tabular}";
-	outfile | "\\end{cquote}";
-	close( outfile );
-
-//	sout | "Again, @`shareEdits@ passes changes in both directions; copy does not.  Note the difference in index values, with the \\emph{b} position being 1 in the longer string and 0 in the shorter strings.  In the case of s1 aliasing with @s1_mid@, the very same character is being accessed by different postitions.";
+	outfile | xstr(D2_s2_s1) | "\t& \t& \t& @\"" | s2 | "\"@";
+	outfile | "\\end{tabular}";
+	outfile | "\\end{cquote}";
+	close( outfile );
+
+//	sout | "Again, @`share@ passes changes in both directions; copy does not.  Note the difference in index values, with the \\emph{b} position being 1 in the longer string and 0 in the shorter strings.  In the case of s1 aliasing with @s1_mid@, the very same character is being accessed by different postitions.";
 	open( outfile, "build/sharing6.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{llll}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t& @s2@\t\\\\";
-	outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define D2_s1_plus s1    [1] = '+'
@@ -182,5 +182,5 @@
 	assert( s1_mid == "+c" );
 	assert( s2 == "bc" );
-	outfile | xstr(D2_s1_plus) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(D2_s1_plus) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define D2_s1mid_minus s1_mid[0] = '-'
@@ -189,5 +189,5 @@
 	assert( s1_mid == "-c" );
 	assert( s2 == "bc" );
-	outfile | xstr(D2_s1mid_minus) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(D2_s1mid_minus) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define D2_s2_pipe s2    [0] = '|'
@@ -196,5 +196,5 @@
 	assert( s1_mid == "-c" );
 	assert( s2 == "|c" );
-	outfile | xstr(D2_s2_pipe) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(D2_s2_pipe) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -204,7 +204,7 @@
 	open( outfile, "build/sharing7.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{llll}";
+	outfile | "\\begin{tabular}{@{}rlll@{}}";
 	outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t& @s2@\t\\\\";
-	outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define D2_s1mid_ff s1_mid = "ff"
@@ -213,5 +213,5 @@
 	assert( s1_mid == "ff" );
 	assert( s2 == "|c" );
-	outfile | xstr(D2_s1mid_ff) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(D2_s1mid_ff) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\";
 
 	#define D2_s2_gg s2     = "gg"
@@ -220,5 +220,5 @@
 	assert( s1_mid == "ff" );
 	assert( s2 == "gg" );
-	outfile | xstr(D2_s2_gg) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";
+	outfile | xstr(D2_s2_gg) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -232,11 +232,11 @@
 	open( outfile, "build/sharing8.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{lll}";
+	outfile | "\\begin{tabular}{@{}rll@{}}";
 	outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t\\\\";
-	outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1_mid | "\t\\\\";
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\";
 
 	assert( s1 == "affd" );
 //	assert( s1_mid == "fc" );													 // ????????? bug?
-	outfile | xstr(D2_s2_gg) | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";
+//	outfile | xstr(D2_s2_gg) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\";
 
 	#define D2_s1mid_hhhh s1_mid = "hhhh"
@@ -244,5 +244,5 @@
 	assert( s1 == "ahhhhd" );
 	assert( s1_mid == "hhhh" );
-	outfile  | xstr(D2_s1mid_hhhh)  | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";
+	outfile  | xstr(D2_s1mid_hhhh)  | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\";
 
 	#define D2_s1mid_i s1_mid = "i"
@@ -250,5 +250,5 @@
 	assert( s1 == "aid" );
 	assert( s1_mid == "i" );
-	outfile  | xstr(D2_s1mid_i)  | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";
+	outfile  | xstr(D2_s1mid_i)  | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\";
 
 	#define D2_s1mid_empty s1_mid = ""
@@ -256,5 +256,5 @@
 	assert( s1 == "ad" );
 	// assert( s1_mid == "" );    ------ Should be so, but fails
-	outfile  | xstr(D2_s1mid_empty)  | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";
+	outfile  | xstr(D2_s1mid_empty)  | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\";
 
 	#define D2_s1mid_jj s1_mid = "jj"
@@ -262,5 +262,5 @@
 	assert( s1 == "ajjd" );
 	assert( s1_mid == "jj" );
-	outfile  | xstr(D2_s1mid_jj)  | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";
+	outfile  | xstr(D2_s1mid_jj)  | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -270,18 +270,19 @@
 	open( outfile, "build/sharing9.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{lllll}";
+	outfile | "\\begin{tabular}{@{}rllll@{}}";
 	outfile | "\t\t\t\t& @s1@\t& @s1_bgn@\t& @s1_mid@\t& @s1_end@\t\\\\";
-
-	#define D2_s1bgn_s1	string s1_bgn = s1(0, 1)`shareEdits
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& & @\"" | s1_mid | "\"@\t\\\\";
+
+	#define D2_s1bgn_s1	string s1_bgn = s1(0, 1)`share
 	D2_s1bgn_s1;
-	outfile  | xstr(D2_s1bgn_s1)  | "\t\\\\";
-
-	#define D2_s1end_s1 string s1_end = s1(3, 1)`shareEdits
+	outfile  | xstr(D2_s1bgn_s1)  | "\t& \t& @\"" | s1_bgn | "\"@\t\\\\";
+
+	#define D2_s1end_s1 string s1_end = s1(3, 1)`share
 	D2_s1end_s1;
+	outfile  | xstr(D2_s1end_s1)  | "\t& \t& \t& \t& @\"" | s1_end | "\"@\t\\\\";
 	assert( s1 == "ajjd" );
 	assert( s1_bgn == "a" );
 	assert( s1_mid == "jj" );
 	assert( s1_end == "d" );
-	outfile  | xstr(D2_s1end_s1)  | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";
 
 	#define D1_s1bgn_zzz s1_bgn = "zzzz"
@@ -291,5 +292,5 @@
 	assert( s1_mid == "jj" );
 	assert( s1_end == "d" );
-	outfile  | xstr(D1_s1bgn_zzz)  | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";
+	outfile  | xstr(D1_s1bgn_zzz)  | "\t& @\"" | s1 | "\"@\t& @\"" | s1_bgn | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s1_end | "\"@\t";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -299,8 +300,9 @@
 	open( outfile, "build/sharing10.tex" );
 	outfile | "\\begin{cquote}";
-	outfile | "\\begin{tabular}{llllll}";
+	outfile | "\\begin{tabular}{@{}rlllll@{}}";
 	outfile | "\t\t\t\t& @s1@\t& @s1_bgn@\t& @s1_crs@\t& @s1_mid@\t& @s1_end@\t\\\\";
-
-	#define D2_s1crs_s1 string s1_crs = s1(3, 2)`shareEdits
+	outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_bgn | "\"@\t& & @\"" | s1_mid | "\"@\t& @\"" | s1_end | "\"@\t\\\\";
+
+	#define D2_s1crs_s1 string s1_crs = s1(3, 2)`share
 	D2_s1crs_s1;
 	assert( s1 == "zzzzjjd" );
@@ -309,5 +311,5 @@
 	assert( s1_mid == "jj" );
 	assert( s1_end == "d" );
-	outfile  | xstr(D2_s1crs_s1)  | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_crs | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";
+	outfile  | xstr(D2_s1crs_s1)  | "\t& \t& \t& @\"" | s1_crs | "\"@\t\\\\";
 
 	#define D2_s1crs_ppp s1_crs = "+++"
@@ -318,5 +320,5 @@
 	assert( s1_mid == "j" );
 	assert( s1_end == "d" );
-	outfile  | xstr(D2_s1crs_ppp)  | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_crs | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";
+	outfile  | xstr(D2_s1crs_ppp)  | "\t& @\"" | s1 | "\"@\t& @\"" | s1_bgn | "\"@\t& @\"" | s1_crs | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s1_end | "\"@\t";
 	outfile | "\\end{tabular}";
 	outfile | "\\end{cquote}";
@@ -326,6 +328,6 @@
 
 	string word = "Phi";
-	string consonants = word(0,2)`shareEdits;
-	string miniscules = word(1,2)`shareEdits;
+	string consonants = word(0,2)`share;
+	string miniscules = word(1,2)`share;
 	assert( word == "Phi" );
 	assert( consonants == "Ph" );
@@ -340,7 +342,7 @@
 
 	string all = "They said hello again";
-	string greet     = all(10,5)`shareEdits;
-	string greet_bgn = all(10,1)`shareEdits;
-	string greet_end = all(14,1)`shareEdits;
+	string greet     = all(10,5)`share;
+	string greet_bgn = all(10,1)`share;
+	string greet_end = all(14,1)`share;
 
 	assert( all == "They said hello again" );
Index: doc/theses/mike_brooks_MMath/string.tex
===================================================================
--- doc/theses/mike_brooks_MMath/string.tex	(revision 7611631c1ed3f861feb1c82089e4604ab0d74177)
+++ doc/theses/mike_brooks_MMath/string.tex	(revision 06ffa958c2cbd678e3ccc85025b02513968da3d4)
@@ -9,5 +9,5 @@
 
 To prepare for the following discussion, comparisons among C, \CC, Java and \CFA strings are presented, beginning in \VRef[Figure]{f:StrApiCompare}.
-It provides a classic ``cheat sheet'' presentation, summarizing the names of the most common closely-equivalent operations.
+It provides a classic ``cheat sheet'' presentation, summarizing the names of the most-common closely-equivalent operations.
 The over-arching commonality is that operations work on groups of characters for assigning, copying, scanning, and updating.
 
@@ -39,5 +39,5 @@
 hence, most of its group operations are error prone and expensive.
 Most high-level string libraries use a separate length field and specialized storage management to implement group operations.
-Interestingly, \CC strings retain null termination just in case it is needed to interface with C library functions.
+Interestingly, \CC strings retain null termination in case it is needed to interface with C library functions.
 \begin{cfa}
 int open( @const char * pathname@, int flags );
@@ -52,5 +52,5 @@
 While \VRef[Figure]{f:StrApiCompare} emphasizes cross-language similarities, it elides many specific operational differences.
 For example, the @replace@ function selects a substring in the target and substitutes it with the source string, which can be smaller or larger than the substring.
-\CC performs the modification on the mutable receiver object.
+\CC performs the modification on the mutable receiver object
 \begin{cfa}
 string s1 = "abcde";
@@ -60,15 +60,22 @@
 \end{cfa}
 while Java allocates and returns a new string with the result, leaving the receiver unmodified.
+\label{p:JavaReplace}
 \begin{java}
 String s = "abcde";
 String r = s.replace( "cde", "xy" );  $\C[2.25in]{// replace by text, immutable}$
+System.out.println( s + ' ' + r );
+$\texttt{abcde abxy}$
+\end{java}
+% Generally, Java's @String@ type is immutable.
+Java provides a @StringBuffer@ near-analog that is mutable.
+\begin{java}
 StringBuffer sb = new StringBuffer( "abcde" );
-sb.replace( 2, 5, "xy" );  $\C{// replace by position, mutable}\CRT$
-System.out.println( s + ' ' + r + ' ' + sb );
-$\texttt{abcde abxy abxy}$
+sb.replace( 2, 5, "xy" );  $\C[2.25in]{// replace by position, mutable}\CRT$
+System.out.println( sb );
+$\texttt{abxy}$
 \end{java}
-Generally, Java's @String@ type is immutable.
-Java provides a @StringBuffer@ near-analog that is mutable, but the differences are significant; for example, @StringBuffer@'s @substring@ functions still return copies rather than mutable selections.
-Finally, the operations between these type are asymmetric, \eg @string@ has @replace@ by text but not replace by position and vice versa for @StringBuffer@.
+However, there are significant differences;
+\eg, @StringBuffer@'s @substring@ function returns a @String@ copy that is immutable.
+Finally, the operations between these type are asymmetric, \eg @String@ has @replace@ by text but not replace by position and vice versa for @StringBuffer@.
 
 More significant operational differences relate to storage management, often appearing through assignment (@target = source@), and are summarized in \VRef[Figure]{f:StrSemanticCompare}.
@@ -140,7 +147,7 @@
 $\texttt{\small abcde abcde abcde bcde cde}$
 \end{cfa}
-Note, all of these strings rely on the single null termination character at the end of @s@.
+Note, all of these aliased strings rely on the single null termination character at the end of @s@.
 The issue of symmetry does not apply to C strings because the value and pointer strings are essentially different types, and so this feature is scored as not applicable for C.
-With the type not managing the text buffer, there is no ownership question, \ie operations on @s1@ or @s2@ never leads to their memory becoming reusable.
+With the type not managing the text storage, there is no ownership question, \ie operations on @s1@ or @s2@ never leads to their memory becoming reusable.
 While @s3@ is a valid C-string that contains a proper substring of @s1@, the @s3@ technique does not constitute having a fragment referent because null termination implies the substring cannot be chosen arbitrarily; the technique works only for suffixes.
 
@@ -157,12 +164,12 @@
 \end{cfa}
 The lax symmetry reflects how the validity of @s1@ depends on the content and lifetime of @s@.
-It is common practice in \CC to use the @s1@-style pass by reference, with the understanding that the callee only use the referenced string for the duration of the call, \ie no side-effect using the parameter.
-So, when the called function is a constructor, it is typical to use an @s2@-style copy initialization to string-object-typed member.
+It is common practice in \CC to use the @s1@-style pass by reference, with the understanding that the callee only uses the referenced string for the duration of the call, \ie no side-effect using the parameter.
+So, when the called function is a constructor, it is typical to use an @s2@-style copy-initialization to string-object-typed member.
 Exceptions to this pattern are possible, but require the programmer to assure safety where the type system does not.
-The @s3@ initialization is constrained to copy the substring because @c_str@ always provides a null-terminated character, which is different from source string.
+The @s3@ initialization is constrained to copy the substring because @c_str@ always provides a null-terminated character, which may be different from the source string.
 @s3@ assignment could be fast by reference counting the text area and using copy-on-write, but would require an implementation upgrade.
 
 In Java, @String@ also offers a high-level abstraction:
-\begin{cfa}
+\begin{java}
 String s = "abcde";
 String s1 = s;  $\C[2.25in]{// snapshot state, strict symmetry, variable-constrained referent}$
@@ -173,5 +180,5 @@
 $\texttt{\small abcde abcde bc c}$
 $\texttt{\small true false false}$
-\end{cfa}
+\end{java}
 Note, @substring@ takes a start and end position, rather than a start position and length.
 Here, facts about Java's implicit pointers and pointer equality can over complicate the picture, and so are ignored.
@@ -180,15 +187,17 @@
 With @s2@, the case for fast-copy is more subtle.
 Certainly, its value is not pointer-equal to @s@, implying at least a further allocation.
-TODO: finish the fast-copy case.
-Java's immutable strings mean aliasing is impossible with the @String@ type.
-Java's @StringBuffer@ provides aliasing, though without supporting symmetric treatment of a fragment referent; as a result, @StringBuffer@ scores as \CC.
-The easy symmetry that the Java string enjoys is aided by Java's garbage collection; Java's @s2@ is doing effectively the operation of \CC's @s2@, though without the consequence to of complicating memory management.
-
-Finally, In \CFA, @string@ also offers a high-level abstraction:
+\PAB{TODO: finish the fast-copy case.}
+Java does not meet the aliasing requirement because immutability make it impossible to modify.
+Java's @StringBuffer@ provides aliasing (see @replace@ example on \VPageref{p:JavaReplace}), though without supporting symmetric treatment of a fragment referent, \eg @substring@ of a @StringBuffer@ is a @String@;
+as a result, @StringBuffer@ scores as \CC.
+The easy symmetry that the Java string enjoys is aided by Java's garbage collection; Java's @s2@ is doing effectively the operation of \CC's @s3@, though without the consequence of complicating memory management.
+\PAB{What complex storage management is going on here?}
+
+Finally, in \CFA, @string@ also offers a high-level abstraction:
 \begin{cfa}
 string s = "abcde";
 string & s1 = s; $\C[2.25in]{// alias state, strict symmetry, variable-constrained referent}$
 string s2 = s; $\C{// snapshot state, strict symmetry, variable-constrained referent}$
-string s3 = s`shareEdits; $\C{// alias state, strict symmetry, variable-constrained referent}\CRT$
+string s3 = s`share; $\C{// alias state, strict symmetry, variable-constrained referent}\CRT$
 string s4 = s( 1, 2 );
 string s5 = s4( 1, 1 );
@@ -198,15 +207,17 @@
 % all helpful criteria of \VRef[Figure]{f:StrSemanticCompare} are satisfied.
 The \CFA string manages storage, handles all assignments, including those of fragment referents with fast initialization, provides the choice between snapshot and alias semantics, and does so symmetrically with one type (which assures text validity according to the lifecycles of the string variables).
-With aliasing, the intuition is that each string is an editor on an open shared document.
-With fragment aliasing, the intuition is that these editor views have been scrolled or zoomed to overlapping, but potentially different, ranges.
+The intended metaphor for \CFA stings is similar to a GUI text-editor or web browser.
+Select a consecutive block of text using the mouse generates an aliased substring in the file/dialog-box.
+Typing into the selected area is like assigning to an aliased substring, where the highlighted text is replaced with more or less text;
+depending on the text entered, the file/dialog-box content grows or shrinks.
+\PAB{Need to discuss the example, as for the other languages.}
 
 The remainder of this chapter explains how the \CFA string achieves this usage style.
 
 
-
 \section{Storage Management}
 
 This section discusses issues related to storage management of strings.
-Specifically, it is common for strings to logically overlap completely or partially.
+Specifically, it is common for strings to logically overlap partially or completely.
 \begin{cfa}
 string s1 = "abcdef";
@@ -218,64 +229,56 @@
 s3[1] = 'w'; $\C{// what happens to s1 and s2?}$
 \end{cfa}
-This question is the notion of mutable or immutable strings.
-For example, Java has immutable strings that are copied when any overlapping string changes.
-Note, the notion of underlying string mutability is not specified by @const@, \eg:
+which is restricted by a string's mutable or immutable property.
+For example, Java's immutable strings require copy-on-write when any overlapping string changes.
+Note, the notion of underlying string mutability is not specified by @const@; \eg in \CC:
 \begin{cfa}
 const string s1 = "abc";
 \end{cfa}
-Here, @const@ applies to the @s1@ pointer to @"abc"@, and @"abc"@ is an immutable constant that is \emph{copied} into the string's storage.
-Hence, @s1@ is not pointing at an immutable constant, meaning its underlying string is always mutable, unless some other designation is specified, such as Java's global rule.
+the @const@ applies to the @s1@ pointer to @"abc"@, and @"abc"@ is an immutable constant that is \emph{copied} into the string's storage.
+Hence, @s1@ is not pointing at an immutable constant, meaning its underlying string can be mutable, unless some other designation is specified, such as Java's global immutable rule.
 
 
 \subsection{Logical overlap}
 
-\CFA provides a dynamic mechanism to indicate mutable or immutable as an assignment attribute: @`shareEdits@.
-
-Consider two strings @s1@ and @s1a@ that are in an aliasing relationship, and a third, @s2@, made by a simple copy from @s1@.
-Aliasing (@`shareEdits@) means that changes flow in both directions; with a simple copy, they do not.
+\CFA provides a dynamic mechanism to indicate mutable or immutable using the attribute @`share@.
+This aliasing relationship is a sticky-property established at initialization.
+For example, here strings @s1@ and @s1a@ are in an aliasing relationship, while @s2@ is in a copy relationship.
 \input{sharing1.tex}
-
-Aliasing (@`shareEdits@) means that changes flow in both directions; with a simple copy, they do not.
+Here, the aliasing (@`share@) causes partial changes (subscripting) to flow in both directions.
 \input{sharing2.tex}
-
-Assignment of a value is just a modification.
-The aliasing relationship is established at construction and is unaffected by assignment of a value.
+Similarly for complete changes.
 \input{sharing3.tex}
 
-Assignment from a string is just assignment of a value.
-Whether of not the RHS participates in aliasing is irrelevant.  Any aliasing of the LHS is unaffected.
+Because string assignment copies the value, RHS aliasing is irrelevant.
+Hence, aliasing of the LHS is unaffected.
 \input{sharing4.tex}
 
-Consider new strings @s1_mid@ being an alias for a run in the middle of @s1@, along with @s2@, made by a simple copy from the middle of @s1@.
+Now, consider string @s1_mid@ being an alias in the middle of @s1@, along with @s2@, made by a simple copy from the middle of @s1@.
 \input{sharing5.tex}
-
-Again, @`shareEdits@ passes changes in both directions; copy does not.
-Note the difference in index values, with the \emph{b} position being 1 in the longer string and 0 in the shorter strings.
-In the case of s1 aliasing with @s1_mid@, the very same character is being accessed by different positions.
+Again, @`share@ passes changes in both directions; copy does not.
+As a result, the index values for the position of @b@ are 1 in the longer string @"abcd"@ and 0 in the shorter aliased string @"bc"@.
+This alternate positioning also applies to subscripting.
 \input{sharing6.tex}
 
-Once again, assignment of a value is a modification that flows through the aliasing relationship, without affecting its structure.
+Finally, assignment flows through the aliasing relationship without affecting its structure.
 \input{sharing7.tex}
-
-In the \emph{ff} step, which is a positive example of flow across an aliasing relationship, the result is straightforward to accept because the flow direction is from contained (small) to containing (large).
-The following rules for edits through aliasing substrings will guide how to flow in the opposite direction.
-
-Growth and shrinkage are natural extensions.
-An empty substring is a real thing, at a well-defined location, whose meaning is extrapolated from the examples so far.
-The intended metaphor is to operating a GUI text editor.
-Having an aliasing substring is like using the mouse to select a few words.
-Assigning onto an aliasing substring is like typing from having a few words selected: depending how much you type, the file being edited can get shorter or longer.
+In the @"ff"@ assignment, the result is straightforward to accept because the flow direction is from contained (small) to containing (large).
+The following rules explain aliasing substrings that flow in the opposite direction, large to small.
+
+Growth and shrinkage are natural extensions, as for the text-editor example mentioned earlier, where an empty substring is as real real as an empty string.
 \input{sharing8.tex}
 
-Multiple portions can be aliased.
-When there are several aliasing substrings at once, the text editor analogy becomes an online multi-user editor.
-I should be able to edit a paragraph in one place (changing the document's length), without my edits affecting which letters are within a mouse-selection that you had made previously, somewhere else.
+Multiple portions of a string can be aliased.
+% When there are several aliasing substrings at once, the text editor analogy becomes an online multi-user editor.
+%I should be able to edit a paragraph in one place (changing the document's length), without my edits affecting which letters are within a mouse-selection that you had made previously, somewhere else.
 \input{sharing9.tex}
-
-When an edit happens on an aliasing substring that overlaps another, an effect is unavoidable.
-Here, the passive party sees its selection shortened, to exclude the characters that were not part of the original selection.
+When @s1_bgn@'s size increases by 3, @s1_mid@'s starting location moves from 1 to 4 and @s1_end@'s from 3 to 6,
+
+When changes happens on an aliasing substring that overlap.
 \input{sharing10.tex}
-
-TODO: finish typesetting the demo
+Strings @s1_crs@ and @s1_mid@ overlap at character 4, @j@ because the substrings are 3,2 and 4,2.
+When @s1_crs@'s size increases by 1, @s1_mid@'s starting location moves from 4 to 5, but the overlaping character remains, changing to @'+'@.
+
+\PAB{TODO: finish typesetting the demo}
 
 %\input{sharing-demo.tex}
