Static analysis of .NET programs using rewriting rules

T.A. Mamedov, А.Yu. Doroshenko, R.S. Shevchenko

Abstract


A software tool that finds problems of resource consumption in case of work with files using rewriting rules was implemented. To reach the goal, the TermWare system, which could be embedded into those systems running on JVM, was used. In order to work with C#-programs, the special plugin for TermWare, which helps to generate appropriate terms from source code, was developed. The plugin uses the Roslyn compiler, which allows users to find syntax errors in programs and focus on the primary task of generating terms from source code. Also, a practical application based on TermWare system – a static analyzer that finds problems with open-close files, was described in the article.

Problems in programming 2020; 2-3: 157-163


Keywords


analysis of resource consumption; terms generator; rewriting rules; TermWare

References


Dershowitz N., Jouannaud J.-P. (1990). Jan van Leeuwen (ed.). Rewrite Systems. Handbook of Theoretical Computer Science. B. Elsevier. P. 243-320. CrossRef

Winkler T. Programming in OBJ and Maude, in Functional Programming, Concurrency, Simulation and Automated Reasoning, International Lecture Series 1991-1992, McMaster University, Hamilton, Ontario, Canada, by ed. Peter Lauer, Springer Verland. LNCS. P. 229-277.

Termware. [Online] Available from: http://www.gradsoft.ua/products/termware_rus.html [Accessed: 18 February 2020]

Resharper. [Online] Available from: https://www.jetbrains.com/resharper/ [Accessed: 18 February 2020]

Mamedov T. Doroshenko A. A method of tuning programs on .NET platform with rewriting rules. Problems of programming. 2019. N 2. P. 11-16. (in Ukrainian). CrossRef

JNI4NET. [Online] Available from: http://jni4net.com/ [Accessed: 18 February 2020]

Javonet - Java to .NET Bridge, C#, VB.NET. [Online] Available from: https://www.javonet.com/ [Accessed: 18 February 2020]

Roslyn. [Online] Available from: https://github.com/dotnet/roslyn [Accessed: 18 February 2020]

Shevchenko R. & Doroshenko A. Using term rewriting systems for source code analysis. Problems of programming. 2008. №2-3, P. 305-312. (in Russian).

Quickstart: First look at profiling Tools [Online] Available from: https://docs.microsoft.com/en-us/dotnet/api/system. data.idatareader?view=netfnetframe-4.8 [Accessed: 18 February 2020]




DOI: https://doi.org/10.15407/pp2020.02-03.157

Refbacks

  • There are currently no refbacks.