Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed causality loop detection bug #1026

Merged
merged 2 commits into from
Mar 12, 2022
Merged

Fixed causality loop detection bug #1026

merged 2 commits into from
Mar 12, 2022

Conversation

edwardalee
Copy link
Collaborator

This fixes #1024 and updates a test which had a flaw masked by this bug.

Copy link
Collaborator

@a-sr a-sr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ModalCycleBreaker test still works as intended.
Thanks for fixing it.

@edwardalee
Copy link
Collaborator Author

There is a test failure in the C++ benchmarks, but I can't replicate this. The output from CI seems to imply the failure is in parallelism/MatMul.lf. I cloned the benchmarks repo, but I can't compile this benchmark. I get the following... Help?

> build-lfc -r src/parallelism/MatMul.lf 
Jar file is missing or out-of-date; starting rebuild...
...
BUILD SUCCESSFUL in 10s
13 actionable tasks: 9 executed, 4 up-to-date
Running lfc...
Generating code for: file:/Users/eal/git/benchmarks-lingua-franca/Cpp/Savina/src/parallelism/MatMul.lf
******** mode: STANDALONE
******** generated sources: /Users/eal/git/benchmarks-lingua-franca/Cpp/Savina/src-gen/parallelism/MatMul
Exception in thread "main" java.io.IOException: A required target resource could not be found: /lib/cpp/reactor-cpp
Perhaps a git submodule is missing or not up to date.
See https://github.com/icyphy/lingua-franca/wiki/downloading-and-building#clone-the-lingua-franca-repository.
Also try to refresh and clean the project explorer if working from eclipse.
	at org.lflang.util.FileUtil.copyDirectoryFromClassPath(FileUtil.java:265)
	at org.lflang.generator.cpp.CppGenerator.generateFiles(CppGenerator.kt:142)
	at org.lflang.generator.cpp.CppGenerator.doGenerate(CppGenerator.kt:77)
	at org.lflang.generator.LFGenerator.doGenerate(LFGenerator.java:164)
	at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
	at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
	at org.lflang.lfc.Main.runGenerator(Main.java:293)
	at org.lflang.lfc.Main.main(Main.java:222)

@lhstrh
Copy link
Member

lhstrh commented Mar 10, 2022

Try git submodule update --init --recursive in the benchmarks repo?

@Soroosh129
Copy link
Contributor

It looks like the test is failing because there is a cycle in FilterBank:

[INFO] - lfc: error: Reaction triggers involved in cyclic dependency in reactor Delay: inValue.
[INFO] -   --> src/parallelism/FilterBank.lf:150:14
[INFO] -     |
[INFO] - 149 |
[INFO] - 150 |     reaction(inValue) -> outValue {=
[INFO] -     |              ^^^^^^^ Reaction triggers involved in cyclic dependency in reactor Delay: inValue.
[INFO] -     |
[INFO] - 151 |         double result = *inValue.get();
[INFO] - 

reaction(in2) -> out {=
SET(out, in2->value);
reaction(in2) {=
// SET(out, in2->value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tagging @a-sr to be sure he is aware.

@lhstrh lhstrh changed the title Reaction self loop cycles Fixed causality loop detection bug Mar 12, 2022
@lhstrh lhstrh merged commit b1c7b20 into master Mar 12, 2022
@lhstrh lhstrh deleted the reaction-self-loop-cycles branch March 12, 2022 01:57
@lhstrh lhstrh added the bug Something isn't working label Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dependency cycle detection does not seem to work
4 participants