Code Monkey home page Code Monkey logo

glsl-transformer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

glsl-transformer's Issues

Test all not yet covered code

A code coverage approaching 100% is desirable. Related to #10 since testing the the generated code is of questionable usefulness.

  • Test SearchTerminals (in progress)
  • and all targets (partial)
  • Test ParsableASTNode
  • Test LifecycleUser and test that lifecycle methods are run correctly on run/walk phases and transformations
  • and test the various activation methods and partial activation
  • Test early walk-stop mechanisms and related methods throughout various classes
  • Test FixedWrappedParameters

Fixed Parameters

Add structures for creating multiple execution plans (through multiple root transformations) for a set of various static parameters. Required: something to hold the execution plans, something to execute on them, something to model a fixed parameter state, something to select execution plans with this state (hash map? record?). Previously this was solved by using multiple transformation mangers and using one of them depending on the fixed parameters. -> make it possible to use subclasses of a job parameter type, somehow.

idea: instead of iterating over all fixed parameters (though that would be possible too), just cache based on the equality of the fixed parameters. use class mechanics to force the implementation of hashCode and equals for the fixed parameter part of the job parameters. then cache based on that and generate an execution plan for each set of job parameters that are value-distinct with regard to the fixed parameter part. activate and deactivate using an activation system that cascades down the dependency chain. figure out how to do this since usually all dependencies of a node are required and can't be deactivated. Maybe make it configurable but active by default? would control which dependencies certain transformations consider as dependencies of their root nodes.

Improve HandlerTarget with lifecycle handling

The HandlerTarget class is currently lacking some features and should be extended or abstracted into existing structures so that it also has the usual lifecycle methods. (init, resetState, before/after search, activation checks)

Tensor features

The Tensor class exists but doesn't really have any helpful functionality yet. One idea was to give it functionality for shrinking and widening types and then emitting their types. It's not clear what exactly the use-case for this was but it may be in connection with other AST structure for structs.

Test local root removal

Figure out if and how removal of local roots works (nothing needs to be omitted since they are additions, trying to omit them may break. a placeholder still needs to be placed though)

AST support for structs

AST helpers for parsing, manipulating and re-inserting structs would be interesting. This could be combined with the general number-type handler Tensor.

Inform DynamicParseTreeWalker about child array changes

Have transformation phases tell the current DynamicParseTreeWalker about movements in the child array they caused to avoid inserting placeholder nodes. The the compacting step could be omitted if no placeholder nodes were inserted.

Tree walk node filter using isDeepEnough

The isDeepEnough method could be used to create a node filter that doesn't walk into the subtrees of nodes found to be uninteresting by all participating walk phases.
It should be tested if this actually helps performance since the nodes need to be asked if they want to continue. That process should probably be accelerated by asking less often or only asking if necessary.

Exclude generated classes from the jacoco test coverage reports

Including them skews the coverage metrics. This requires configuration of the gradle build config but I haven't been able to figure it out. Testing that the grammar works as expected is probably a good idea but looking at the coverage of the generated parser doesn't seem like a good way of ensuring that.

Documentation and User Guide

There are some diagrams that document what operations on Transformation do but nothing written. There should be a kind of tutorial explaining how to use glsl-transformer once the API has stabilized. (when 1.0.0 release-stability is reached)

Test that CachingIntervalSet has some cache hits

From the current coverage report it looks like the cache hit code is never run. Maybe there's an issue with how the cached interval is checked for compatibility or there's really just never an opportunity for cache hits with the current cache size of 1.

Lexer doesn't properly parse block comments that start in preprocessor directives

The following code causes a parsing error:

#if fds /*
fdasfdsa fsa fds
*/

This has to be fixed in the lexer. It has worked in some cases but not always. There is also the issue with gradle somehow weirdly caching the generated parser and refusing to generate a new parser if the lexer changed without a change to the parser.

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.