Abstract
This paper presents the method of modeling the syntax of a programming language that can be used to design a new language. The purpose of this method is to create a syntax adapted to faster implementation and to embrace a larger class of algorithms. The method can also improve the readability of the source code by programmer. The article also presents the new interpretation of the concept of entropy and complexity, which is applicable in computer science. In experiments many examples of source codes were used, for which the complexity was examined, and then the syntax was optimized according to preset syntactic features (e.g. number of tokens or lines, characteristic tokens, length of tokens etc.). The source code comes down to a structure for which the complexity of its subpart can be explored. Some subparts are modified by reducing or increasing complexity. At the stage of modifying the code the syntactic features determine the change in complexity. The optimization was multi-stage and partly performed by human, to check at each stage whether the modified code obtained the expected syntactic structure. The proposed method is universal and suitable for modeling a new syntax based on existing and modern imperative languages. During syntax modeling, only the syntactical structure of the algorithm changes, not what the algorithm has to do. With an appropriate choice of syntactic features, a completely new language can be designed.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Clausius, R., Hirst, T.A.: The Mechanical Theory of Heat: With Its Applications to the Steam-engine and to the Physical Properties of Bodies. John Van Voorst, London (1867)
Shannon, C.E.: A mathematical theory of communication. Bell Syst. Techn. J. 27, 379–423, 623–653 (1948)
Bernstein, E., Vazirani, U.: Quantum complexity theory. SIAM J. Comput. 26(5), 1411–1473 (1997)
MacKay, D.: Heapsort, Quicksort, and Entropy (2005)
Jost, L.: Entropy and diversity. Oikos 113, 363–375 (2006)
Michaelides, E.E.: Entropy, order and disorder. Open Thermodyn. J. 2, 7–11 (2008)
Cholewa, M.: The readability model for natural and artificial languages. J. Med. Inf. Technol. 27, 21–28 (2018)
Adami, C.: What is complexity? BioEssays 24(12), 1085–1094 (2002)
Adami, C., Cerf, N.J.: Physical complexity of symbolic sequences. Physica D 137(1–2), 62–69 (2000)
Chaitin, G.J.: Algorithmic information theory. IBM J. Res. Dev. 21(4), 350–359 (1977)
Von Neumann, J., Burks, A.W. (eds.): Theory of Self-Reproducing Automata. University of Illinois Press, Champaign (1966)
Spolsky, J.: User Interface Design for Programmers. Apress, Berkeley (2006)
Simpson, E.H.: Measurement of diversity. Nature 163, 688 (1949)
Hoare, C.A.R.: Quicksort. Comput. J. 5(1), 10–15 (1962)
Von Neumann, J.: Zur Theorie der Gesellschaftsspiele. Math. Ann. 100(1), 295–320 (1928)
Rivest, R., Shamir, A., Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 21(2), 120–126 (1978)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software, p. 99. Addison-Wesley, Boston (1994)
Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)
Kuncir, G.F.: Algorithm 103: Simpson’s rule integrator. Commun. ACM 5(6), 347 (1962)
Bodrato, M.: Towards optimal toom-cook multiplication for univariate and multivariate polynomials in characteristic 2 and 0. In: Carlet, C., Sunar, B. (eds.) WAIFI 2007. LNCS, vol. 4547, pp. 116–133. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73074-3_10
Welch, T.A.: A technique for high-performance data compression. Computer 17(6), 8–19 (1984)
Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in C++, p. 513. Cambridge University Press, Cambridge (1992)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Cholewa, M. (2019). The Modeling of a Programming Language Syntax Based on Positional Entropy. In: Saeed, K., Chaki, R., Janev, V. (eds) Computer Information Systems and Industrial Management. CISIM 2019. Lecture Notes in Computer Science(), vol 11703. Springer, Cham. https://doi.org/10.1007/978-3-030-28957-7_33
Download citation
DOI: https://doi.org/10.1007/978-3-030-28957-7_33
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-28956-0
Online ISBN: 978-3-030-28957-7
eBook Packages: Computer ScienceComputer Science (R0)