diff --git a/.github/workflows/all-misc.yml b/.github/workflows/all-misc.yml index 1155170fc1..e2aae3d1ff 100644 --- a/.github/workflows/all-misc.yml +++ b/.github/workflows/all-misc.yml @@ -41,14 +41,6 @@ jobs: with: all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - # Run language server tests. - lsp: - if: ${{ needs.check-diff.outputs.run_misc == 'true' }} - needs: check-diff - uses: ./.github/workflows/lsp-tests.yml - with: - all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - check-labels: uses: ./.github/workflows/check-labels.yml if: ${{ github.event_name == 'pull_request' }} diff --git a/.github/workflows/lsp-tests.yml b/.github/workflows/lsp-tests.yml index 0a50fbf85a..a724ed42e1 100644 --- a/.github/workflows/lsp-tests.yml +++ b/.github/workflows/lsp-tests.yml @@ -1,6 +1,10 @@ name: Language server tests on: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '0 8 * * 6' + workflow_dispatch: workflow_call: inputs: all-platforms: diff --git a/README.md b/README.md index 5af0226c8d..6ad4e01a6c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [Website](https://lf-lang.org/) | [Documentation](https://www.lf-lang.org/docs/) | -[Download](https://www.lf-lang.org/docs/installation) | +[Installation](https://www.lf-lang.org/docs/installation) | [Contributing](CONTRIBUTING.md) | [Changelog](CHANGELOG.md) @@ -8,7 +8,10 @@ [![CI (misc)](https://github.com/lf-lang/lingua-franca/actions/workflows/all-misc.yml/badge.svg)](https://github.com/lf-lang/lingua-franca/actions/workflows/all-misc.yml?query=branch%3Amaster) [![CI (misc)](https://github.com/lf-lang/lingua-franca/actions/workflows/all-embedded.yml/badge.svg)]([https://github.com/lf-lang/lingua-franca/actions/](https://github.com/lf-lang/lingua-franca/actions/workflows/all-embedded.yml?query=branch%3Amaster)) -[![Nightly Build](https://github.com/lf-lang/lingua-franca/actions/workflows/nightly-build.yml/badge.svg)](https://github.com/lf-lang/lingua-franca/actions/workflows/nightly-build.yml) +[![Open VSX Downloads](https://img.shields.io/open-vsx/dt/lf-lang/vscode-lingua-franca?label=Open%20VSX%20Registry%20%E2%A4%93)](https://open-vsx.org/extension/lf-lang/vscode-lingua-franca) +[![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/lf-lang.vscode-lingua-franca?label=VS%20Marketplace%20%E2%A4%93)](https://marketplace.visualstudio.com/items?itemName=lf-lang.vscode-lingua-franca) +[![Nightly Build](https://github.com/lf-lang/lingua-franca/actions/workflows/nightly-build.yml/badge.svg)](https://github.com/lf-lang/lingua-franca/releases/tag/nightly) + [![CodeCov](https://codecov.io/gh/lf-lang/lingua-franca/branch/master/graph/badge.svg?token=b7LrpihI5a)](https://codecov.io/gh/lf-lang/lingua-franca) [![GitHub Contributors](https://img.shields.io/github/contributors/lf-lang/lingua-franca)](https://github.com/lf-lang/lingua-franca/graphs/contributors) [![Zulip](https://img.shields.io/badge/chat-zulip-informational)](https://lf-lang.zulipchat.com) @@ -19,6 +22,4 @@ Lingua Franca (LF) is a polyglot coordination language for concurrent and possibly time-sensitive applications ranging from low-level embedded code to distributed cloud and edge applications. An LF program specifies the interactions between components called reactors. The emphasis of the framework is on ensuring deterministic interaction with explicit management of timing. The logic of each reactor is written in one of a suite of target languages (currently C, C++, Python, and TypeScript) and can integrate legacy code in those languages. A code generator synthesizes one or more programs in the target language, which are then compiled using standard toolchains. If the application has exploitable parallelism, then it executes transparently on multiple cores without compromising determinacy. A distributed application translates into multiple programs and scripts to launch those programs on distributed machines. The communication fabric connecting components is synthesized as part of the programs. -See [lf-lang.org](https://lf-lang.org) for installation instructions and documentation. See also the [wiki](https://github.com/icyphy/lingua-franca/wiki) for further information on ongoing projects. - -See our [Publications and Presentations](https://www.lf-lang.org/research/). +See [lf-lang.org](https://lf-lang.org) for [installation instructions](https://www.lf-lang.org/docs/installation), [documentation](https://www.lf-lang.org/docs/), and [research papers](https://www.lf-lang.org/research/). See also the [wiki](https://github.com/lf-lang/lingua-franca/wiki/) for further information on ongoing projects. diff --git a/core/src/main/java/org/lflang/federated/extensions/CExtension.java b/core/src/main/java/org/lflang/federated/extensions/CExtension.java index 025d20749a..edf5bc8d19 100644 --- a/core/src/main/java/org/lflang/federated/extensions/CExtension.java +++ b/core/src/main/java/org/lflang/federated/extensions/CExtension.java @@ -387,7 +387,7 @@ protected void serializeAndSend( result.pr( "size_t _lf_message_length = " + sendRef - + "->token->length * " + + "->length * " + sendRef + "->token->type->element_size;"); result.pr( diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index c2f5316458..2b7cae5ec0 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit c2f5316458bac61074285ca34d92a87c8511eaf9 +Subproject commit 2b7cae5ec0600113bd2d1f5588ed83315439ca08 diff --git a/test/Python/src/concurrent/ConcurrentActionRepeat.lf b/test/Python/src/concurrent/ConcurrentActionRepeat.lf new file mode 100644 index 0000000000..66c312986f --- /dev/null +++ b/test/Python/src/concurrent/ConcurrentActionRepeat.lf @@ -0,0 +1,45 @@ +target Python + +reactor ConcurrentActionTest { + state logs + physical action addlog_action + + reaction(startup) -> addlog_action {= + print("Starting WebServer") + import time + import threading + self.logs = [] + def testall(): + def test(i): + print(f"Scheduling action {i}") + addlog_action.schedule(0, f"{i}") + + threads = [] + for j in range(100): + self.logs = [] + for i in range(100): + test_thread = threading.Thread(target=test, args=(j*100 + i,)) + test_thread.start() + threads.append(test_thread) + for thread in threads: + thread.join() + time.sleep(0.1) + print(f"===== Test {j} complete =====") + os._exit(0) + testall_thread = threading.Thread(target=testall) + testall_thread.start() + =} + + reaction(addlog_action) {= + if addlog_action.value in self.logs: + print(f"Duplicate Action: {addlog_action.value}") + raise Exception("Duplicate Action") + else: + print(f"Action: {addlog_action.value}") + self.logs.append(addlog_action.value) + =} +} + +main reactor { + server = new ConcurrentActionTest() +}