Skip to content

Commit

Permalink
Merge branch 'master' into rti-DNET
Browse files Browse the repository at this point in the history
  • Loading branch information
byeonggiljun committed Oct 22, 2024
2 parents 32bbd70 + ec47a91 commit d41bfcf
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 15 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/all-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
4 changes: 4 additions & 0 deletions .github/workflows/lsp-tests.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[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)

[![CI (targets)](https://github.com/lf-lang/lingua-franca/actions/workflows/all-targets.yml/badge.svg)](https://github.com/lf-lang/lingua-franca/actions/workflows/all-targets.yml?query=branch%3Amaster)
[![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)
Expand All @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/c/reactor-c
45 changes: 45 additions & 0 deletions test/Python/src/concurrent/ConcurrentActionRepeat.lf
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit d41bfcf

Please sign in to comment.