GithubHelp home page GithubHelp logo

ilab-compiler's People

Contributors

citizen-seven avatar opomuc avatar tismoney avatar

Watchers

 avatar  avatar  avatar  avatar

ilab-compiler's Issues

Create new Tree structure

I suggest using inheritance. A simple class structure will improve understanding of the code. With the help of virtual functions we can eliminate huge switch and if parts of the differentiation function and printing of the tree.
Also I am thinking: doing so without damage to the original version and deprecation of old code in the end. This can be a bad idea, but an easy way.

Programming language syntax

Think of syntax rules for the language we will compile. Similar to the ones Dedinskiy showed at the previous lecture.

Correct differentiation fuction

Exponentiation right now implemented as f(x)^g(x). This way does not truly serve our purpose, because by definition both f(x) & g(x) must be functions and have at least one derivative, and f(x) must be greater then zero. This method is OK for such a case.
We need a simple check for VARIABLES and NUMBERS, because in that case generated tree is way over necessary + has division by zero.

Tree generation for the program

Our compiler has to generate program tree from the code. First, we need to have syntax rules. Then start writing appropriate functions.
Again I believe that with the inheritance and virtual functions this task will be easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.