Git Product home page Git Product logo

corda-flows-doc-builder's People

Contributors

lucacampanella avatar lucacampanellaadn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

corda-flows-doc-builder's Issues

Properly handle break and continue in flow analysis

Right now instructions like continue, break, throw and return are shown, but not properly handled when considering what are the possible combinations of runtime execution, sometimes this leads tosaying the flow doesn't have a correct protocol when it does or vice versa

align send🡘receive calls with arrows

Probably a hard one as it isn't always clear just by looking at static code. But at least for simple cases that would be really helpful.
A quick solution could be to draw a box (like around initiateFlow calls) also around send and receive with an open arrow pointing nowhere. Same for cases where the alignment is not clear.

receive inside send

What happens if we have a receive as an argument of a send call? This will probably break the program. Test it out and fix.

configurable list of hidden flow-classes

Currently all Corda internal Flows are hidden, which is a good default. I would like to configure this list however.

  • could be a global list configurable in the gradle plugin,
  • or maybe even directly in code with a custom annotation such as @DocBuilderIgnore on the method calling the subflow
  • or with a comment like // docbuilder:ignore on the line calling the subFlow,...

Find out code for dynamically dispatched methods

Currently dynamically dispatched methods are not discovered, either the Overridden method is analyzed or if this method is abstract, no method body is analyzed.
Change this, for example when going up the call stack pushing up methods and checking if the upper method overrides any of these.
For an example of such a situation see the test class ExtendingSuperclassTestFlow

Arrows between send and receive should take sessions into account

Right coupling send and receive with arrows doesn't take into account that there might be two different session references inside the same flow. Doing session1.send(...) and session2.send(...) can send to two different parties. This needs to be taken into account.

java.lang.IndexOutOfBoundsException: Index: 0

Hi!

An issue emerged from the cd project, in 2 different MRs, both failed to run the jarAnalyzerTask with the exception mentioned in the title and with a stacktrace:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0 at spoon.support.util.EmptyClearableList.get(EmptyClearableList.java:79) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.addToMapIfNoException(MethodInvocation.java:149) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:108) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:376) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:385) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.CodeFlowBreak.fromStatement(CodeFlowBreak.java:47) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:291) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:134) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.MethodInvocation.fromCtStatement(MethodInvocation.java:68) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:376) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:385) at com.github.lucacampanella.callgraphflows.staticanalyzer.StaticAnalyzerUtils.getAllRelevantMethodInvocations(StaticAnalyzerUtils.java:385) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.SubFlowBuilder.fromCtStatement(SubFlowBuilder.java:106) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.initiateIfCordaRelevantStatement(MatcherHelper.java:234) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:282) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.AnalyzerWithModel.analyzeFlowLogicClass(AnalyzerWithModel.java:89) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.SubFlowBuilder.fromCtStatement(SubFlowBuilder.java:173) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.initiateIfCordaRelevantStatement(MatcherHelper.java:234) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:282) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.AnalyzerWithModel.analyzeFlowLogicClass(AnalyzerWithModel.java:89) at com.github.lucacampanella.callgraphflows.staticanalyzer.instructions.SubFlowBuilder.fromCtStatement(SubFlowBuilder.java:173) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.initiateIfCordaRelevantStatement(MatcherHelper.java:234) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.instantiateStatement(MatcherHelper.java:282) at com.github.lucacampanella.callgraphflows.staticanalyzer.matchers.MatcherHelper.fromCtStatementsToStatements(MatcherHelper.java:306) at com.github.lucacampanella.callgraphflows.staticanalyzer.AnalyzerWithModel.analyzeFlowLogicClass(AnalyzerWithModel.java:89) at com.github.lucacampanella.callgraphflows.DrawerUtil.drawFromClass(DrawerUtil.java:59) at com.github.lucacampanella.callgraphflows.DrawerUtil.drawAllStartableClasses(DrawerUtil.java:46) at com.github.lucacampanella.callgraphflows.Main.call(Main.java:83) at com.github.lucacampanella.callgraphflows.Main.main(Main.java:58)

Please if you have any ideas what could caused this, help us out.

Best regards
Mark

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.