Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lf-lang/lingua-franca
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 050cf37453c0b9b7a81c6c3f93aa02d3fc78117d
Choose a base ref
..
head repository: lf-lang/lingua-franca
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0d772cd61c2f4adfdb2cc950110067cd24aebc05
Choose a head ref
Showing with 13 additions and 13 deletions.
  1. +2 −1 core/src/main/java/org/lflang/federated/extensions/CExtension.java
  2. +11 −12 core/src/main/java/org/lflang/federated/generator/FederateInstance.java
Original file line number Diff line number Diff line change
@@ -838,7 +838,8 @@ private String generateCodeForPhysicalActions(
if (federate.targetConfig.getOrDefault(DNETProperty.INSTANCE)) {
ActionInstance found = federate.findPhysicalAction(instance);
if (found != null) {
String warning = String.join(
String warning =
String.join(
"\n",
"Found a physical action inside the federate "
+ addDoubleQuotes(instance.getName()),
Original file line number Diff line number Diff line change
@@ -649,24 +649,23 @@ private boolean containsAllVarRefs(Iterable<VarRef> varRefs) {

/**
* Return the first found physical action or null if there is no physical action in this federate.
*
*
* @param instance The reactor instance to check whether there is a physical action.
*/
public ActionInstance findPhysicalAction(
ReactorInstance instance) {
for (ActionInstance action : instance.actions) {
public ActionInstance findPhysicalAction(ReactorInstance instance) {
for (ActionInstance action : instance.actions) {
if (action.isPhysical()) {
return action;
}
}
for (ReactorInstance child : instance.children) {
for (ActionInstance action : child.actions) {
if (action.isPhysical()) {
return action;
}
}
for (ReactorInstance child : instance.children) {
for (ActionInstance action : child.actions) {
if (action.isPhysical()) {
return action;
}
}
}
return null;
}
return null;
}

/**