Abstract
This article explores the application of the conceptual framework of communicative grammar to the analysis of the Pascal programming language. Its aim is to provide a preliminary assessment of the usefulness of the theory’s three-level model for describing a programming language and to identify selected similarities and differences between source code and natural language. The material comprises representative syntactic and semantic constructions in Pascal, subjected to qualitative analysis at the ideational, interactional, and discourse-organisation levels. The analysis demonstrates that, at the ideational level, meaning is organised primarily through predicate–argument structures: procedures, functions, and certain operators act as predicates, while variables, constants, and expressions function as arguments. Data types determine the status of entities and the range of permissible operations. At the interactional level, Pascal instructions can be interpreted as formalised counterparts of directive speech acts addressed to the machine and executed either unconditionally or upon the fulfilment of specified logical conditions. The discourse-organisation level is manifested in elements that delimit and structure code, including instruction blocks, declaration sections, and procedure and function definitions. The findings suggest that communicative grammar may provide a useful framework for describing Pascal as a specific form of human–machine communication. However, further research is required to establish whether this model can be applied to other programming languages.
References
- Allamanis M., Barr E.T., Devanbu P., Sutton C. (2019), A survey of machine learning for big code and naturalness, „ACM Computing Surveys”, vol. 51(4), s. 1–37, https://doi.org/10.1145/3212695 [Google Scholar]
- Awdiejew A., Habrajska G. (2004), Wprowadzenie do gramatyki komunikacyjnej, t. 1, Łask: Oficyna Wydawnicza Leksem. [Google Scholar]
- Casalnuovo C., Sagae K., Devanbu P. (2018), Studying the difference between natural and programming language corpora, „Empirical Software Engineering”, vol. 24, s. 1823–1868, https://doi.org/10.48550/arXiv.1806.02437 [Google Scholar]
- Dubochet G. (2009), Computer code as a medium for human communication: Are programming languages improving?, [w:] Proceedings of the 21st Annual Workshop of the Psychology of Programming Interest Group (PPIG), Limerick: University of Limerick. [Google Scholar]
- Fedorenko E., Ivanova A., Dhamala R., Bers M.U. (2019), The language of programming: A cognitive perspective, „Trends in Cognitive Sciences”, vol. 23(7), s. 525–528, https://doi.org/10.1016/j.tics.2019.04.010 [Google Scholar]
- Gazoni R.M. (2018), A semiotic analysis of programming languages, „Journal of Computer and Communications”, vol. 6, s. 91–101, https://doi.org/10.4236/jcc.2018.63007 [Google Scholar]
- Gordon C.S. (2024), The linguistics of programming, [w:] Proceedings of the 2024 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward! ’24), New York: ACM, s. 162–182, https://doi.org/10.1145/3689492.3689806 [Google Scholar]
- Hindle A., Barr E.T., Gabel M., Su Z., Devanbu P. (2016), On the naturalness of software, „Communications of the ACM”, vol. 59(5), s. 122–131, https://doi.org/10.1145/2902362 [Google Scholar]
- Rahit K.M.T.H., Nabil R.H., Huq M.H. (2019), Machine translation from natural language to code using Long-Short Term Memory, [w:] Proceedings of the Future Technologies Conference (FTC) 2019. Advances in Intelligent Systems and Computing, vol. 1069, Cham: Springer, s. 56–63, https://doi.org/10.48550/arXiv.1910.11471 [Google Scholar]
- Sawicki B., Śmiałek M., Skowron B. (2024), Towards the ultimate programming language: Trust and benevolence in the age of artificial intelligence, arXiv:2412.00206, https://doi.org/10.48550/arXiv.2412.00206 [Google Scholar]
- Scott M.L. (2006), Programming language pragmatics, San Francisco: Elsevier. [Google Scholar]
- Skrzypiec A. (2024), Płaszczyzny interakcji między człowiekiem a maszyną: Zarys problematyki z perspektywy nauki o komunikacji społecznej, „Człowiek i Społeczeństwo”, t. 58, s. 149–164. [Google Scholar]
Downloads
Download data is not yet available.