Skip to content

Commit

Permalink
Merge branch 'master' into static-schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
lsk567 committed Dec 30, 2024
2 parents 61c3a54 + c794669 commit f2f6310
Show file tree
Hide file tree
Showing 42 changed files with 576 additions and 162 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/actions/setup-patmos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Install Patmos and dependencies (Linux only)
description: Install Patmos and dependencies (Linux only)
runs:
using: "composite"
steps:
- name: Setup
run: |
# install needed tools
sudo apt install git openjdk-8-jdk cmake make g++ texinfo flex bison \
subversion libelf-dev graphviz libboost-dev libboost-program-options-dev ruby-full \
liblpsolve55-dev zlib1g-dev gtkwave gtkterm scala autoconf libfl2 expect verilator curl
# install sbt
sudo apt-get update
sudo apt-get install apt-transport-https curl gnupg -yqq
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
sudo apt-get update
sudo apt-get install sbt
# Clone the Patmos repository
export PATH=$PATH:$HOME/t-crest/local/bin
echo "PATH=$PATH:$HOME/t-crest/local/bin" >> "$GITHUB_ENV"
echo $PATH
mkdir ~/t-crest
cd ~/t-crest
git clone https://github.com/t-crest/patmos-misc.git misc
./misc/build.sh
patmos-clang --version
which patmos-clang
shell: bash
4 changes: 4 additions & 0 deletions .github/workflows/c-embedded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ jobs:
# # Run the C FlexPRET integration tests.
# flexpret:
# uses: ./.github/workflows/c-flexpret-tests.yml

# Run the C Patmos integration tests.
# patmos:
# uses: ./.github/workflows/c-patmos-tests.yml
2 changes: 1 addition & 1 deletion .github/workflows/c-flexpret-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
if: ${{ inputs.runtime-ref }}
- name: Run FlexPRET smoke tests
run: |
cd "$FP_DIR" && source env.bash && cd -
source $FP_DIR/env.bash
./gradlew core:integrationTest \
--tests org.lflang.tests.runtime.CFlexPRETTest.* \
core:integrationTestCodeCoverageReport
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/c-patmos-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: C Patmos tests

on:
workflow_call:
inputs:
compiler-ref:
required: false
type: string
runtime-ref:
required: false
type: string
use-cpp:
required: false
type: boolean
default: false
scheduler:
required: false
type: string
all-platforms:
required: false
default: true
type: boolean

jobs:
Patmos-tests:
runs-on: ubuntu-latest
steps:
- name: Check out lingua-franca repository
uses: actions/checkout@v3
with:
repository: lf-lang/lingua-franca
submodules: true
ref: ${{ inputs.compiler-ref }}
fetch-depth: 0
- name: Prepare build environment
uses: ./.github/actions/prepare-build-env
- name: Setup and build Patmos
uses: ./.github/actions/setup-patmos
- name: Check out specific ref of reactor-c
uses: actions/checkout@v3
with:
repository: lf-lang/reactor-c
path: core/src/main/resources/lib/c/reactor-c
ref: ${{ inputs.runtime-ref }}
if: ${{ inputs.runtime-ref }}
- name: Run Patmos smoke tests
run: |
./gradlew core:integrationTest \
--tests org.lflang.tests.runtime.CPatmosTest.* \
core:integrationTestCodeCoverageReport
rm -rf test/C/src-gen
- name: Report to CodeCov
uses: ./.github/actions/report-code-coverage
with:
files: core/build/reports/jacoco/integrationTestCodeCoverageReport/integrationTestCodeCoverageReport.xml
if: ${{ github.repository == 'lf-lang/lingua-franca' }}
20 changes: 10 additions & 10 deletions .github/workflows/c-zephyr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ jobs:
--tests org.lflang.tests.runtime.CZephyrTest.buildZephyrThreaded* core:integrationTestCodeCoverageReport
./.github/scripts/run-zephyr-tests.sh test/C/src-gen
rm -rf test/C/src-gen
- name: Run basic tests
run: |
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildBasic* core:integrationTestCodeCoverageReport
./.github/scripts/run-zephyr-tests.sh test/C/src-gen
rm -rf test/C/src-gen
- name: Run concurrent tests
run: |
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildConcurrent* core:integrationTestCodeCoverageReport
./.github/scripts/run-zephyr-tests.sh test/C/src-gen
rm -rf test/C/src-gen
# - name: Run basic tests
# run: |
# ./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildBasic* core:integrationTestCodeCoverageReport
# ./.github/scripts/run-zephyr-tests.sh test/C/src-gen
# rm -rf test/C/src-gen
# - name: Run concurrent tests
# run: |
# ./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildConcurrent* core:integrationTestCodeCoverageReport
# ./.github/scripts/run-zephyr-tests.sh test/C/src-gen
# rm -rf test/C/src-gen
- name: Run Zephyr board tests
run: |
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildZephyrBoards* core:integrationTestCodeCoverageReport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run language server Python tests without PyLint
run: ./gradlew core:integrationTest --tests org.lflang.tests.lsp.LspTests.pythonValidationTestSyntaxOnly core:integrationTestCodeCoverageReport
- name: Install pylint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/py-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- name: Install dependencies OS X
run: |
brew install coreutils
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rti-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
latest: false
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ endsWith(env.lf_version, '-snapshot') && github.repository_owner == 'lf-lang' }}
if: ${{ endsWith(env.lf_version, '-snapshot') && github.repository_owner == 'lf-lang' }}

