Formal Analysis of Overloaded Subprogram Resolution Rules: Ambiguity, Coercion, and Default Parameters in C++, Java, C#, and Ada
  • Author(s): Aibuki Adeyinka; Owolabi Hammed; Ogozi Confidence; Adewole Philips
  • Paper ID: 1717077
  • Page: 3673-3678
  • Published Date: 01-05-2026
  • Published In: Iconic Research And Engineering Journals
  • Publisher: IRE Journals
  • e-ISSN: 2456-8880
  • Volume/Issue: Volume 9 Issue 10 April-2026
Abstract

A simple feature in the design of a statically typed programming language is subprogram overloading: the same identifier can have a variety of implementations in which the arguments have different types. But when implicit type coercion and default parameters are used in conjunction with overloading, the resolution is much more complicated and may result in ambiguities not automatically resolved by the compiler. This paper provides a formal comparative study of overloaded subprogram resolution in four popular languages: C++, Java, C# and Ada. It compares the language-specific mechanisms such as conversion-rank hierarchy in C++, three-phase method invocation procedure in Java, optional parameter and user-defined conversion rules in C#, and top-down expected-type propagation in Ada . The paper shows that none of the four languages can ensure SNA when implicit coercions of equal rank interact with overloaded candidates at the same time, and suggests design principles such as total-order ranking function and default-conscious candidate selection, which would restore SNA in such situations.

Keywords

Overload Resolution, Type Coercion, Ambiguity, Default Parameters, C++, Java, C#, Ada

Citations

IRE Journals:
Aibuki Adeyinka, Owolabi Hammed, Ogozi Confidence, Adewole Philips "Formal Analysis of Overloaded Subprogram Resolution Rules: Ambiguity, Coercion, and Default Parameters in C++, Java, C#, and Ada" Iconic Research And Engineering Journals Volume 9 Issue 10 2026 Page 3673-3678 https://doi.org/10.64388/IREV9I10-1717077

IEEE:
Aibuki Adeyinka, Owolabi Hammed, Ogozi Confidence, Adewole Philips "Formal Analysis of Overloaded Subprogram Resolution Rules: Ambiguity, Coercion, and Default Parameters in C++, Java, C#, and Ada" Iconic Research And Engineering Journals, 9(10) https://doi.org/10.64388/IREV9I10-1717077