forked from spagnuolocarmine/FLY-language
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
20,035 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Carmine Spagnuolo | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# FLY a Domain Specific Language for scientific computing on the Multi Cloud | ||
[](https://gitter.im/isislab-unisa/fly-language?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[](https://travis-ci.org/spagnuolocarmine/FLY-language)[](https://coveralls.io/github/spagnuolocarmine/FLY-language?branch=master) | ||
|
||
FLY is an open source Domain Specific Language for scientific computing on multi cloud exploiting FaaS. | ||
|
||
**_FLY_ allows the programmers to easily and immediatily exploit multi cloud environments for distributed computation.** | ||
|
||
## General Information | ||
|
||
FLY is designed as a scripting language that use as run-time environment, the local machine or a cloud infrastructure, the script automates the execution of tasks that could alternatively be executed one-by-one by a human operator. | ||
The goal of FLY is to provide a portable, scalable and easy-to-use programming environment for scientific computing. FLY perceives a cloud computing infrastructure as a parallel computing architecture on which it is possible to execute some parts of its execution flow in parallel. FLY enables the users (domain experts with limited knowledge about complex parallel and distributed systems) to design their applications exploiting data and task parallelism on any FaaS architecture. | ||
This is achieved by a rich language that provides domain-specific constructs, that enables the users to easily interact, using an environment abstraction, with different FaaS backends. | ||
|
||
FLY is written using Xtext a framework for development of programming languages and domain-specific languages. FLY code is transformed in pure Java code that you can run on a Java Virtual Machine. | ||
|
||
(under costruction) | ||
|
||
## Getting Started | ||
|
||
FLY is a parallel work-flow scripting imperative language inspired by functional languages peculiarities. FLY has a statically checked type system; variable declaration does not require their type, types are automatically inferred when a variable is firstly assigned, thereafter that variable cannot change its type during the program execution. | ||
FLY enables run-time type casts as in Java or C\#; programmers do not have to take care about variable types except for some particular cases. FLY supports inter-process (and inter-FLY-functions) communications using channels according to communicating sequential processes (CSP) definition. The FLY syntax and concepts are inspired by different languages such as Java, JavaScript, Python, and R. This ensures familiarity with most powerful and famous general purposes/data science languages. | ||
|
||
FLY provides standard scripting language constructs: expressions, relational expressions, boolean operations as well as code comments as in Java. Moreover, FLY provides several domain specific constructs for parallel/distributed task/data based parallelism. | ||
|
||
The following listing shows a simple example of a FLY program, which computes a PI estimation through the Montecarlo Method on an Amazon AWS Lambda backend. Briefly, the PI Monte Carlo estimation algorithm generates a set of random points on a two dimensional Cartesian systems, and counts the number of points that are inside the positive quadrant of a circle of diameter 1.0 centered in the origin point. Given the sum of points, it computes the estimation of PI as S*4.0/NN, where S is the number of points inside the positive quadrant of the circle and N is the total number of generated random points. | ||
|
||
``` | ||
env aws = [type:"aws",access_key:"amazon_aws_access_key", secret_key:"amazon_aws_secret_key", region:"us-east-2"] | ||
channel ch on aws | ||
func hit(){ | ||
random r | ||
var x = r.nextDouble() | ||
var y = r.nextDouble() | ||
var msg=0 | ||
if( (x*x)+(y*y) < 1.0 ){ msg=1 } | ||
ch!msg | ||
} | ||
func estimation(){ | ||
var sum = 0 | ||
var crt = 0 | ||
for i in [0:10000] { | ||
sum += ch? as Integer | ||
crt += 1 | ||
} | ||
println "PI approximation is "+ (sum*4.0)/crt | ||
} | ||
fly hit in [0:10000] on aws thenall estimation | ||
``` | ||
|
||
(under costruction) | ||
|
||
## FLY Compiler | ||
----------------------------------------------------------------------------------------------------------- | ||
|
||
### Requirements | ||
|
||
- Jaava 8 (or grater) | ||
- Eclipse IDE | ||
- Xtext (www.eclipse.org/Xtext) | ||
|
||
### Build Instructions | ||
|
||
(under costruction) | ||
|
||
## FLY Programming | ||
------------------------------------------------------------------------------------------------------------- | ||
|
||
### Requirements | ||
|
||
- Ubuntu or OSX OS | ||
- Java 8 (or greater) | ||
- Apache Maven 3 or greater) | ||
- Amazon AWS CLI and SDK | ||
|
||
### Compile your FLY program | ||
|
||
(under costruction) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
.recommenders | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# PyDev specific (Python IDE for Eclipse) | ||
*.pydevproject | ||
|
||
# CDT-specific (C/C++ Development Tooling) | ||
.cproject | ||
|
||
# CDT- autotools | ||
.autotools | ||
|
||
# Java annotation processor (APT) | ||
.actorypath | ||
|
||
# PDT-specific (PHP Development Tools) | ||
.buildpath | ||
|
||
# sbteclipse plugin | ||
.target | ||
|
||
# Tern plugin | ||
.tern-project | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
/.metadata/ | ||
|
||
# Generated files | ||
.project | ||
.settings | ||
bin | ||
build | ||
target | ||
src-gen | ||
emf-gen | ||
generated | ||
xtext-gen | ||
xtend-gen | ||
plugin.xml_gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Supported language definitions | ||
|
||
- X | ||
- X | ||
|
||
### Unsupported language definitions |
1 change: 1 addition & 0 deletions
1
compiler/org.xtext.FLY.parent/org.xtext.FLY.feature/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin.includes = feature.xml |
23 changes: 23 additions & 0 deletions
23
compiler/org.xtext.FLY.parent/org.xtext.FLY.feature/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature id="org.xtext.FLY.feature" | ||
label="FLY Feature " | ||
version="1.0.0.qualifier"> | ||
<plugin | ||
id="org.xtext.FLY" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
<plugin | ||
id="org.xtext.FLY.ide" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
<plugin | ||
id="org.xtext.FLY.ui" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
</feature> |
15 changes: 15 additions & 0 deletions
15
compiler/org.xtext.FLY.parent/org.xtext.FLY.feature/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.xtext.FLY</groupId> | ||
<artifactId>org.xtext.FLY.parent</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>org.xtext.FLY.feature</artifactId> | ||
<packaging>eclipse-feature</packaging> | ||
|
||
|
||
<dependencies> | ||
</dependencies> | ||
</project> |
15 changes: 15 additions & 0 deletions
15
compiler/org.xtext.FLY.parent/org.xtext.FLY.ide/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Manifest-Version: 1.0 | ||
Automatic-Module-Name: org.xtext.FLY.ide | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: org.xtext.FLY.ide | ||
Bundle-Vendor: My Company | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-SymbolicName: org.xtext.FLY.ide; singleton:=true | ||
Bundle-ActivationPolicy: lazy | ||
Require-Bundle: org.xtext.FLY, | ||
org.eclipse.xtext.ide, | ||
org.eclipse.xtext.xbase.ide, | ||
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Export-Package: org.xtext.ide.contentassist.antlr, | ||
org.xtext.ide.contentassist.antlr.internal |
6 changes: 6 additions & 0 deletions
6
compiler/org.xtext.FLY.parent/org.xtext.FLY.ide/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/,\ | ||
src-gen/,\ | ||
xtend-gen/ | ||
bin.includes = .,\ | ||
META-INF/ | ||
bin.excludes = **/*.xtend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.xtext.FLY</groupId> | ||
<artifactId>org.xtext.FLY.parent</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>org.xtext.FLY.ide</artifactId> | ||
<packaging>eclipse-plugin</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.xtend</groupId> | ||
<artifactId>xtend-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
11 changes: 11 additions & 0 deletions
11
compiler/org.xtext.FLY.parent/org.xtext.FLY.ide/src/org/xtext/ide/FLYIdeModule.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* generated by Xtext 2.16.0 | ||
*/ | ||
package org.xtext.ide | ||
|
||
|
||
/** | ||
* Use this class to register ide components. | ||
*/ | ||
class FLYIdeModule extends AbstractFLYIdeModule { | ||
} |
20 changes: 20 additions & 0 deletions
20
compiler/org.xtext.FLY.parent/org.xtext.FLY.ide/src/org/xtext/ide/FLYIdeSetup.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* generated by Xtext 2.16.0 | ||
*/ | ||
package org.xtext.ide | ||
|
||
import com.google.inject.Guice | ||
import org.eclipse.xtext.util.Modules2 | ||
import org.xtext.FLYRuntimeModule | ||
import org.xtext.FLYStandaloneSetup | ||
|
||
/** | ||
* Initialization support for running Xtext languages as language servers. | ||
*/ | ||
class FLYIdeSetup extends FLYStandaloneSetup { | ||
|
||
override createInjector() { | ||
Guice.createInjector(Modules2.mixin(new FLYRuntimeModule, new FLYIdeModule)) | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
compiler/org.xtext.FLY.parent/org.xtext.FLY.repository/category.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<site> | ||
<feature id="org.xtext.FLY.feature" version="0.0.0"> | ||
<category name="main"/> | ||
</feature> | ||
<feature id="org.xtext.FLY.feature.source" version="0.0.0"> | ||
<category name="main.source"/> | ||
</feature> | ||
<category-def name="main" label="FLY"/> | ||
<category-def name="main.source" label="FLY (Sources)"/> | ||
</site> |
51 changes: 51 additions & 0 deletions
51
compiler/org.xtext.FLY.parent/org.xtext.FLY.repository/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.xtext.FLY</groupId> | ||
<artifactId>org.xtext.FLY.parent</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>org.xtext.FLY.repository</artifactId> | ||
<packaging>eclipse-repository</packaging> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.m2e</groupId> | ||
<artifactId>lifecycle-mapping</artifactId> | ||
<version>1.0.0</version> | ||
<configuration> | ||
<lifecycleMappingMetadata> | ||
<pluginExecutions> | ||
<pluginExecution> | ||
<pluginExecutionFilter> | ||
<groupId> | ||
org.apache.maven.plugins | ||
</groupId> | ||
<artifactId> | ||
maven-clean-plugin | ||
</artifactId> | ||
<versionRange> | ||
[2.5,) | ||
</versionRange> | ||
<goals> | ||
<goal>clean</goal> | ||
</goals> | ||
</pluginExecutionFilter> | ||
<action> | ||
<ignore></ignore> | ||
</action> | ||
</pluginExecution> | ||
</pluginExecutions> | ||
</lifecycleMappingMetadata> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
<dependencies> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.