diff --git a/.gitignore b/.gitignore
index 4451fb7..40974c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,17 @@
-/target
-/bin
-/.classpath
-/.settings
-/.project
+.eunit
+deps
+*.o
+*.beam
+*.plt
+erl_crash.dump
+ebin
+rel/example_project
+.concrete/DEV_MODE
+.rebar
*~
-
-*.iml
-.idea
-/conf/**
\ No newline at end of file
+src/cf_scan.erl
+src/cf_parse.erl
+src/cf_prescan.erl
+doc
+_build
+rebar.lock
diff --git a/.travis.yml b/.travis.yml
index f1b285a..925969f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
-language: java
-jdk:
- - oraclejdk8
- - oraclejdk7
- - openjdk7
-
+language: erlang
+otp_release:
+# - 18.3
+ - 18.2.1
+ - 18.2
+ - 18.1
+ - 18.0
diff --git a/CITATION b/CITATION
new file mode 100644
index 0000000..c7a9c3d
--- /dev/null
+++ b/CITATION
@@ -0,0 +1,15 @@
+@InProceedings{Brandt2015,
+ Title = {Cuneiform: A Functional Language for Large Scale Scientific Data Analysis},
+ Author = {Brandt, J{\"o}rgen and Bux, Marc and Leser, Ulf},
+ Booktitle = {Proceedings of the Workshops of the EDBT/ICDT},
+ Year = {2015},
+
+ Address = {Brussels, Belgium},
+ Month = {March},
+ Pages = {17--26},
+ Volume = {1330},
+
+ Abstract = {The need to analyze massive scientific data sets on the one hand and the availability of distributed compute resources with an increasing number of CPU cores on the other hand have promoted the development of a variety of languages and systems for parallel, distributed data analysis. Among them are data-parallel query languages such as Pig Latin or Spark as well as scientific workflow languages such as Swift or Pegasus DAX. While data-parallel query languages focus on the exploitation of data parallelism, scientific workflow languages focus on the integration of external tools and libraries. However, a language that combines easy integration of arbitrary tools, treated as black boxes, with the ability to fully exploit data parallelism does not exist yet. Here, we present Cuneiform, a novel language for large-scale scientific data analysis. We highlight its functionality with respect to a set of desirable features for such languages, introduce its syntax and semantics by example, and show its flexibility and conciseness with use cases, including a complex real-life workflow from the area of genome research. Cuneiform scripts are executed dynamically on the workflow execution platform Hi-WAY which is based on Hadoop YARN. The language Cuneiform, including tool support for programming, workflow visualization, debugging, logging, and provenance-tracing, and the parallel execution engine Hi-WAY are fully implemented.},
+ Doi = {10.13140/RG.2.1.3547.6561},
+ Url = {http://ceur-ws.org/Vol-1330/paper-03.pdf}
+}
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c8b2e97
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+PWD=$(shell pwd)
+
+all: compile
+
+install: compile
+ ln -sf $(PWD)/_build/default/bin/cuneiform /usr/local/bin/cuneiform
+
+compile:
+ rebar3 escriptize
+
+dev:
+ rebar3 do escriptize, eunit, dialyzer, cover, edoc
+
+clean:
+ rm -rf .rebar
+ rm -rf _build
+ rm -rf doc
+ rm -f rebar.lock
+
diff --git a/cuneiform-addons/.gitignore b/cuneiform-addons/.gitignore
deleted file mode 100644
index 6afedc5..0000000
--- a/cuneiform-addons/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/target
-/bin
-/.classpath
-/.settings
-/.project
diff --git a/cuneiform-addons/cuneiform-cfide/.gitignore b/cuneiform-addons/cuneiform-cfide/.gitignore
deleted file mode 100644
index 6afedc5..0000000
--- a/cuneiform-addons/cuneiform-cfide/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/target
-/bin
-/.classpath
-/.settings
-/.project
diff --git a/cuneiform-addons/cuneiform-cfide/pom.xml b/cuneiform-addons/cuneiform-cfide/pom.xml
deleted file mode 100644
index a5fb9e7..0000000
--- a/cuneiform-addons/cuneiform-cfide/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
- 4.0.0
-
- de.hu-berlin.wbi.cuneiform
- cuneiform-addons
- 2.0.4-RELEASE
-
- cuneiform-cfide
- cuneiform-cfide
-
-
-
- de.hu-berlin.wbi.cuneiform
- cuneiform-core
- ${project.version}
-
-
- de.hu-berlin.wbi.cuneiform
- cuneiform-starlinger
- ${project.version}
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.4
-
-
- attach-sources
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.3
-
-
- attach-javadocs
-
- jar
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/DarkStyleConf.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/DarkStyleConf.java
deleted file mode 100644
index 519a807..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/DarkStyleConf.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.Color;
-
-public class DarkStyleConf extends StyleConf {
-
- public DarkStyleConf() {
- setCommentStyle( SimpleStyle.createPlainStyle( new Color( 100, 200, 255 ) ) );
- setCallStyle( SimpleStyle.createItStyle() );
- setApplyStyle( SimpleStyle.createUlStyle() );
- setVarnameStyle( SimpleStyle.createPlainStyle( new Color( 100, 180, 140 ) ) );
- setStatStyle( SimpleStyle.createPlainStyle( Color.WHITE ) );
- setKeywordStyle( SimpleStyle.createBfStyle() );
- setDataStyle( SimpleStyle.createPlainStyle( new Color( 255, 255, 150 ) ) );
- setTypeStyle( SimpleStyle.createPlainStyle( new Color( 200, 255, 200 ) ) );
- setForeignStyle( SimpleStyle.createPlainStyle( Color.LIGHT_GRAY ) );
- }
-
- @Override
- public Color getBackgroundColor() {
- return new Color( 0, 10, 30 );
- }
-
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/EditPanel.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/EditPanel.java
deleted file mode 100644
index 83cfcd7..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/EditPanel.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.io.File;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JTable;
-import javax.swing.event.CaretEvent;
-import javax.swing.event.CaretListener;
-import javax.swing.text.Element;
-
-public class EditPanel extends SyntaxPanel implements KeyListener, CaretListener {
-
- private static final long serialVersionUID = -7538677478512722934L;
- private static final String TITLE_UNSAVED = "Unsaved*";
-
- private JLabel posLabel;
- private ErrorTableModel errorTableModel;
- private File file;
- private String originalContent;
- private MainPanel mainPanel;
-
- public EditPanel( MainPanel mainPanel ) {
- this( mainPanel, null, "" );
- }
-
- public EditPanel( MainPanel mainPanel, File file, String content ) {
-
- JTable errorTable;
- JPanel posPanel;
- StaticPanel staticPanel;
- ExecutorService es;
- JScrollPane errorPane;
- JSplitPane editErrorSplitPane, editStaticPane;
- Component original;
-
- setMainPanel( mainPanel );
- setFile( file, content );
- setText( content );
-
- original = getComponent( 0 );
- remove( original );
-
- addKeyListener( this );
- addCaretListener( this );
- setEditable( true );
-
- // error table
- errorTableModel = new ErrorTableModel();
- errorTable = new JTable( errorTableModel );
- errorTable.getColumnModel().getColumn( 0 ).setMaxWidth( 60 );
- errorTable.getColumnModel().getColumn( 1 ).setMaxWidth( 60 );
- errorTable.getColumnModel().getColumn( 3 ).setMaxWidth( 60 );
-
- // caret position label
- posLabel = new JLabel( "1 : 1" );
-
- posPanel = new JPanel();
- posPanel.setLayout( new BoxLayout( posPanel, BoxLayout.X_AXIS ) );
- posPanel.add( Box.createHorizontalGlue() );
- posPanel.add( posLabel );
-
- add( posPanel, BorderLayout.SOUTH );
-
- staticPanel = new StaticPanel( this, errorTableModel );
- es = Executors.newSingleThreadExecutor();
- es.submit( staticPanel );
- es.shutdown();
-
- editStaticPane = new JSplitPane(
- JSplitPane.HORIZONTAL_SPLIT, staticPanel, original );
- editStaticPane.setDividerLocation( 450 );
- editStaticPane.setResizeWeight( 0 );
- editStaticPane.setOneTouchExpandable( true );
-
- errorPane = new JScrollPane( errorTable );
- errorPane.setBorder( BorderFactory.createTitledBorder( "Errors" ) );
- editErrorSplitPane = new JSplitPane(
- JSplitPane.VERTICAL_SPLIT,
- errorPane,
- editStaticPane );
- editErrorSplitPane.setDividerLocation( 100 );
- editErrorSplitPane.setResizeWeight( 0 );
- editErrorSplitPane.setOneTouchExpandable( true );
-
- add( editErrorSplitPane, BorderLayout.CENTER );
- }
-
- @Override
- public void caretUpdate( CaretEvent arg0 ) {
-
- int line, pos, col;
- Element root;
-
- if( posLabel == null )
- return;
-
- pos = getCaretPosition();
- root = getDocument().getDefaultRootElement();
-
- for( line = 0; line < root.getElementCount(); line++ )
- if( root.getElement( line ).getStartOffset() > pos )
- break;
-
- col = pos-root.getElement( line-1 ).getStartOffset()+1;
-
- posLabel.setText( line+" : "+col );
- }
-
- public ErrorTableModel getErrorTableModel() {
- return errorTableModel;
- }
-
- public File getFile() {
- return file;
- }
-
- public String getTitle() {
-
- String title;
-
- if( file == null )
- return TITLE_UNSAVED;
-
- title = file.getName();
-
- if( hasChanged() )
- title += "*";
-
- return title;
- }
-
- public boolean hasChanged() {
- return !originalContent.equals( getText() );
- }
-
- public boolean hasFile() {
- return file != null;
- }
-
- @Override
- public void keyPressed( KeyEvent arg0 ) {}
-
- @Override
- public void keyReleased( KeyEvent arg0 ) {
- SyntaxListener.process( getEditPane(), sc );
- mainPanel.updateSelectedEditPanelTitle();
- }
-
- @Override
- public void keyTyped( KeyEvent arg0 ) {}
-
- public void revert() {
- setText( originalContent );
- }
-
- public void setFile( File file, String content ) {
-
- if( content == null )
- throw new NullPointerException( "Original content must not be null." );
-
- this.file = file;
- originalContent = content;
- }
-
- public void setMainPanel( MainPanel mainPanel ) {
-
- if( mainPanel == null )
- throw new NullPointerException( "Main panel must not be null." );
-
- this.mainPanel = mainPanel;
- }
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/ErrorTableModel.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/ErrorTableModel.java
deleted file mode 100644
index 126cd42..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/ErrorTableModel.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.swing.table.AbstractTableModel;
-
-import de.huberlin.wbi.cuneiform.core.preprocess.ParseException;
-
-
-public class ErrorTableModel extends AbstractTableModel {
-
- private static final long serialVersionUID = -5752707318286728959L;
- private List errorList;
-
- public ErrorTableModel() {
- errorList = new LinkedList<>();
- }
-
- public void clear() {
- errorList.clear();
- }
-
- public void add( ParseException entry ) {
-
- if( entry == null )
- throw new NullPointerException( "Error entry must not be null." );
-
- errorList.add( entry );
- }
-
- @Override
- public int getColumnCount() {
- return 5;
- }
-
- @Override
- public Object getValueAt( int rowIndex, int columnIndex ) {
-
- ParseException entry;
-
- entry = errorList.get( rowIndex );
-
- switch( columnIndex ) {
- case 0 : return entry.hasLine() ? entry.getLine() : "";
- case 1 : return entry.hasCharPositionInLine() ? entry.getCharPositionInLine() : "";
- case 2 : return entry.hasNear() ? entry.getNear() : "";
- case 3 : return "Error";
- case 4 : return entry.getMessage();
- default :
- throw new UnsupportedOperationException(
- "Invalid column." );
- }
- }
-
- @Override
- public int getRowCount() {
- return errorList.size();
- }
-
- @Override
- public String getColumnName( int columnIndex ) {
-
- switch( columnIndex ) {
- case 0 : return "Line";
- case 1 : return "Column";
- case 2 : return "Near";
- case 3 : return "Level";
- case 4 : return "Message";
- default : throw new UnsupportedOperationException( "Invalid column." );
- }
- }
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/LightStyleConf.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/LightStyleConf.java
deleted file mode 100644
index 36b3b5a..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/LightStyleConf.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.Color;
-
-public class LightStyleConf extends StyleConf {
-
- public LightStyleConf() {
- setCommentStyle( SimpleStyle.createPlainStyle( new Color( 0, 100, 155 ) ) );
- setCallStyle( SimpleStyle.createItStyle() );
- setApplyStyle( SimpleStyle.createUlStyle() );
- setVarnameStyle( SimpleStyle.createPlainStyle( new Color( 0, 80, 40 ) ) );
- setStatStyle( SimpleStyle.createPlainStyle( Color.BLACK ) );
- setKeywordStyle( SimpleStyle.createBfStyle() );
- setDataStyle( SimpleStyle.createPlainStyle( new Color( 100, 100, 0 ) ) );
- setTypeStyle( SimpleStyle.createPlainStyle( new Color( 70, 125, 70 ) ) );
- setForeignStyle( SimpleStyle.createPlainStyle( Color.DARK_GRAY ) );
- }
-
- @Override
- public Color getBackgroundColor() {
- return Color.WHITE;
- }
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/MainPanel.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/MainPanel.java
deleted file mode 100644
index bc577fc..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/MainPanel.java
+++ /dev/null
@@ -1,466 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Event;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTabbedPane;
-import javax.swing.KeyStroke;
-
-import de.huberlin.wbi.cuneiform.core.repl.BaseRepl;
-
-public class MainPanel extends JPanel implements ActionListener, WindowListener {
-
- private static final long serialVersionUID = -8425834761771677470L;
-
- private static final String LABEL_NEW = "New";
- private static final String LABEL_OPEN = "Open ...";
- private static final String LABEL_CLOSE = "Close";
- private static final String LABEL_SAVE = "Save";
- private static final String LABEL_SAVEAS = "Save as ...";
- private static final String LABEL_QUIT = "Quit";
- private static final String LABEL_ABOUT = "About ...";
- private static final String LABEL_REVERT = "Revert";
-
- private JTabbedPane editTabbedPane;
- private JFileChooser fc;
- private JFrame parent;
- private JMenuItem saveItem, closeItem, saveAsItem, revertItem;
-
- public MainPanel( JFrame parentFrame ) {
-
- setParent( parentFrame );
- setLayout( new BorderLayout() );
-
- fc = new JFileChooser();
- editTabbedPane = new JTabbedPane();
-
-
- add( editTabbedPane );
- }
-
- @Override
- public void actionPerformed( ActionEvent arg0 ) {
-
- int returnVal;
- File f;
- String ac;
- EditPanel editPanel;
-
-
- ac = arg0.getActionCommand();
-
- if( ac.equals( LABEL_REVERT ) ) {
-
- editPanel = ( EditPanel )editTabbedPane.getSelectedComponent();
-
- if( !editPanel.hasChanged() )
- return;
-
- returnVal = JOptionPane.showConfirmDialog( parent, "Unsaved changes will be lost.\nAre you sure?", "Revert "+editPanel.getTitle(), JOptionPane.YES_NO_OPTION );
-
- if( returnVal == JOptionPane.NO_OPTION )
- return;
-
- editPanel.revert();
- updateSelectedEditPanelTitle();
-
- return;
- }
-
- if( ac.equals( LABEL_ABOUT ) ) {
-
- JOptionPane.showMessageDialog( parent, "Cuneiform Editor\nversion "+BaseRepl.LABEL_VERSION+" build "+BaseRepl.LABEL_BUILD+"\nJörgen Brandt", "About Cuneiform Editor", JOptionPane.INFORMATION_MESSAGE );
-
- return;
- }
-
- if( ac.equals( LABEL_NEW ) ) {
-
- editPanel = new EditPanel( this );
- editTabbedPane.add( editPanel.getTitle(), editPanel );
- editTabbedPane.setSelectedComponent( editPanel );
- updateMenu();
-
- return;
- }
-
- if( ac.equals( LABEL_OPEN ) ) {
-
- returnVal = fc.showOpenDialog( parent );
-
- if( returnVal == JFileChooser.APPROVE_OPTION ) {
-
- f = fc.getSelectedFile();
- open( f );
- }
-
- return;
- }
-
- if( ac.equals( LABEL_CLOSE ) ) {
-
- editPanel = ( EditPanel )editTabbedPane.getSelectedComponent();
-
- if( editPanel.hasChanged() ) {
-
-
- if( editPanel.hasFile() ) {
-
- returnVal = JOptionPane.showConfirmDialog( parent,
- "Save changes in "+editPanel.getFile().getName()+"?",
- "Save changes",
- JOptionPane.YES_NO_CANCEL_OPTION );
-
- if( returnVal == JOptionPane.OK_OPTION )
- saveAction( editPanel.getFile() );
- }
- else {
-
- returnVal = JOptionPane.showConfirmDialog( parent,
- "Save changes in unsaved file?",
- "Save changes",
- JOptionPane.YES_NO_CANCEL_OPTION );
-
- if( returnVal == JOptionPane.OK_OPTION ) {
-
- returnVal = saveAsAction();
-
- if( returnVal == JFileChooser.CANCEL_OPTION )
- return;
- }
- else
- if( returnVal == JOptionPane.CANCEL_OPTION )
- return;
-
-
- }
-
- if( returnVal == JOptionPane.CANCEL_OPTION )
- return;
- }
-
-
- editTabbedPane.remove( editTabbedPane.getSelectedComponent() );
- updateMenu();
-
- return;
- }
-
- if( ac.equals( LABEL_SAVE ) ) {
-
- editPanel = ( EditPanel )editTabbedPane.getSelectedComponent();
-
- if( !editPanel.hasChanged() )
- return;
-
- if( editPanel.hasFile() ) {
-
- saveAction( editPanel.getFile() );
- return;
- }
-
- saveAsAction();
-
- return;
- }
-
- if( ac.equals( LABEL_SAVEAS ) ) {
-
- saveAsAction();
- return;
- }
-
- if( ac.equals( LABEL_QUIT ) ) {
- quitAction();
- return;
- }
-
- throw new RuntimeException( "Action not recognized: '"+arg0.getActionCommand()+"'." );
- }
-
- public JMenuBar getMenuBar() {
-
- JMenuBar menuBar;
- JMenu menu;
- JMenuItem menuItem;
-
- menuBar = new JMenuBar();
-
- menu = new JMenu( "File" );
- menuBar.add( menu );
-
- menuItem = new JMenuItem( LABEL_NEW );
- menuItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_N, Event.CTRL_MASK ) );
- menuItem.addActionListener( this );
- menu.add( menuItem );
-
- menuItem = new JMenuItem( LABEL_OPEN );
- menuItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_O, Event.CTRL_MASK ) );
- menuItem.addActionListener( this );
- menu.add( menuItem );
-
- menu.addSeparator();
-
- saveItem = new JMenuItem( LABEL_SAVE );
- saveItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_S, Event.CTRL_MASK ) );
- saveItem.setEnabled( false );
- saveItem.addActionListener( this );
- menu.add( saveItem );
-
- saveAsItem = new JMenuItem( LABEL_SAVEAS );
- saveAsItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_S, Event.CTRL_MASK | Event.SHIFT_MASK ) );
- saveAsItem.setEnabled( false );
- saveAsItem.addActionListener( this );
- menu.add( saveAsItem );
-
- revertItem = new JMenuItem( LABEL_REVERT );
- revertItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_R, Event.CTRL_MASK ) );
- revertItem.setEnabled( false );
- revertItem.addActionListener( this );
- menu.add( revertItem );
-
- menu.addSeparator();
-
- closeItem = new JMenuItem( LABEL_CLOSE );
- closeItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_W, Event.CTRL_MASK ) );
- closeItem.setEnabled( false );
- closeItem.addActionListener( this );
- menu.add( closeItem );
-
-
- menuItem = new JMenuItem( LABEL_QUIT );
- menuItem.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_Q, Event.CTRL_MASK ) );
- menuItem.addActionListener( this );
- menu.add( menuItem );
-
- menu = new JMenu( "Help" );
- menuBar.add( menu );
-
- menuItem = new JMenuItem( LABEL_ABOUT );
- menuItem.addActionListener( this );
- menu.add( menuItem );
-
- return menuBar;
-
- }
-
- public void setParent( JFrame parent ) {
-
- if( parent == null )
- throw new NullPointerException( "Parent frame must not be null." );
-
- this.parent = parent;
- }
-
- public void updateSelectedEditPanelTitle() {
-
- int i;
- EditPanel editPanel;
-
- i = editTabbedPane.getSelectedIndex();
- editPanel = ( EditPanel )editTabbedPane.getComponent( i );
- editTabbedPane.setTitleAt( i, editPanel.getTitle() );
- }
-
- public void updateMenu() {
-
- boolean enabled;
-
-
- enabled = editTabbedPane.getComponentCount() > 0;
-
- saveItem.setEnabled( enabled );
- saveAsItem.setEnabled( enabled );
- closeItem.setEnabled( enabled );
- revertItem.setEnabled( enabled );
-
- }
-
-
- public void open( File f ) {
-
- EditPanel editPanel;
- StringBuffer buf;
- String line;
-
-
- try( BufferedReader reader = new BufferedReader( new FileReader( f ) ) ) {
-
- buf = new StringBuffer();
-
- while( ( line = reader.readLine() ) != null )
- buf.append( line ).append( '\n' );
-
- editPanel = new EditPanel( this, f, buf.toString() );
- editTabbedPane.add( f.getName(), editPanel );
- editTabbedPane.setSelectedComponent( editPanel );
- updateMenu();
- }
- catch( IOException e ) {
- JOptionPane.showMessageDialog( parent,
- e.getMessage(),
- "IOException",
- JOptionPane.ERROR_MESSAGE );
- }
- }
-
- @Override
- public void windowOpened( WindowEvent e ) {}
-
- @Override
- public void windowClosing( WindowEvent e ) {
- quitAction();
- }
-
- @Override
- public void windowClosed( WindowEvent e ) {}
-
- @Override
- public void windowIconified( WindowEvent e ) {}
-
- @Override
- public void windowDeiconified( WindowEvent e ) {}
-
- @Override
- public void windowActivated( WindowEvent e ) {}
-
- @Override
- public void windowDeactivated( WindowEvent e ) {}
-
- private int saveAsAction() {
-
- int returnVal;
-
- returnVal = fc.showSaveDialog( parent );
-
- if( returnVal == JFileChooser.APPROVE_OPTION ) {
- saveAction( fc.getSelectedFile() );
- }
-
- return returnVal;
- }
-
- private void saveAction( File f ) {
-
- EditPanel editPanel;
-
- editPanel = ( EditPanel )editTabbedPane.getSelectedComponent();
-
- try( BufferedWriter writer = new BufferedWriter( new FileWriter( f ) ) ) {
-
- writer.write( editPanel.getText() );
- editPanel.setFile( f, editPanel.getText() );
- updateSelectedEditPanelTitle();
-
- }
- catch( IOException e ) {
- JOptionPane.showMessageDialog( parent,
- e.getMessage(),
- "IOException",
- JOptionPane.ERROR_MESSAGE );
- }
-
- }
-
- private void quitAction() {
-
- EditPanel editPanel;
- int option;
- int dialogOption;
-
- for( Component c : editTabbedPane.getComponents() ) {
-
- editPanel = ( EditPanel )c;
- if( editPanel.hasChanged() ) {
-
- editTabbedPane.setSelectedComponent( editPanel );
-
- if( editPanel.hasFile() ) {
-
- option = JOptionPane.showConfirmDialog( parent,
- "Save changes in "+editPanel.getFile().getName()+"?",
- "Save changes",
- JOptionPane.YES_NO_CANCEL_OPTION );
-
- if( option == JOptionPane.OK_OPTION )
- saveAction( editPanel.getFile() );
- }
- else {
-
- option = JOptionPane.showConfirmDialog( parent,
- "Save changes in unsaved file?",
- "Save changes",
- JOptionPane.YES_NO_CANCEL_OPTION );
-
- dialogOption = JFileChooser.APPROVE_OPTION;
-
- if( option == JOptionPane.OK_OPTION )
- dialogOption = saveAsAction();
-
- if( dialogOption == JFileChooser.CANCEL_OPTION )
- return;
-
-
- }
-
- if( option == JOptionPane.CANCEL_OPTION )
- return;
- }
- }
-
- System.exit( 0 );
- }
-
-
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SimpleStyle.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SimpleStyle.java
deleted file mode 100644
index 015f443..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SimpleStyle.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.Color;
-
-import javax.swing.text.Style;
-import javax.swing.text.StyleConstants;
-import javax.swing.text.StyledDocument;
-
-
-public class SimpleStyle {
-
- private Boolean it;
- private Boolean ul;
- private Boolean bf;
- private Color col;
-
- public SimpleStyle( Color col, Boolean it, Boolean bf, Boolean ul ) {
-
- setIt( it );
- setUl( ul );
- setBf( bf );
- setColor( col );
- }
-
- public void setIt( Boolean it ) {
- this.it = it;
- }
-
- public void setUl( Boolean ul ) {
- this.ul = ul;
- }
-
- public void setBf( Boolean bf ) {
- this.bf = bf;
- }
-
- public void setColor( Color col ) {
- this.col = col;
- }
-
- public void setColor( int r, int g, int b ) {
- col = new Color( r, g, b );
- }
-
- public void addStyleToDoc( StyledDocument doc, String key ) {
-
- Style style;
-
- style = doc.addStyle( key, null );
-
- if( ul != null )
- StyleConstants.setUnderline( style, ul );
-
- if( bf != null )
- StyleConstants.setBold( style, bf );
-
- if( it != null )
- StyleConstants.setItalic( style, it );
-
- if( col != null )
- StyleConstants.setForeground( style, col );
- }
-
- public static SimpleStyle createItStyle( Color c ) {
- return new SimpleStyle( c, true, null, null );
- }
-
- public static SimpleStyle createItStyle() {
- return new SimpleStyle( null, true, null, null );
- }
-
- public static SimpleStyle createBfStyle() {
- return new SimpleStyle( null, null, true, null );
- }
-
- public static SimpleStyle createUlStyle() {
- return new SimpleStyle( null, null, null, true );
- }
-
- public static SimpleStyle createPlainStyle( Color c ) {
- return new SimpleStyle( c, null, null, null );
- }
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/StaticPanel.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/StaticPanel.java
deleted file mode 100644
index d5aa13b..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/StaticPanel.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.BorderLayout;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import javax.imageio.ImageIO;
-import javax.swing.BorderFactory;
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTabbedPane;
-import javax.swing.JTextPane;
-
-import de.huberlin.wbi.cuneiform.core.preprocess.ChannelListener;
-import de.huberlin.wbi.cuneiform.core.preprocess.ParseException;
-import de.huberlin.wbi.cuneiform.core.preprocess.PreListener;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.CompoundExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.CfSemanticModelVisitor;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.HasFailedException;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.NotBoundException;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.TopLevelContext;
-import de.huberlin.wbi.cuneiform.core.staticreduction.DotNodeVisitor;
-import de.huberlin.wbi.cuneiform.core.staticreduction.StaticNodeVisitor;
-import de.huberlin.wbi.cuneiform.starlinger.StarlingerNodeVisitor;
-
-
-public class StaticPanel extends JPanel implements Runnable {
-
- private static final long serialVersionUID = -5302001074704951699L;
-
- private SyntaxPanel channelPanel, reductionPanel, prePanel, modelPanel;
-
- private JLabel dagLabel;
- private JTextPane dotPane, starlingerPane;
- private SyntaxPanel srcPane;
- private ErrorTableModel errorTableModel;
- private int hash;
-
- public StaticPanel( SyntaxPanel srcPane, ErrorTableModel errorTableModel ) {
-
- JTabbedPane tabbedPane;
- JPanel panel;
-
- setSrcPane( srcPane );
- setErrorTableModel( errorTableModel );
-
- setLayout( new BorderLayout() );
-
-
- tabbedPane = new JTabbedPane();
- tabbedPane.setBorder( BorderFactory.createTitledBorder( "Static info" ) );
- add( tabbedPane, BorderLayout.CENTER );
-
- prePanel = new SyntaxPanel();
- tabbedPane.addTab( "(i) Pre", prePanel );
-
- channelPanel = new SyntaxPanel();
- tabbedPane.addTab( "(ii) Channel", channelPanel );
-
- modelPanel = new SyntaxPanel();
- tabbedPane.addTab( "(iii) Model", modelPanel );
-
- reductionPanel = new SyntaxPanel();
- tabbedPane.addTab( "(iv) Static red.", reductionPanel );
-
- starlingerPane = new JTextPane();
- tabbedPane.addTab( "Starlinger", new JScrollPane( starlingerPane ) );
-
- dotPane = new JTextPane();
- tabbedPane.addTab( "Dot", new JScrollPane( dotPane ) );
-
- dagLabel = new JLabel();
-
- panel = new JPanel();
- panel.setLayout( new BorderLayout() );
- panel.add( new JScrollPane( dagLabel ), BorderLayout.CENTER );
-
-
- tabbedPane.add( "DAG", panel );
-
-
- }
-
- public void setSrcPane( SyntaxPanel srcPane ) {
-
- if( srcPane == null )
- throw new NullPointerException( "Source pane must not be null." );
-
- this.srcPane = srcPane;
- }
-
- public void setErrorTableModel( ErrorTableModel errorTableModel ) {
-
- if( errorTableModel == null )
- throw new NullPointerException( "Error table model must not be null." );
-
- this.errorTableModel = errorTableModel;
- }
-
- @Override
- public void run() {
-
- String afterPre, afterChannel;
- TopLevelContext tlc;
- String dot;
- ImageIcon img;
- StaticNodeVisitor staticVisitor;
- DotNodeVisitor dotVisitor;
- CompoundExpr ce1;
- StarlingerNodeVisitor starlingerVisitor;
- String starlinger;
- String reduction;
-
-
- while( true ) {
-
- if( srcPane.getText().hashCode() != hash )
-
- try {
-
- hash = srcPane.getText().hashCode();
-
- errorTableModel.clear();
-
- afterPre = PreListener.process( srcPane.getText() );
- prePanel.setText( afterPre );
-
- afterChannel = ChannelListener.process( afterPre );
- channelPanel.setText( afterChannel );
-
- tlc = CfSemanticModelVisitor.process( afterChannel );
- modelPanel.setText( tlc.toString() );
-
- if( tlc.isTargetListEmpty() ) {
- starlinger = "{ 'nodes'=>{},'edges'=>{}}";
- dot = "digraph G {}";
- reduction = "";
- }
- else {
-
- staticVisitor = new StaticNodeVisitor( tlc );
-
- ce1 = tlc.visit( staticVisitor );
- reduction = ce1.toString()+";";
-
- starlingerVisitor = new StarlingerNodeVisitor();
-
- ce1.visit( starlingerVisitor );
- starlinger = starlingerVisitor.toString();
-
- dotVisitor = new DotNodeVisitor();
-
- ce1.visit( dotVisitor );
- dot = dotVisitor.toString();
-
- }
-
- reductionPanel.setText( reduction );
- starlingerPane.setText( starlinger );
- dotPane.setText( dot );
-
- img = runGraphViz( dot );
- dagLabel.setIcon( img );
-
- }
- catch( ParseException e ) {
- errorTableModel.add( e );
- }
- catch( RuntimeException e ) {
- e.printStackTrace();
- }
- catch( HasFailedException e ) {
- e.printStackTrace();
- } catch (NotBoundException e) {
- e.printStackTrace();
- }
- finally {
- errorTableModel.fireTableDataChanged();
- }
-
- try {
- Thread.sleep( 2000 );
- }
- catch( InterruptedException e ) {
- e.printStackTrace();
- }
- }
-
-
- }
-
- private static ImageIcon runGraphViz( String dot ) {
-
- ImageIcon img;
-
-
-
- ProcessBuilder builder;
- Process p;
- ExecutorService executorService;
- BufferedImage rawImage;
-
- builder = new ProcessBuilder( "/bin/bash", "-c", "dot -T png" );
-
- try {
- p = builder.start();
-
- executorService = Executors.newSingleThreadExecutor();
- executorService.submit( new ProducerThread( p, dot ) );
- executorService.shutdown();
-
- try( InputStream inStream = p.getInputStream() ) {
-
-
- rawImage = ImageIO.read( inStream );
- if( rawImage == null ) {
- System.err.println( "Cannot produce image. Is graphviz installed properly?" );
- return null;
- }
-
- rawImage.flush();
-
- img = new ImageIcon( rawImage );
-
-
- return img;
- }
- }
- catch( IOException e ) {
- e.printStackTrace();
- }
-
- return null;
-
-
- }
-
- private static class ProducerThread implements Runnable {
-
- private Process p;
- private String dot;
-
- public ProducerThread( Process p, String dot ) {
-
- if( p == null )
- throw new NullPointerException( "Process must not be null." );
-
- if( dot == null )
- throw new NullPointerException( "Dot string must not be null." );
-
- this.p = p;
- this.dot = dot;
- }
-
- @Override
- public void run() {
-
-
-
-
- try( OutputStream outStream = p.getOutputStream() ) {
-
- outStream.write( dot.getBytes() );
- outStream.close();
- } catch( IOException e ) {
- e.printStackTrace();
- }
-
- }
-
-
- }
-
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/StyleConf.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/StyleConf.java
deleted file mode 100644
index fe1bbc3..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/StyleConf.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.Color;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.swing.text.StyledDocument;
-
-public abstract class StyleConf {
-
-
- public static final String KEY_KEYWORD = "keyword";
- public static final String KEY_VARNAME = "varname";
- public static final String KEY_COMMENT = "comment";
- public static final String KEY_CALL = "call";
- public static final String KEY_APPLY = "apply";
- public static final String KEY_STAT = "stat";
- public static final String KEY_DATA = "data";
- public static final String KEY_TYPE = "type";
- public static final String KEY_FOREIGN = "foreign";
-
-
- private Map styleMap;
-
- public StyleConf() {
- styleMap = new HashMap<>();
- }
-
- public abstract Color getBackgroundColor();
-
- public void setDoc( StyledDocument doc ) {
-
- SimpleStyle s;
-
- if( doc == null )
- throw new NullPointerException( "Document must not be null." );
-
- for( String key : styleMap.keySet() ) {
-
- s = styleMap.get( key );
- if( s == null )
- throw new NullPointerException( "Style for '"+key+"' not registered." );
-
- s.addStyleToDoc( doc, key );
- }
- }
-
- private void setStyle( String key, SimpleStyle s ) {
-
- if( key == null )
- throw new NullPointerException( "Key must not be null." );
-
- if( key.isEmpty() )
- throw new RuntimeException( "Key must not be empty." );
-
- if( s == null )
- throw new NullPointerException( "Style object must not be null." );
-
- styleMap.put( key, s );
- }
-
- public void setApplyStyle( SimpleStyle s ) {
- setStyle( KEY_APPLY, s );
- }
-
- public void setCallStyle( SimpleStyle s ) {
- setStyle( KEY_CALL, s );
- }
-
- public void setKeywordStyle( SimpleStyle s ) {
- setStyle( KEY_KEYWORD, s );
- }
-
- public void setVarnameStyle( SimpleStyle s ) {
- setStyle( KEY_VARNAME, s );
- }
-
- public void setCommentStyle( SimpleStyle s ) {
- setStyle( KEY_COMMENT, s );
- }
-
- public void setStatStyle( SimpleStyle s ) {
- setStyle( KEY_STAT, s );
- }
-
- public void setDataStyle( SimpleStyle s ) {
- setStyle( KEY_DATA, s );
- }
-
- public void setTypeStyle( SimpleStyle s ) {
- setStyle( KEY_TYPE, s );
- }
-
- public void setForeignStyle( SimpleStyle s ) {
- setStyle( KEY_FOREIGN, s );
- }
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SyntaxListener.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SyntaxListener.java
deleted file mode 100644
index a71dac0..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SyntaxListener.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-
-import javax.swing.JTextPane;
-import javax.swing.text.Style;
-import javax.swing.text.StyledDocument;
-
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.misc.NotNull;
-import org.antlr.v4.runtime.tree.ParseTree;
-import org.antlr.v4.runtime.tree.ParseTreeWalker;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
-import de.huberlin.wbi.cuneiform.core.parser.CuneiformBaseListener;
-import de.huberlin.wbi.cuneiform.core.parser.CuneiformLexer;
-import de.huberlin.wbi.cuneiform.core.parser.CuneiformParser;
-
-public class SyntaxListener extends CuneiformBaseListener {
-
- private JTextPane textPane;
-
- public SyntaxListener( JTextPane textPane, StyleConf conf ) {
-
- if( textPane == null )
- throw new NullPointerException( "Text pane must not be null." );
-
- if( conf == null )
- throw new NullPointerException( "Style configuration object never set." );
-
- this.textPane = textPane;
- conf.setDoc( getDoc() );
-
- }
-
- public StyledDocument getDoc() {
- return textPane.getStyledDocument();
- }
-
- public static void process( JTextPane textPane, StyleConf conf ) {
-
- ANTLRInputStream instream;
- CuneiformLexer lexer;
- TokenStream tokenStream;
- CuneiformParser parser;
- ParseTree tree;
- SyntaxListener syntaxListener;
- ParseTreeWalker walker;
-
- walker = new ParseTreeWalker();
-
-
- // parse content
- instream = new ANTLRInputStream( textPane.getText() );
-
- lexer = new CuneiformLexer( instream );
- lexer.removeErrorListeners();
-
- tokenStream = new CommonTokenStream( lexer );
-
- parser = new CuneiformParser( tokenStream );
- parser.removeErrorListeners();
-
- syntaxListener = new SyntaxListener( textPane, conf );
-
- tree = parser.script();
- walker.walk( syntaxListener, tree );
- }
-
- @Override
- public void enterNilExpr( @NotNull CuneiformParser.NilExprContext ctx ) {
- mark( ctx, StyleConf.KEY_KEYWORD );
- mark( ctx, StyleConf.KEY_DATA );
- }
-
- @Override
- public void enterStat( @NotNull CuneiformParser.StatContext ctx ) {
- mark( ctx, StyleConf.KEY_STAT, true );
- }
-
- @Override
- public void enterScript( @NotNull CuneiformParser.ScriptContext ctx ) {
-
- StyledDocument doc;
-
- doc = getDoc();
-
- doc.setCharacterAttributes(
- 0,
- doc.getLength(),
- doc.getStyle( StyleConf.KEY_COMMENT ),
- true );
- }
-
- @Override
- public void enterTarget( @NotNull CuneiformParser.TargetContext ctx ) {
- mark( ctx, StyleConf.KEY_APPLY );
- }
-
- @Override
- public void enterNativeDefTask( @NotNull CuneiformParser.NativeDefTaskContext ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterForeignDefTask( @NotNull CuneiformParser.ForeignDefTaskContext ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterDefTaskErr1( @NotNull CuneiformParser.DefTaskErr1Context ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- }
-
- @Override
- public void enterDefTaskErr2( @NotNull CuneiformParser.DefTaskErr2Context ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterDefTaskErr3( @NotNull CuneiformParser.DefTaskErr3Context ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterFnPrototypeErr1( @NotNull CuneiformParser.FnPrototypeErr1Context ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterFnPrototypeErr2( @NotNull CuneiformParser.FnPrototypeErr2Context ctx ) {
- mark( ctx.DEFTASK(), StyleConf.KEY_KEYWORD );
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterForeignBody( @NotNull CuneiformParser.ForeignBodyContext ctx ) {
- mark( ctx.INLANG(), StyleConf.KEY_KEYWORD );
- mark( ctx.BODY(), StyleConf.KEY_FOREIGN );
- }
-
- @Override
- public void enterForeignFnBodyErr2( @NotNull CuneiformParser.ForeignFnBodyErr2Context ctx ) {
- mark( ctx.INLANG(), StyleConf.KEY_KEYWORD );
- }
-
- @Override
- public void enterNameInferredType( @NotNull CuneiformParser.NameInferredTypeContext ctx ) {
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterNameDataType( @NotNull CuneiformParser.NameDataTypeContext ctx ) {
- mark( ctx, StyleConf.KEY_TYPE );
- mark( ctx.ID( 0 ), StyleConf.KEY_VARNAME );
- }
-
- @Override public void enterNameDeepFnType( @NotNull CuneiformParser.NameDeepFnTypeContext ctx ) {
- mark( ctx, StyleConf.KEY_TYPE );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterNamePlainFnType( @NotNull CuneiformParser.NamePlainFnTypeContext ctx ) {
- mark( ctx, StyleConf.KEY_TYPE );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterIntExpr( @NotNull CuneiformParser.IntExprContext ctx ) {
- mark( ctx, StyleConf.KEY_DATA );
- }
-
- @Override
- public void enterStringExpr( @NotNull CuneiformParser.StringExprContext ctx ) {
- mark( ctx, StyleConf.KEY_DATA );
- }
-
- @Override
- public void enterApplyExpr( @NotNull CuneiformParser.ApplyExprContext ctx ) {
- mark( ctx.APPLY(), StyleConf.KEY_KEYWORD );
- mark( ctx.APPLY(), StyleConf.KEY_CALL );
- }
-
- @Override
- public void enterCallExpr( @NotNull CuneiformParser.CallExprContext ctx ) {
- mark( ctx.ID(), StyleConf.KEY_CALL );
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override public void enterCurryExpr(@NotNull CuneiformParser.CurryExprContext ctx) {
- mark( ctx.CURRY(), StyleConf.KEY_KEYWORD );
- mark( ctx.CURRY(), StyleConf.KEY_CALL );
- }
-
- @Override
- public void enterNativeLambdaExpr( @NotNull CuneiformParser.NativeLambdaExprContext ctx ) {
- mark( ctx.LAMBDA(), StyleConf.KEY_KEYWORD );
- }
-
- @Override
- public void enterForeignLambdaExpr( @NotNull CuneiformParser.ForeignLambdaExprContext ctx ) {
- mark( ctx.LAMBDA(), StyleConf.KEY_KEYWORD );
- }
-
- @Override
- public void enterParamBind( @NotNull CuneiformParser.ParamBindContext ctx ) {
- mark( ctx.ID(), StyleConf.KEY_VARNAME );
- }
-
- @Override
- public void enterDanglingExpr( @NotNull CuneiformParser.DanglingExprContext ctx ) {
- mark( ctx.TOSTACK(), StyleConf.KEY_COMMENT );
- }
-
- @Override
- public void enterFromStackExpr( @NotNull CuneiformParser.FromStackExprContext ctx ) {
- mark( ctx.FROMSTACK(), StyleConf.KEY_COMMENT );
- }
-
- private void mark( TerminalNode tn, String styleName ) {
-
- Token sym;
-
- if( tn == null )
- return;
-
- sym = tn.getSymbol();
- if( sym == null )
- return;
-
- mark( sym, styleName );
- }
-
- private void mark( Token t, String styleName ) {
-
- Style style;
- int start, len;
- StyledDocument doc;
-
- if( t == null )
- return;
-
- if( styleName == null )
- throw new NullPointerException( "Style name must not be null." );
-
- if( styleName.isEmpty() )
- throw new RuntimeException( "Style name must not be empty." );
-
- doc = getDoc();
-
- style = doc.getStyle( styleName );
- if( style == null )
- throw new NullPointerException( "A style with name '"+styleName+"' has never been defined." );
-
- start = t.getStartIndex();
- if( start < 0 )
- return;
-
- len = t.getStopIndex()-start+1;
- if( len <= 0 )
- return;
-
- doc.setCharacterAttributes(
- start,
- len,
- style,
- false );
- }
-
- private void mark( ParserRuleContext ctx, String styleName ) {
- mark( ctx, styleName, false );
- }
-
- private void mark( ParserRuleContext ctx, String styleName, boolean supersede ) {
-
- Style style;
- int start, len;
- StyledDocument doc;
-
- if( ctx == null )
- throw new NullPointerException( "Context must not be null." );
-
- if( styleName == null )
- throw new NullPointerException( "Style name must not be null." );
-
- if( styleName.isEmpty() )
- throw new RuntimeException( "Style name must not be empty." );
-
- if( ctx.stop == null )
- return;
-
- if( ctx.start == null )
- return;
-
- doc = getDoc();
-
- style = doc.getStyle( styleName );
- if( style == null )
- throw new NullPointerException( "A style with name '"+styleName+"' has never been defined." );
-
- start = getStart( ctx );
- if( start < 0 )
- return;
-
- len = getLen( ctx );
- if( len <= 0 )
- return;
-
- doc.setCharacterAttributes(
- start,
- len,
- style,
- supersede );
- }
-
- private static int getStart( ParserRuleContext ctx ) {
-
- if( ctx == null )
- throw new NullPointerException( "Context must not be null." );
-
- if( ctx.start == null )
- throw new NullPointerException( "Start token must not be null." );
-
- return ctx.start.getStartIndex();
- }
-
- private static int getLen( ParserRuleContext ctx ) {
-
- if( ctx == null )
- throw new NullPointerException( "Context must not be null." );
-
- if( ctx.stop == null )
- throw new NullPointerException( "Stop token must not be null." );
-
- return ctx.stop.getStopIndex()-getStart( ctx )+1;
- }
-
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SyntaxPanel.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SyntaxPanel.java
deleted file mode 100644
index 221e90b..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/editor/SyntaxPanel.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.editor;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Cursor;
-import java.awt.Font;
-import java.awt.event.KeyListener;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextPane;
-import javax.swing.event.CaretListener;
-import javax.swing.text.Document;
-
-public class SyntaxPanel extends JPanel {
-
- private static final long serialVersionUID = -385807381349136708L;
-
- private JTextPane editPane;
- protected StyleConf sc;
-
- public SyntaxPanel() {
-
- JPanel editPanel, innerPanel;
- JScrollPane scrollPane;
-
-
- setLayout( new BorderLayout() );
- sc = new DarkStyleConf();
-
- // edit pane
- editPane = new JTextPane();
- editPane.setBackground( sc.getBackgroundColor() );
- editPane.setFont( new Font( "Courier", Font.PLAIN, 14 ) );
- editPane.setForeground( Color.WHITE );
- editPane.setCaretColor( Color.WHITE );
- editPane.setCursor( new Cursor( Cursor.TEXT_CURSOR ) );
- editPane.setEditable( false );
-
- innerPanel = new JPanel();
- innerPanel.setLayout( new BorderLayout() );
- innerPanel.add( editPane );
-
- scrollPane = new JScrollPane( innerPanel );
- scrollPane.getVerticalScrollBar().setUnitIncrement( 32 );
- scrollPane.getHorizontalScrollBar().setUnitIncrement( 32 );
-
- editPanel = new JPanel();
- editPanel.setLayout( new BorderLayout() );
- editPanel.add( scrollPane, BorderLayout.CENTER );
- add( editPanel, BorderLayout.CENTER );
-
-
- }
-
- public int getCaretPosition() {
- return editPane.getCaretPosition();
- }
-
- public Document getDocument() {
- return editPane.getDocument();
- }
-
- public JTextPane getEditPane() {
- return editPane;
- }
-
- public String getText() {
- return editPane.getText();
- }
-
- public void setText( String text ) {
- editPane.setText( text );
- SyntaxListener.process( editPane, sc );
- }
-
- public void setEditable( boolean editable ) {
- editPane.setEditable( editable );
- }
-
- @Override
- public synchronized void addKeyListener( KeyListener listener ) {
- editPane.addKeyListener( listener );
- }
-
- public void addCaretListener( CaretListener listener ) {
- editPane.addCaretListener( listener );
- }
-}
diff --git a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/main/Main.java b/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/main/Main.java
deleted file mode 100644
index ff65983..0000000
--- a/cuneiform-addons/cuneiform-cfide/src/main/java/de/huberlin/wbi/cuneiform/cfide/main/Main.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.wbi.cuneiform.cfide.main;
-
-import java.io.File;
-
-import javax.swing.JFrame;
-import javax.swing.JMenuBar;
-import javax.swing.SwingUtilities;
-import javax.swing.WindowConstants;
-
-import de.huberlin.wbi.cuneiform.cfide.editor.MainPanel;
-
-public class Main implements Runnable {
-
- private String[] loadList;
-
- public static void main( String[] args ) {
-
- Main m;
-
- m = new Main( args );
-
- SwingUtilities.invokeLater( m );
- }
-
- public Main( String[] args ) {
-
- if( args == null )
- throw new IllegalArgumentException( "Argument vector must not be null." );
-
- loadList = args;
- }
-
-
- @Override
- public void run() {
-
- JFrame frame;
- JMenuBar menuBar;
- MainPanel editRunPanel;
-
-
- // prepare frame
- frame = new JFrame( "Cuneiform Editor" );
- frame.setSize( 1000, 750 );
- frame.setLocation( 0, 50 );
- frame.setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
-
- // add main panel
- editRunPanel = new MainPanel( frame );
- frame.addWindowListener( editRunPanel );
- frame.add( editRunPanel );
-
- // add menu bar
- menuBar = editRunPanel.getMenuBar();
- frame.setJMenuBar( menuBar );
-
- // load designated files
- for( String filename : loadList )
- editRunPanel.open( new File( filename ) );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- frame.setVisible( true );
- }
-}
diff --git a/cuneiform-addons/cuneiform-dax/.gitignore b/cuneiform-addons/cuneiform-dax/.gitignore
deleted file mode 100644
index 6afedc5..0000000
--- a/cuneiform-addons/cuneiform-dax/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/target
-/bin
-/.classpath
-/.settings
-/.project
diff --git a/cuneiform-addons/cuneiform-dax/pom.xml b/cuneiform-addons/cuneiform-dax/pom.xml
deleted file mode 100644
index 67f719c..0000000
--- a/cuneiform-addons/cuneiform-dax/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
- 4.0.0
-
- de.hu-berlin.wbi.cuneiform
- cuneiform-addons
- 2.0.4-RELEASE
-
- cuneiform-dax
-
-
-
- de.hu-berlin.wbi.cuneiform
- cuneiform-core
- ${project.version}
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.4
-
-
- attach-sources
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.3
-
-
- attach-javadocs
-
- jar
-
-
-
-
-
- org.antlr
- antlr4-maven-plugin
- 4.5
-
- ${basedir}/src/main/antlr
- true
- true
-
-
-
-
- antlr4
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cuneiform-addons/cuneiform-dax/src/main/antlr/de/huberlin/cuneiform/libdax/parser/Dax.g4 b/cuneiform-addons/cuneiform-dax/src/main/antlr/de/huberlin/cuneiform/libdax/parser/Dax.g4
deleted file mode 100644
index 9450b9b..0000000
--- a/cuneiform-addons/cuneiform-dax/src/main/antlr/de/huberlin/cuneiform/libdax/parser/Dax.g4
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-grammar Dax;
-
-adag : LTAG ADAG adagProp* RTAG adagEl* LTAG SLASH ADAG RTAG ;
-
-adagProp : XMLNS EQ STRING # AdagPropXmlns
- | XSI EQ STRING # AdagPropXsi
- | SCHEMALOCATION EQ STRING # AdagPropSchemaLocation
- | VERSION EQ STRING # AdagPropVersion
- | COUNT EQ STRING # AdagPropCount
- | INDEX EQ STRING # AdagPropIndex
- | NAME EQ STRING # AdagPropName
- ;
-
-adagEl : filename
- | job
- | child
- ;
-
-filename : LTAG( FILE | FILENAME )filenameProp* SLASH RTAG ;
-
-filenameProp : ( FILE | NAME )EQ STRING # FilenamePropFile
- | LINK EQ INPUT # FilenamePropLinkInput
- | LINK EQ OUTPUT # FilenamePropLinkOutput
- | LINK EQ INOUT # FilenamePropLinkInout
- ;
-
-job : LTAG JOB jobProp* RTAG jobEl* LTAG SLASH JOB RTAG ;
-
-jobProp : ID EQ STRING # JobPropId
- | NAME EQ STRING # JobPropName
- | VERSION EQ STRING # JobPropVersion
- | LEVEL EQ STRING # JobPropLevel
- | DVNAME EQ STRING # JobPropDvName
- | DVVERSION EQ STRING # JobPropDvVersion
- | NAMESPACE EQ STRING # JobPropNamespace
- ;
-
-jobEl : LARGUMENT argumentEl* RARGUMENT # JobElArgument
- | LTAG USES jobUsesProp* SLASH RTAG # JobElUses
- ;
-
-argumentEl : ARG # ArgumentElPlain
- | filename # ArgumentElFilename
- ;
-
-jobUsesProp : ( FILE | NAME )EQ STRING # JobUsesPropFile
- | LINK EQ INPUT # JobUsesPropLinkInput
- | LINK EQ OUTPUT # JobUsesPropLinkOutput
- | REGISTER EQ( TRUE | FALSE ) # JobUsesPropRegister
- | TRANSFER EQ( TRUE | FALSE ) # JobUsesPropTransfer
- | TYPE EQ EXECUTABLE # JobUsesPropExecutable
- | OPTIONAL EQ TRUE # JobUsesPropOptionalTrue
- | OPTIONAL EQ FALSE # JobUsesPropOptionalFalse
- ;
-
-child : LTAG CHILD REF EQ STRING RTAG parent+ LTAG SLASH CHILD RTAG ;
-
-parent : LTAG PARENT REF EQ STRING SLASH RTAG ;
-
-ADAG : 'adag' ;
-ARGUMENT : 'argument' ;
-CHILD : 'child' ;
-COUNT : 'count' ;
-DVNAME : 'dv-name' ;
-DVVERSION : 'dv-version' ;
-EQ : '=' ;
-EXECUTABLE : '"executable"' ;
-FALSE : '"false"' ;
-FILE : 'file' ;
-FILENAME : 'filename' ;
-ID : 'id' ;
-INDEX : 'index' ;
-INOUT : '"inout"' ;
-INPUT : '"input"' ;
-JOB : 'job' ;
-LARGUMENT : '' ;
-LEVEL : 'level' ;
-LINK : 'link' ;
-LTAG : '<' ;
-NAME : 'name' ;
-NAMESPACE : 'namespace' ;
-OPTIONAL : 'optional' ;
-OUTPUT : '"output"' ;
-PARENT : 'parent' ;
-RARGUMENT : '' ;
-REF : 'ref' ;
-REGISTER : 'register' ;
-RTAG : '>' ;
-SCHEMALOCATION : 'xsi:schemaLocation' ;
-SLASH : '/' ;
-TRANSFER : 'transfer' ;
-TRUE : '"true"' ;
-TYPE : 'type' ;
-USES : 'uses' ;
-VERSION : 'version' ;
-XMLNS : 'xmlns' ;
-XSI : 'xmlns:xsi' ;
-
-STRING : '"' .*? '"' ;
-ARG : [a-zA-Z0-9\-\.]+ ;
-
-METAINFO : '' .*? '?>' -> skip ;
-COMMENT : '' -> skip ;
-WS : [ \t\r\n] -> skip ;
-
-
diff --git a/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/repl/DaxRepl.java b/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/repl/DaxRepl.java
deleted file mode 100644
index 183a68f..0000000
--- a/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/repl/DaxRepl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.cuneiform.dax.repl;
-
-import java.util.UUID;
-
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
-import org.antlr.v4.runtime.tree.ParseTreeWalker;
-import org.apache.commons.logging.Log;
-
-import de.huberlin.cuneiform.dax.semanticmodel.DaxSemanticModelListener;
-import de.huberlin.cuneiform.libdax.parser.DaxLexer;
-import de.huberlin.cuneiform.libdax.parser.DaxParser;
-import de.huberlin.wbi.cuneiform.core.repl.BaseRepl;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.CompoundExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.TopLevelContext;
-import de.huberlin.wbi.cuneiform.core.ticketsrc.TicketSrcActor;
-
-public class DaxRepl extends BaseRepl {
-
- public DaxRepl( TicketSrcActor ticketSrc, Log statLog ) {
- super( ticketSrc, statLog );
- }
-
- @Override
- public synchronized int interpret( String input ) {
-
- DaxSemanticModelListener adag;
- TopLevelContext tlc;
-
- adag = process( input );
- tlc = adag.toTopLevelContext();
-
- return interpret( tlc );
-
- }
-
- @Override
- public void queryFailedPost( UUID queryId, Long ticketId, Exception e,
- String script, String stdOut, String stdErr ) {}
-
- @Override
- public void queryFinishedPost( UUID queryId, CompoundExpr result ) {}
-
- @Override
- public void queryStartedPost( UUID runId ) {}
-
- public static DaxSemanticModelListener process( String input ) {
-
- ANTLRInputStream instream;
- DaxLexer lexer;
- CommonTokenStream tokenStream;
- DaxParser parser;
- ParseTree tree;
- ParseTreeWalker walker;
- DaxSemanticModelListener adag;
-
- walker = new ParseTreeWalker();
-
- // parse original content
- instream = new ANTLRInputStream( input );
-
- lexer = new DaxLexer( instream );
- lexer.removeErrorListeners();
-
- tokenStream = new CommonTokenStream( lexer );
-
- parser = new DaxParser( tokenStream );
- parser.removeErrorListeners();
-
- adag = new DaxSemanticModelListener();
- lexer.addErrorListener( adag );
- parser.addErrorListener( adag );
-
-
- tree = parser.adag();
-
- walker.walk( adag, tree );
-
- return adag;
- }
-
-
-}
diff --git a/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/semanticmodel/DaxFilename.java b/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/semanticmodel/DaxFilename.java
deleted file mode 100644
index fbb7ba1..0000000
--- a/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/semanticmodel/DaxFilename.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.cuneiform.dax.semanticmodel;
-
-import de.huberlin.wbi.cuneiform.core.semanticmodel.NameExpr;
-
-public class DaxFilename {
-
- public static final int LINK_INPUT = 1;
- public static final int LINK_OUTPUT = 2;
- public static final int LINK_INOUT = 3;
- private static final String PREFIX_LINK = "link";
-
- private String file;
- private Integer link;
-
- @Override
- public boolean equals( Object obj ) {
-
- DaxFilename other;
-
- if( !( obj instanceof DaxFilename ) )
- return false;
-
- other = ( DaxFilename )obj;
- if( file == null )
- throw new NullPointerException(
- "Trying to compare filenames when file member is not set." );
-
- return file.equals( other.file );
- }
-
- public String getFile() {
- return file;
- }
-
- @Override
- public int hashCode() {
- return file.hashCode();
- }
-
- public boolean isLinkInput() {
-
- if( link == null )
- throw new NullPointerException( "Link direction not set." );
-
- return link == LINK_INPUT;
- }
-
- public boolean isLinkOutput() {
-
- if( link == null )
- throw new NullPointerException( "Link direction not set." );
-
- return link == LINK_OUTPUT;
- }
-
- public void setFile( String file ) {
-
- if( file == null )
- throw new NullPointerException( "File string must not be null." );
-
- if( file.isEmpty() )
- throw new RuntimeException( "File string must not be empty." );
-
- this.file = file;
- }
-
- public void setLinkInput() {
- link = LINK_INPUT;
- }
-
- public void setLinkOutput() {
- link = LINK_OUTPUT;
- }
-
- public void setLinkInout() {
- link = LINK_INOUT;
- }
-
- public NameExpr getNameExpr() {
- return new NameExpr( PREFIX_LINK+file.hashCode() );
- }
-
- @Override
- public String toString() {
- return file;
- }
-
-}
diff --git a/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/semanticmodel/DaxJob.java b/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/semanticmodel/DaxJob.java
deleted file mode 100644
index 9d29508..0000000
--- a/cuneiform-addons/cuneiform-dax/src/main/java/de/huberlin/cuneiform/dax/semanticmodel/DaxJob.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * In the Hi-WAY project we propose a novel approach of executing scientific
- * workflows processing Big Data, as found in NGS applications, on distributed
- * computational infrastructures. The Hi-WAY software stack comprises the func-
- * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
- * for Apache Hadoop 2.x (YARN).
- *
- * List of Contributors:
- *
- * Jörgen Brandt (HU Berlin)
- * Marc Bux (HU Berlin)
- * Ulf Leser (HU Berlin)
- *
- * Jörgen Brandt is funded by the European Commission through the BiobankCloud
- * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
- * research training group SOAMED (GRK 1651).
- *
- * Copyright 2014 Humboldt-Universität zu Berlin
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package de.huberlin.cuneiform.dax.semanticmodel;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import de.huberlin.wbi.cuneiform.core.semanticmodel.ApplyExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.CfSemanticModelVisitor;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.CompoundExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.DataType;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.ForeignLambdaExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.NameExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.NotDerivableException;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.Prototype;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.ReduceVar;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.StringExpr;
-import de.huberlin.wbi.cuneiform.core.semanticmodel.Type;
-
-public class DaxJob {
-
- private static final String PREFIX_OUT = "out";
- private static final String PREFIX_IN = "in";
-
- private String name;
- private final List parentSet;
- private final List childSet;
- private final List