- name: Update latest (released versions only)
uses: ./.github/actions/push-rti-docker
Expand All @@ -39,4 +39,4 @@ jobs:
latest: true
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ !endsWith(env.lf_version, '-snapshot') && github.repository_owner == 'lf-lang' }}
if: ${{ !endsWith(env.lf_version, '-snapshot') && github.repository_owner == 'lf-lang' }}
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,78 @@
# Changelog

## [v0.9.0](https://github.com/lf-lang/lingua-franca/tree/v0.9.0) (2024-10-31)

**Highlights**

This release of Lingua Franca adds support for reusable and publishable packages, providing the necessary infrastructure to develop a community-driven ecosystem of Lingua Franca packages. The VS code extension now features an integrated package explorer, and the diagrams provide colored highlighting for selected diagram edges. Other new features include C support for a new hardware platform called Patmos, several minor syntax and API improvements, and a new Alpine-based default Docker image for Python. This release also includes numerous bug fixes, such as preventing hangs during timeouts, addressing issues in decentralized coordination, improving error handling, and fixing concurrency issues in the C runtime.

**🚀 New Features**

- Colored highlighting of selected diagram edges [\#2324](https://github.com/lf-lang/lingua-franca/pull/2324) (@soerendomroes)
- Native `forever` and `never` time literal [\#2421](https://github.com/lf-lang/lingua-franca/pull/2421) (@Depetrol)
- Angular bracket imports for reusable reactor modules [\#2404](https://github.com/lf-lang/lingua-franca/pull/2404) (@vinzbarbuto)
- Support for Patmos platform [\#2383](https://github.com/lf-lang/lingua-franca/pull/2383) (@EhsanKhodadad)
- API for getting fully-qualified name in Cpp target [\#2431](https://github.com/lf-lang/lingua-franca/pull/2431) (@OmerMajNition)

**✨ Enhancements**

- Changes in the Lingua Franca Language Server to support improvements in the VSCode extension [\#2370](https://github.com/lf-lang/lingua-franca/pull/2370) (@vinzbarbuto)
- Default Docker image for Python changed to Alpine [\#2413](https://github.com/lf-lang/lingua-franca/pull/2413) (@lhstrh)
- Modal multiport [\#2422](https://github.com/lf-lang/lingua-franca/pull/2422) (@edwardalee)

**🔧 Fixes**

- Improvements in decentralized coordination [\#2394](https://github.com/lf-lang/lingua-franca/pull/2394) (@edwardalee)
- Prevent hanging on waiting for timeout time [\#2399](https://github.com/lf-lang/lingua-franca/pull/2399) (@edwardalee)
- Fix bank_index Parameter Override [\#2411](https://github.com/lf-lang/lingua-franca/pull/2411) (@Depetrol)
- Fix action is_present field not being reset [\#2409](https://github.com/lf-lang/lingua-franca/pull/2409) (@erlingrj)
- Informative error message for platforms that do not support federated [\#2414](https://github.com/lf-lang/lingua-franca/pull/2414) (@lhstrh)
- Corrected behavior of federated code generation under `--no-compile` flag [\#2415](https://github.com/lf-lang/lingua-franca/pull/2415) (@lhstrh)
- Fix disconnected port handling [\#2416](https://github.com/lf-lang/lingua-franca/pull/2416) (@edwardalee)
- Fixed parameterized mutable inputs [\#2420](https://github.com/lf-lang/lingua-franca/pull/2420) (@edwardalee)
- Fixed concurrency bug in action scheduling in C runtime [\#2423](https://github.com/lf-lang/lingua-franca/pull/2423) (@Depetrol)
- Fix windows [\#2424](https://github.com/lf-lang/lingua-franca/pull/2424) (@edwardalee)
- File extension of TypeScript launch script adjusted on Windows [\#2427](https://github.com/lf-lang/lingua-franca/pull/2427) (@petervdonovan)
- Modal multiport [\#2422](https://github.com/lf-lang/lingua-franca/pull/2422) (@edwardalee)
- No segfault when Python reactions fail [\#2428](https://github.com/lf-lang/lingua-franca/pull/2428) (@edwardalee)
- Fixed concurrency another bug in action scheduling in C runtime [\#2429](https://github.com/lf-lang/lingua-franca/pull/2429) (@Depetrol)


### Submodule [lf-lang/reactor-c](http://github.com/lf-lang/reactor-c)

**🚀 New Features**

- lf_sleep and lf_nanosleep added to lf_patmos_support [\#478](https://github.com/lf-lang/reactor-c/pull/478) (@EhsanKhodadad)

**✨ Enhancements**

- Prevent hanging on waiting for timeout time [\#477](https://github.com/lf-lang/reactor-c/pull/477) (@edwardalee)

**🔧 Fixes**

- Bugfixes in decentralized coordination [\#476](https://github.com/lf-lang/reactor-c/pull/476) (@edwardalee)
- Fix action is_present field not being reset [\#482](https://github.com/lf-lang/reactor-c/pull/482) (@erlingrj)
- Prevent a warning when the second timer event is after the timeout time. [\#487](https://github.com/lf-lang/reactor-c/pull/487) (@edwardalee)
- Fix Unintended Action Override [\#490](https://github.com/lf-lang/reactor-c/pull/490) (@Depetrol)
- Fix Unintended Action Override [\#491](https://github.com/lf-lang/reactor-c/pull/491) (@Depetrol)

**🚧 Maintenance and Refactoring**

- Fix compiler warnings in Zephyr and FlexPRET support files [\#479](https://github.com/lf-lang/reactor-c/pull/479) (@erlingrj)
- Improved formatting in Dockerfile [\#483](https://github.com/lf-lang/reactor-c/pull/483) (@lhstrh)
- Various fixes to silence warnings on Windows [\#486](https://github.com/lf-lang/reactor-c/pull/486) (@edwardalee)


### Submodule [lf-lang/reactor-cpp](http://github.com/lf-lang/reactor-cpp)

- Fix clang-tidy configuration and tidy up code [\#60](https://github.com/lf-lang/reactor-cpp/pull/60) (@cmnrd)

### Submodule [lf-lang/reactor-rs](http://github.com/lf-lang/reactor-rs)

- No Changes



## [v0.8.2](https://github.com/lf-lang/lingua-franca/tree/v0.8.2) (2024-08-02)

**Highlights**
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 @@ -232,7 +232,7 @@ public static boolean compatibleWithThreadingOff(TestCategory category) {

// CONCURRENT, FEDERATED, DOCKER_FEDERATED, DOCKER
// are not compatible with single-threaded execution.
// ARDUINO, ZEPHYR and FLEXPRET have their own test suites, so we don't need to rerun.
// ARDUINO, ZEPHYR, FLEXPRET, and PATMOS have their own test suites, so we don't need to rerun.
boolean excluded =
category == TestCategory.CONCURRENT
|| category == TestCategory.SERIALIZATION
Expand All @@ -245,7 +245,8 @@ public static boolean compatibleWithThreadingOff(TestCategory category) {
|| category == TestCategory.ZEPHYR_UNTHREADED
|| category == TestCategory.ZEPHYR_BOARDS
|| category == TestCategory.ZEPHYR_THREADED
|| category == TestCategory.FLEXPRET;
|| category == TestCategory.FLEXPRET
|| category == TestCategory.PATMOS;

// SERIALIZATION and TARGET tests are excluded on Windows.
excluded |= isWindows() && category == TestCategory.TARGET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private static boolean isExcludedFromCCpp(TestCategory category) {
excluded |= category == TestCategory.ZEPHYR_THREADED;
excluded |= category == TestCategory.ZEPHYR_BOARDS;
excluded |= category == TestCategory.ARDUINO;
excluded |= category == TestCategory.PATMOS;
excluded |= category == TestCategory.NO_INLINING;
excluded |= category == TestCategory.VERIFIER;
return !excluded;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*************
* Copyright (c) 2023, The University of California at Berkeley.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***************/
package org.lflang.tests.runtime;

import java.util.List;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.lflang.target.Target;
import org.lflang.tests.Configurators;
import org.lflang.tests.TestBase;
import org.lflang.tests.TestRegistry.TestCategory;
import org.lflang.tests.Transformers;

public class CPatmosTest extends TestBase {

public CPatmosTest() {
super(Target.C);
}

@Test
public void buildPatmosBasicTestsUnthreaded() {
Assumptions.assumeTrue(isLinux(), "Patmos tests only supported on Linux");
super.runTestsFor(
List.of(Target.C),
"Build basic tests for Patmos in single threaded mode.",
TestCategory.BASIC::equals,
Transformers::noChanges,
Configurators::makePatmosCompatibleUnthreaded,
TestLevel.BUILD,
false);
}
}
Loading

0 comments on commit f2f6310

Please sign in to comment.