cerus/logic-builder

StackOverflowError when creating infinite recursion

cerus opened this issue · 8 comments

cerus commented

How to reproduce:

  1. Create infinite recursion with gates
  2. Hook an output into it
  3. See console
cerus commented

After thinking about this issue for a while I might have come up with a solution:

  1. Add the method Set<Node> getLastNodes to the ConnectorHolder interface
  2. Implement the method in a way that it returns the nodes at the end of the connections
  3. When connecting a node (A) to another node (B) check if the last nodes of A contain B; If so, abort connecting

This is just an idea. I'll try to fix this when I get home from work as long as no one else has claimed this issue. It's still up for grabs!

cerus commented

Turns out my idea didn't really work

I would like to see it, can you assign it to me and also, please provide the steps to run the program.

cerus commented

Sure, I'll assign this issue to you. Every modern IDE should be able to run the main class directly but these are the manual steps:

  1. Clone this repository git clone https://github.com/RealCerus/logic-builder.git
  2. Change directory cd logic-builder
  3. Build the project with Maven mvn package
  4. Run the jar file java -jar target/logic-builder-1.0.0.jar
cerus commented

@kaggrwal Any progress so far?

@RealCerus Hi, I didn't get the time, i'll try it soon and let you know about the progress.

@RealCerus Can we discuss it over IRC/chat ?

cerus commented

You can add me on Discord Cerus#5149