Skip to content

Commit

Permalink
Update LF and known good
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Oct 9, 2024
1 parent 6fa89c7 commit c6a04f5
Show file tree
Hide file tree
Showing 34 changed files with 10,715 additions and 291 deletions.
2 changes: 1 addition & 1 deletion lingua-franca
Submodule lingua-franca updated 85 files
+13 −0 .github/actions/push-rti-docker/action.yml
+4 −15 .github/actions/setup-flexpret/action.yml
+1 −1 .github/actions/setup-zephyr/action.yml
+2 −2 .github/scripts/run-zephyr-tests.sh
+0 −7 .github/workflows/build.yml
+3 −3 .github/workflows/c-embedded.yml
+0 −1 .github/workflows/c-flexpret-tests.yml
+26 −26 .github/workflows/c-zephyr-tests.yml
+9 −2 .github/workflows/rti-docker.yml
+3 −0 .gitignore
+4 −1 README.md
+12 −1 core/src/main/java/org/lflang/LFResourceDescriptionStrategy.java
+13 −5 core/src/main/java/org/lflang/LinguaFranca.xtext
+0 −12 core/src/main/java/org/lflang/ModelInfo.java
+3 −0 core/src/main/java/org/lflang/TimeValue.java
+50 −0 core/src/main/java/org/lflang/ast/ASTUtils.java
+1 −0 core/src/main/java/org/lflang/ast/IsEqual.java
+5 −3 core/src/main/java/org/lflang/ast/ToLf.java
+2 −1 core/src/main/java/org/lflang/ast/ToSExpr.java
+1 −0 core/src/main/java/org/lflang/diagram/synthesis/LinguaFrancaSynthesis.java
+13 −0 core/src/main/java/org/lflang/diagram/synthesis/styles/LinguaFrancaStyleExtensions.java
+4 −5 core/src/main/java/org/lflang/federated/extensions/CExtension.java
+5 −2 core/src/main/java/org/lflang/federated/extensions/CExtensionUtils.java
+13 −11 core/src/main/java/org/lflang/federated/generator/FedASTUtils.java
+15 −8 core/src/main/java/org/lflang/federated/generator/FedGenerator.java
+11 −1 core/src/main/java/org/lflang/federated/generator/FedImportEmitter.java
+6 −3 core/src/main/java/org/lflang/federated/generator/FederateInstance.java
+4 −0 core/src/main/java/org/lflang/generator/TargetTypes.java
+3 −1 core/src/main/java/org/lflang/generator/c/CActionGenerator.java
+2 −2 core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java
+73 −35 core/src/main/java/org/lflang/generator/c/CGenerator.java
+3 −0 core/src/main/java/org/lflang/generator/c/CTriggerObjectsGenerator.java
+7 −7 core/src/main/java/org/lflang/generator/c/CUtil.java
+1 −10 core/src/main/java/org/lflang/generator/docker/PythonDockerGenerator.java
+14 −9 core/src/main/java/org/lflang/generator/python/PythonReactorGenerator.java
+1 −1 core/src/main/java/org/lflang/scoping/LFGlobalScopeProvider.java
+13 −2 core/src/main/java/org/lflang/scoping/LFScopeProviderImpl.java
+0 −1 core/src/main/java/org/lflang/target/property/PlatformProperty.java
+17 −17 core/src/main/java/org/lflang/target/property/type/PlatformType.java
+107 −0 core/src/main/java/org/lflang/util/ImportUtil.java
+8 −10 core/src/main/java/org/lflang/validation/LFValidator.java
+1 −1 core/src/main/resources/lib/c/reactor-c
+1 −0 core/src/main/resources/lib/platform/zephyr/prj_lf.conf
+1 −1 core/src/main/resources/org/lflang/StringsBundle.properties
+6 −19 core/src/test/java/org/lflang/tests/compiler/LinguaFrancaValidationTest.java
+1 −1 gradle.properties
+11 −0 lsp/src/main/java/org/lflang/diagram/lsp/LFLanguageClient.java
+97 −2 lsp/src/main/java/org/lflang/diagram/lsp/LFLanguageServerExtension.java
+3 −3 lsp/src/main/java/org/lflang/diagram/lsp/LanguageDiagramServer.java
+53 −0 lsp/src/main/java/org/lflang/diagram/lsp/LibraryFile.java
+39 −0 lsp/src/main/java/org/lflang/diagram/lsp/NodePosition.java
+54 −0 lsp/src/main/java/org/lflang/diagram/lsp/ReactorNode.java
+30 −0 test/C/src/ActionIsPresentReset.lf
+1 −7 test/C/src/LastTimeDefer.lf
+1 −7 test/C/src/LastTimeDrop.lf
+1 −7 test/C/src/LastTimeReplace.lf
+43 −0 test/C/src/Mutable.lf
+38 −0 test/C/src/TriggerIssue.lf
+48 −0 test/C/src/TriggerIssue2.lf
+1 −1 test/C/src/concurrent/ScheduleAt.lf
+0 −0 test/C/src/concurrent/failing/Watchdog.lf
+0 −0 test/C/src/concurrent/failing/WatchdogAction.lf
+0 −0 test/C/src/concurrent/failing/WatchdogMultiple.lf
+0 −0 test/C/src/concurrent/failing/WatchdogMutex.lf
+0 −0 test/C/src/concurrent/failing/WatchdogRestartTerminated.lf
+1 −1 test/C/src/enclave/EnclaveRequestStop.lf
+64 −0 test/C/src/federated/Dataflow.lf
+68 −0 test/C/src/federated/DecentralizedLagging.lf
+71 −0 test/C/src/federated/DecentralizedMicrosteps.lf
+3 −1 test/C/src/federated/DecentralizedP2PUnbalancedTimeoutPhysical.lf
+26 −0 test/C/src/federated/DecentralizedTimeout.lf
+3 −3 test/C/src/modal_models/BanksCount3ModesComplex.lf
+4 −4 test/C/src/modal_models/ModalNestedReactions.lf
+71 −0 test/C/src/multiport/BankMultiportIsPresentSetup.lf
+39 −0 test/C/src/multiport/BankOfActionsIsPresentSetup.lf
+50 −0 test/C/src/token/MutableToken.lf
+12 −0 test/Python/build/lfc_include/library-test/src/lib/Import.lf
+21 −0 test/Python/src/LingoFederatedImport.lf
+28 −0 test/Python/src/federated/BankIndexFed.lf
+12 −0 test/Python/src/federated/BankIndexOverride.lf
+11 −11 test/Python/src/federated/Dataflow.lf
+21 −0 test/Python/src/lingo_imports/FederatedTestImportPackages.lf
+20 −0 test/Python/src/lingo_imports/TestImportPackages.lf
+3 −3 test/Python/src/modal_models/BanksCount3ModesComplex.lf
+4 −4 test/Python/src/modal_models/ModalNestedReactions.lf
358 changes: 358 additions & 0 deletions test/known-good/C/src/ActionIsPresentReset.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,358 @@
<span class="source-lf meta-targetspec-lflang keyword-control-lflang">
target
</span>
<span class="source-lf meta-targetspec-lflang">

