WOLFRAM

Wolfram Summer School

Alumni

Andrey Krotkikh

Technology and Innovation

Class of 2017

Bio

After he finished a bachelor’s degree in biomechanics and theoretic mechanics at the Perm National Research Polytechnical University, Andrey began creating different models of topology optimization for different problems: minimal mass of object, optimal shape and optimal properties. Andrey likes to model many physical processes, like moving fluids in frozen soils or the static equilibrium of mandible systems of humans. His research is creating a “biological optimal” shape of objects.

In his free time, Andrey likes engraving and reading science fiction literature, like books from the authors James Rollins and Lincoln Child. He also likes taking long walks in the forest.

Computational Essay

Exploration of Noble Gases »

Project: Correcting Non-Syntax Expressions

Goal of the project:

Find ways for correcting non-SyntaxQ expressions to SyntaxQ expressions.

Summary of work:

We start with a Wolfram Language expression given as a string, which we evaluate using the symbol ToExpression. If $Failed is returned, it means that our string did not have correct syntax. To investigate possible ways of correcting an expression, we tried constructing a text-analyzing parser based on string patterns. We understood after benchmarking this method that it was a very inefficient approach, so instead we built a counting method (how many open and closed brackets, braces, etc. the string contains) and looked at a way of using errors issued by incorrect expressions when evaluated. We designed from this second approach an algorithm that converts non-SyntaxQ expressions to SyntaxQ expressions by adding one missing character. For any non-SyntaxQ expression, we were then able to generate (possibly several) SyntaxQ expressions. At the end of our work, we decided to construct a neural net in order to rank these corrections. We generated a dataset of pairs of non-SyntaxQ and SyntaxQ expressions from examples taken from the reference pages of about 2,000 built-in symbols. This neural net is only a prototype and was not trained due to lack of time.

Results and future work:

Our main result has been the design of an algorithm that corrects non-SyntaxQ expressions to SyntaxQ expressions and the prototype of a neural net architecture to rank the corrected expressions. In the future, we plan to construct a larger dataset to train our prototype. We will also improve the algorithm for supporting two or more missing characters.