Preview

Modeling and Analysis of Information Systems

Advanced search

C Language Extension to Support Procedural-Parametric Polymorphism

https://doi.org/10.18255/1818-1015-2023-1-40-62

Abstract

Software development is often about expanding functionality. To improve reliability in this case, it is necessary to minimize the change in previously written code. For instrumental support of the evolutionary development of programs, a procedural-parametric programming paradigm was proposed, which made it possible to increase the capabilities of the procedural approach. This allows to extend both data and functions painlessly. The paper considers the inclusion of procedural-parametric programming in the C language. Additional syntactic constructions are proposed to support the proposed approach. These constructions include: parametric generalizations, specializations of generalizations, generalizing functions, specialization handlers. Their semantics, possibilities and features of technical implementation are described. To check the possibilities of using this approach, models of procedural-parametric constructions in the C programming language were built. The example in the article demonstrates the flexible extension of the program and support of multiple polymorphism.

About the Authors

Alexander I. Legalov
Higher school of Economics, National research University
Russian Federation


Pavel V. Kosov
Higher school of Economics, National research University
Russian Federation


References

1. D. Shafer and D. A. Ritz, Practical Smalltalk. Using Smalltalk/V, Springer-Verlag. 1991, p. 233.

2. H. John, Advanced Guide to Python 3 Programming, Springer. 2019, p. 497.

3. M. Gregoire, Professional C++, John Wiley & Sons. 2018, p. 1122.

4. E. Sciore, Java Program Design, Apress Media. 2019, p. 1122.

5. J. Albahari and B. Albahari, C# 6.0 Pocket Reference: Instant Help for C# 6.0 Programmers, O’Reilly Media. 2016, p. 224.

6. A. Freeman, Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang, Apress. 2022, p. 1105.

7. J. Blandy, J. Orendorff, and L. F. S. Tindall, Programming Rust, O’Reilly Media. 2021, p. 735.

8. E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns. Elements of Reusable Object-Oriented Software, Addison-Wesley Professional. 1994, p. 416.

9. A. Alexandrescu, Modern C++ Design. Generic Programming and Design Patterns Applied., Addison-Wesley Professional. 2001, p. 360.

10. S. Meyers, More effective C++. 35 New Ways to Improve Your Programs and Designs, Addison-Wesley Professional. 1996, p. 318.

11. A. I. Legalov, “OOP, Multimethods and Pyramidal Evolution,” Open Systems, no. 3, pp. 41–45, 2002.

12. L. G. Demichiel, “Overview: The common lisp object system,” Lisp and Symbolic Computation, no. 1, pp. 227–244, 1989.

13. B. Stroustrup, Design and Evolution of C++, Addison-Wesley Professional. 1994, p. 480.

14. A. I. Legalov, Procedurally-parametric programming paradigm. Is it possible as alternative to the object-oriented style?, Dep. hands. Number 622-V00 Dep. VINITI 13.03.2000. 2000, p. 43.

15. I. A. Legalov, “Using of generalized records in procedural-parametric programming language,” Scientific Bulletin of the NSTU, vol. 28, no. 3, pp. 25–37, 2007.

16. A. I. Legalov and D. A. Schvetc, “Procedural language with support for evolutionary design,” Scientific Bulletin of the NSTU, vol. 15, no. 2, pp. 25–38, 2003.

17. A. I. Legalov and P. V. Kosov, “Evolutionary extension of programs using the procedural-parametric approach,” Computational Technologies, vol. 21, no. 3, pp. 56–69, 2016.

18. “Linux x86 Program Start Up or - How the heck do we get to main()? .” [Online]. Available: http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html.

19. “An example of an evolutionary extension of a program using a procedural-parametric approach.” [Online]. Available: https://github.com/kreofil/c-evolution-example.

20. A. I. Legalov, “Multimethods and paradigms,” Open Systems, no. 5, pp. 33–37, 2002.

21. “Clang: a C language family frontend for LLVM.” [Online]. Available: https://clang.llvm.org/.

22. “The LLVM Compiler Infrastructure.” [Online]. Available: https://llvm.org/.

23. “LibTooling.” [Online]. Available: https://clang.llvm.org/docs/LibTooling.html.


Review

For citations:


Legalov A.I., Kosov P.V. C Language Extension to Support Procedural-Parametric Polymorphism. Modeling and Analysis of Information Systems. 2023;30(1):40-62. (In Russ.) https://doi.org/10.18255/1818-1015-2023-1-40-62

Views: 543


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 1818-1015 (Print)
ISSN 2313-5417 (Online)