</span>
<span class="source-lf meta-targetspec-lflang constant-language-lflang">
C
</span>
<span class="source-lf meta-targetspec-lflang">
{
</span>

<span class="source-lf meta-targetspec-lflang variable-parameter-lflang">
timeout
</span>
<span class="source-lf meta-targetspec-lflang">
:
</span>
<span class="source-lf meta-targetspec-lflang constant-numeric-int-lflang">
7
</span>
<span class="source-lf meta-targetspec-lflang">

</span>
<span class="source-lf meta-targetspec-lflang constant-numeric-lflang">
msecs
</span>
<span class="source-lf meta-targetspec-lflang">
,
</span>

<span class="source-lf meta-targetspec-lflang variable-parameter-lflang">
fast
</span>
<span class="source-lf meta-targetspec-lflang">
:
</span>
<span class="source-lf meta-targetspec-lflang constant-language-lflang">
true
</span>

<span class="source-lf meta-targetspec-lflang">
}
</span>

<span class="source-lf">

</span>

<span class="source-lf storage-modifier-lflang">
main
</span>
<span class="source-lf">

</span>
<span class="source-lf storage-modifier-lflang">
reactor
</span>
<span class="source-lf">
{
</span>

<span class="source-lf">

</span>
<span class="source-lf storage-modifier-lflang">
logical
</span>
<span class="source-lf">

</span>
<span class="source-lf storage-modifier-lflang">
action
</span>
<span class="source-lf">

</span>
<span class="source-lf variable-other-lflang">
a
</span>

<span class="source-lf">

</span>
<span class="source-lf storage-modifier-lflang">
logical
</span>
<span class="source-lf">

</span>
<span class="source-lf storage-modifier-lflang">
action
</span>
<span class="source-lf">

</span>
<span class="source-lf variable-other-lflang">
b
</span>

<span class="source-lf">

</span>

<span class="source-lf">

</span>
<span class="source-lf keyword-control-lflang">
reaction
</span>
<span class="source-lf">
(
</span>
<span class="source-lf support-variable-lflang">
startup
</span>
<span class="source-lf">
)
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
a {
</span>
<span class="source-lf keyword-operator-lflang">
=
</span>

<span class="source-lf">
lf_schedule(a, MSEC(
</span>
<span class="source-lf constant-numeric-int-lflang">
1
</span>
<span class="source-lf">
));
</span>

<span class="source-lf">

</span>
<span class="source-lf keyword-operator-lflang">
=
</span>
<span class="source-lf">
}
</span>

<span class="source-lf">

</span>

<span class="source-lf">

</span>
<span class="source-lf keyword-control-lflang">
reaction
</span>
<span class="source-lf">
(
</span>
<span class="source-lf">
a, b)
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
a, b {
</span>
<span class="source-lf keyword-operator-lflang">
=
</span>

<span class="source-lf">
if (a
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
is_present) {
</span>

<span class="source-lf">
printf(
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf string-quoted-double-lflang">
A
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf">
);
</span>

<span class="source-lf">
lf_schedule(b, MSEC(
</span>
<span class="source-lf constant-numeric-int-lflang">
2
</span>
<span class="source-lf">
));
</span>

<span class="source-lf">
}
</span>

<span class="source-lf">
if (b
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
is_present) {
</span>

<span class="source-lf">
printf(
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf string-quoted-double-lflang">
B
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf">
);
</span>

<span class="source-lf">
lf_schedule(a, MSEC(
</span>
<span class="source-lf constant-numeric-int-lflang">
1
</span>
<span class="source-lf">
));
</span>

<span class="source-lf">
}
</span>

<span class="source-lf">

</span>

<span class="source-lf">
lf_print(
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf string-quoted-double-lflang">
at %d msecs with triggers (%d,%d)
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf">
, lf_time_logical_elapsed()
</span>
<span class="source-lf keyword-operator-lflang">
/
</span>
<span class="source-lf">
MSEC(
</span>
<span class="source-lf constant-numeric-int-lflang">
1
</span>
<span class="source-lf">
), a
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
is_present, b
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
is_present);
</span>

<span class="source-lf">

</span>

<span class="source-lf">
if (a
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
is_present && b
</span>
<span class="source-lf keyword-operator-lflang">
->
</span>
<span class="source-lf">
is_present) {
</span>

<span class="source-lf">
lf_print_error_and_exit(
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf string-quoted-double-lflang">
Both triggers should not be present
</span>
<span class="source-lf string-quoted-double-lflang">
"
</span>
<span class="source-lf">
);
</span>

<span class="source-lf">
}
</span>

<span class="source-lf">

</span>
<span class="source-lf keyword-operator-lflang">
=
</span>
<span class="source-lf">
}
</span>

<span class="source-lf">
}
</span>

<span class="source-lf">

</span>

Loading

0 comments on commit c6a04f5

Please sign in to comment.