Skip to main content

The Modeling of a Programming Language Syntax Based on Positional Entropy

  • Conference paper
  • First Online:
Computer Information Systems and Industrial Management (CISIM 2019)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 11703))

  • 786 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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)

    Google Scholar 

  2. Shannon, C.E.: A mathematical theory of communication. Bell Syst. Techn. J. 27, 379–423, 623–653 (1948)

    Article  MathSciNet  Google Scholar 

  3. Bernstein, E., Vazirani, U.: Quantum complexity theory. SIAM J. Comput. 26(5), 1411–1473 (1997)

    Article  MathSciNet  Google Scholar 

  4. MacKay, D.: Heapsort, Quicksort, and Entropy (2005)

    Google Scholar 

  5. Jost, L.: Entropy and diversity. Oikos 113, 363–375 (2006)

    Article  Google Scholar 

  6. Michaelides, E.E.: Entropy, order and disorder. Open Thermodyn. J. 2, 7–11 (2008)

    Article  Google Scholar 

  7. Cholewa, M.: The readability model for natural and artificial languages. J. Med. Inf. Technol. 27, 21–28 (2018)

    Google Scholar 

  8. Adami, C.: What is complexity? BioEssays 24(12), 1085–1094 (2002)

    Article  Google Scholar 

  9. Adami, C., Cerf, N.J.: Physical complexity of symbolic sequences. Physica D 137(1–2), 62–69 (2000)

    Article  MathSciNet  Google Scholar 

  10. Chaitin, G.J.: Algorithmic information theory. IBM J. Res. Dev. 21(4), 350–359 (1977)

    Article  MathSciNet  Google Scholar 

  11. Von Neumann, J., Burks, A.W. (eds.): Theory of Self-Reproducing Automata. University of Illinois Press, Champaign (1966)

    Google Scholar 

  12. Spolsky, J.: User Interface Design for Programmers. Apress, Berkeley (2006)

    MATH  Google Scholar 

  13. Simpson, E.H.: Measurement of diversity. Nature 163, 688 (1949)

    Article  Google Scholar 

  14. Hoare, C.A.R.: Quicksort. Comput. J. 5(1), 10–15 (1962)

    Article  MathSciNet  Google Scholar 

  15. Von Neumann, J.: Zur Theorie der Gesellschaftsspiele. Math. Ann. 100(1), 295–320 (1928)

    Article  MathSciNet  Google Scholar 

  16. Rivest, R., Shamir, A., Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 21(2), 120–126 (1978)

    Article  MathSciNet  Google Scholar 

  17. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software, p. 99. Addison-Wesley, Boston (1994)

    Google Scholar 

  18. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)

    Article  MathSciNet  Google Scholar 

  19. Kuncir, G.F.: Algorithm 103: Simpson’s rule integrator. Commun. ACM 5(6), 347 (1962)

    Article  Google Scholar 

  20. 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

    Chapter  Google Scholar 

  21. Welch, T.A.: A technique for high-performance data compression. Computer 17(6), 8–19 (1984)

    Article  Google Scholar 

  22. Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in C++, p. 513. Cambridge University Press, Cambridge (1992)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marcin Cholewa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics