Static analysis of .NET programs using rewriting rules

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


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


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

Full Text:

PDF (Ukrainian)


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

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: [Accessed: 18 February 2020]

Resharper. [Online] Available from: [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).

JNI4NET. [Online] Available from: [Accessed: 18 February 2020]

Javonet – Java to .NET Bridge, C#, VB.NET. [Online] Available from: [Accessed: 18 February 2020]

Roslyn. [Online] Available from: [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: data.idatareader?view=netfnetframe-4.8 [Accessed: 18 February 2020]


  • There are currently no refbacks.