Skip to main content
Log in

Semantic analysis of ambiguous types in dynamic languages

  • Original Research
  • Published:
Journal of Ambient Intelligence and Humanized Computing Aims and scope Submit manuscript

Abstract

The recent expansion of cloud-based solutions highlights that legacy programming languages and technologies, such as the PHP language, are still in heavy use. Furthermore, it turns out that for their effective integration into modern platforms, it is important to understand the legacy code base to provide modern analysis, testing and eventually compiler tooling. The dynamic language PHP would be the perfect candidate for such a synergy, due to its extensive usage, frequent issues in source codes and the need for a better performance and scalability. In this paper, we describe a solution that combines known static language code analysis techniques, and that is enhanced by numerous modifications. As a result, we have a design and implementation of a PHP dynamic language code analysis, compiler and runtime, which improves performance and allows for more advanced high-level code analysis and tools, all incorporated into the modern platform of .NET Core while taking advantage of the Microsoft Roslyn Compiler Platform.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

References

  • Bacon DF, Sweeney PF (1996) Fast static analysis of C + + virtual function calls. ACM Sigplan Not 31.10:324–341

    Article  Google Scholar 

  • Benda J, Matousek T, Prosek L (2006) Phalanger: Compiling and running PHP applications on the Microsoft .NET platform. .NET Technologies 2006, UNION Agency – Science Press, Plzen, Czech Republic

  • Cassales GW, Charão, AS, Kirsch-Pinheiro M, Souveyet C, Steffenel LA (2016) Improving the performance of Apache Hadoop on pervasive environments through context-aware scheduling. J Ambient Intell Humanized Comput 7(3):333–345

    Article  Google Scholar 

  • Consel C, Hornof L, Noël F, Noyé J, Volanschi EN (1996) A uniform approach for compile-time and run-time specialization. Partial evaluation. Springer, Berlin Heidelberg pp 54–72 (LNCS 1110)

    Google Scholar 

  • Darwish A, Hassanien AE, Elhoseny M, Sangaiah AK, Muhammad K (2017) The impact of the hybrid platform of internet of things and cloud computing on healthcare systems: opportunities, challenges, and open problems. J Ambient Intell Humaniz Comput. https://doi.org/10.1007/s12652-017-0659-1

    Google Scholar 

  • Del Sole A (2016) Roslyn Succintly, Syncfusion 2016

  • Detlefs D, Agesen O (1999) Inlining of virtual methods. In: ECOOP 1999 pp 258–278

  • Hauzar D, Kofron J (2015) Framework for static analysis of PHP applications. LIPIcs-Leibniz International Proceedings in Informatics. Vol 37

  • Ishizaki K, Kawahito M, Yasue T, Takeuchi M, Ogasawara T, Suganuma T, Onodera T, Komatsu H, Nakatani T (1999) Design, implementation, and evaluation of optimizations in a just-in-time compiler. In: Proceedings of the ACM 1999 conference on Java Grande. ACM

  • Jensen SH, Moller A, Thiemann P (2009) Type analysis for JavaScript. International Static Analysis Symposium. Springer, Berlin Heidelberg, pp 238–255

    Google Scholar 

  • Jones ND, Gomard CK, Sestoft P (1993) Partial evaluation and automatic program generation. Prentice Hall, Upper Saddle River

    MATH  Google Scholar 

  • Misek J, Fistein B (2017) http://www.peachpie.io, https://github.com/iolevel/peachpie. Accessed 15 Sept 2017

  • Misek J, Fistein B, Zavoral F (2016) Inferring common language infrastructure metadata for an ambiguous dynamic language type. IEEE Conference on Open Systems, Langkawi

  • Ng K, Warren M, Golde P, Hejlberg A (2011) The Roslyn Project, exposing the C# and VB compiler’s code analysis. Microsoft, 2011

  • Nielson F, Nielson HR, Hankin C (2015) Principles of program analysis. Springer

    MATH  Google Scholar 

  • PHP (2017) http://php.net/ Accessed 15 Sept 2017

  • Stogov D (2014) PHPNG a New Core for PHP7, ZendConf

  • Viega J, Bloch JT, Kohno T, McGraw G (2000) ITS4: A static vulnerability scanner for C and C++ code. Computer Security Applications, ACSAC’00. In: 16th Annual Conference. IEEE pp 257–267

  • WordPress (2017) http://wordpress.org/ Accessed 15 Sept 2017

Download references

Acknowledgements

This work was supported by Charles University Grant Agency (GAUK) project 1156216, project PROGRES Q48, and by Specific Research project SVV-2017-260451.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Filip Zavoral.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Misek, J., Zavoral, F. Semantic analysis of ambiguous types in dynamic languages. J Ambient Intell Human Comput 10, 2537–2544 (2019). https://doi.org/10.1007/s12652-018-0731-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12652-018-0731-5

Keywords

Navigation