Index: doc/theses/fangren_yu_MMath/intro.tex
===================================================================
--- doc/theses/fangren_yu_MMath/intro.tex	(revision 3e5e32cfbbd281d3366f00338f63eb2bfb890578)
+++ doc/theses/fangren_yu_MMath/intro.tex	(revision 4d5c5b6a1106351e8a23f40b350a8f3f1c63bb0a)
@@ -185,4 +185,6 @@
 \centering
 
+% https://doc.rust-lang.org/rust-by-example/trait/impl_trait.html
+% https://dl.acm.org/doi/10.1145/75277.75283
 
 \begin{minipage}{0.75\textwidth}
@@ -191,10 +193,10 @@
 \hline
 Oper./Func./Meth. name	& O\footnote{except assignment}/F	& O/F/M	& O/F	& M	& O/M	& O/F/M	\\
-\# of parameters		& yes	& yes	& yes	& yes	& yes	& yes	\\
+parameter number		& yes	& yes	& yes	& yes	& yes	& yes	\\
 parameter types			& yes	& yes	& yes	& yes	& yes	& yes	\\
-parameter Order/Name	& O/N	& O		& O		& O		& O/N	& O/N	\\
+parameter name			& no	& no	& no	& no	& yes	& yes	\\
 return type				& yes	& no	& yes	& no	& no	& yes	\\
-Safe/Unsafe arg. conv.	& 		& yes\footnote{no conversions allowed during template parameter deduction}	& S/U	& S\footnote{unsafe (narrowing) conversion only allowed in assignment or initialization to a primitive variable}	& S		& no\footnote{literals only, Int -> Double (Safe)}	\\
-generic					& 		& yes\footnote{compile-time only, using template expansion}	& yes	& yes	& yes	& yes
+Safe/Unsafe arg. conv.	& none	& yes\footnote{no conversions allowed during template parameter deduction}	& S/U	& S\footnote{unsafe (narrowing) conversion only allowed in assignment or initialization to a primitive variable}	& S		& no\footnote{literals only, Int -> Double (Safe)}	\\
+generic					& no		& yes\footnote{compile-time only, using template expansion}	& yes	& yes	& yes	& yes
 \end{tabular}
 \end{minipage}
Index: doc/theses/fangren_yu_MMath/test.adb
===================================================================
--- doc/theses/fangren_yu_MMath/test.adb	(revision 4d5c5b6a1106351e8a23f40b350a8f3f1c63bb0a)
+++ doc/theses/fangren_yu_MMath/test.adb	(revision 4d5c5b6a1106351e8a23f40b350a8f3f1c63bb0a)
@@ -0,0 +1,81 @@
+with Ada.Text_IO; use Ada.Text_IO;
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+
+procedure test is
+	Function Random return Integer is begin return 3; end;
+	Function Random return Float is begin return 3.5; end;
+	Function Random return Unbounded_String is begin return To_Unbounded_String( "abc" ); end;
+	
+	Procedure Print( V : Integer ) is begin Put_Line( Integer'Image(V) ); end;
+	Procedure Print( V : Float ) is begin Put_Line( Float'Image(V) ); end;
+	Procedure Print( V : Unbounded_String ) is begin Put_Line( Ada.Strings.Unbounded.To_String(V) ); end;
+	
+	Function Func( V : Integer ) return Integer is begin return V; end;
+	Function Func( V : Float ) return Float is begin return V; end;
+	Function Func( V : Unbounded_String ) return Unbounded_String is begin return V; end;
+	Function Func( V1 : Integer; V2 : Float ) return Float is begin return Float(V1) + V2; end;
+	
+	Function "-"( L : Integer; R : Integer ) return Integer is begin return 3; end;
+	
+	i : Integer;
+	f : Float;
+	s : Unbounded_String;
+	
+	Type Complex is
+        record
+            Re, Im : Float;
+        end record;
+    Procedure Grind (X : Complex) is begin Put_Line( "Grind1" ); end;
+    Procedure Grind (X : Unbounded_String) is begin Put_Line( "Grind2" ); end;
+	c : Complex;
+	
+	generic
+	   type T is private;
+	   with function "+"( X, Y: T ) return T;
+	function twice(X : T) return T;
+	
+	function twice( X: T ) return T is
+	begin
+	   Put_Line( "XXX" ); return X + X;   -- The formal operator "*".
+	end twice;
+	
+	generic
+	   type T is private;
+	   with function "+"( X, Y: T ) return T;
+	function twice( X : T; Y : T ) return T;
+	
+	-- generic units cannot be overloaded
+	function twice( X: T; Y : T ) return T is
+	begin
+	   Put_Line( "XXX" ); return X + X;   -- The formal operator "*".
+	end twice;
+
+	function Int_Twice is new Twice( Integer, "+" => "+" );
+	function float_Twice is new Twice( float, "+" => "+" );
+begin
+	i := Random;
+   	Print( i );
+	f := Random;
+   	Print( f );
+	s := Random;
+   	Print( s );
+	
+   	Print( Func( 7 ) );
+   	Print( Func( 7.5 ) );
+   	Print( Func( To_Unbounded_String( "abc" ) ) );
+   	Print( Func( 3, 3.5 ) );
+	
+	Grind( X => (Re => 1.0, Im => 1.0) );
+	Grind( c );
+	Grind( To_Unbounded_String( "abc" ) );
+	
+	i := Int_Twice( 2 );
+	Put_Line( Integer'Image(i) );
+	f := float_Twice( 2.5 );
+   	Print( f );
+end test;
+
+-- Local Variables: --
+-- tab-width: 4 --
+-- compile-command: "gnatmake test.adb" --
+-- End: --
Index: doc/theses/fangren_yu_MMath/test.swift
===================================================================
--- doc/theses/fangren_yu_MMath/test.swift	(revision 4d5c5b6a1106351e8a23f40b350a8f3f1c63bb0a)
+++ doc/theses/fangren_yu_MMath/test.swift	(revision 4d5c5b6a1106351e8a23f40b350a8f3f1c63bb0a)
@@ -0,0 +1,37 @@
+// overloading on return type
+func random() -> Int{ 3; }
+func random() -> String{ "abc"; }
+func random() -> Double{ 3.5; }
+var r1 : Int = random();
+print( r1 );
+var r2 : String = random();
+print( r2 );
+var r3 : Double = random();
+print( r3 );
+
+// overloading functions without parameter names
+func fun( _ x : Int ) -> Int{ 3; }
+func fun( _ x : Int, _ y : Int ) -> Int{ x + y; }
+func fun( _ x : String ) -> String{ "abc"; }
+print( fun( 3, 4 ) );
+// print( fun( 3.5 ) ); // no Double -> Int
+//print( fun( r3 ) ); // no, Double -> Int
+
+// overloading on parameter name
+func foo( x : Int ) -> Int{ 3; }
+func foo( y : Int ) -> Int{ 3; }
+print( foo( x : 3 ) );
+print( foo( y : 3 ) );
+
+// overloading on generics
+func bar<T>( _ a : T ) { print( "bar1", a ); }
+func bar<T>( _ a : T, _ b : T ) { print( "bar2", a, b ); }
+func bar<T,U>( _ a : T, _ b :  U) { print( "bar3", a, b ); }
+bar( 3 );
+bar( 3.5 );
+bar( 2, 2 );
+bar( 2, 2.5 );
+
+// Local Variables: //
+// compile-command: "swift test.swift" //
+// End: //
