Giter VIP home page Giter VIP logo

feup-comp's Introduction

feup-comp's People

Contributors

andrefcruz avatar edgaracarneiro avatar msramalho avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

feup-comp's Issues

Join Future<> from Workers

Class that workers should return that provides a simple way of extracting and combining their results

pass operation into PatternReport

Figure out a way of passing the operation to execute into the respective worker factory so that PatternReport knows which operation to execute: sum, count, avg, ... list even...

In such a way that the operations on the PatternReport can be extended by users

Recursive extraction of classes from Spoon

on Dispatcher's run: spoon.getModel().getAllPackages() -> chamar recursivamente em cada class do package (pode ser paralelo) -> método dentro do dispatcher que usa a threadPool dele

Dynamic Worker setFilter

isto não funciona:

 @Override
    protected AbstractFilter setFilter() {
        CtIterator iterator = new CtIterator(patternElement);
        //TODO: get the first valid element from the CtBlock -> this approach does not work
        if (iterator.hasNext() && iterator.next() != null && iterator.hasNext()) return new TypeFilter(iterator.next().getClass());
        return null;
    }

é preciso uma forma de obter o primeiro elemento que vai dizer onde é que se despoleta o worker

Decouple Configuration from Dispatcher

  • Think of this so that it is good for cmd and Java package
  • Extract the calculations of the worker factories in use from the run() method
  • isolate the values the Dispatcher needs from the configuration (for example number of threads)

Interface Operator .operates()

passar collection de operators ao PatternReport,
no Report .toString chamar operate dos vários pattern reports associados à String Operator.getName

name do operator é passado no construtor, criado na factory dos respectivos workers, factory chama worker.getName, estáticos têm nome associado, e dinâmicos vão buscar o nome do método

🔥 Regex Engine for ASTs

Develop incrementally:

  • just for _var_x() in the beginning
  • include _any_() functionality
  • include _any_(from, to) functionality

Steps for this:

  • isolate logic that interprets a method as _var_X() or _any_
  • architecture to receive the source CtElement and the pattern CtELement
  • Create "symbol table" for the variables. If it has not been seen -> add, if it has -> check match
  • Use flag to "stop consuming" when _any_() is found
  • Implement a lazy matcher, but with backtrack

Create a DFS iterator for a CtElement

Desired behaviour

CtIterator iterator = new CtIterator(/** some CtElement*/); 
while (iterator.hasNext()) { 
    CtElement next = (CtElement) iterator.next(); 
    logger.print(next.toString()); 
}

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.