You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(28) |
Nov
(60) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(7) |
Feb
(23) |
Mar
(1) |
Apr
(12) |
May
|
Jun
(12) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jsa...@us...> - 2011-03-15 19:27:45
|
Revision: 172 http://flexotask.svn.sourceforge.net/flexotask/?rev=172&view=rev Author: jsauerbach Date: 2011-03-15 19:27:39 +0000 (Tue, 15 Mar 2011) Log Message: ----------- Specify compiler level for the project (must be 1.5 or greater to build reliably depending on Eclipse default). Added Paths: ----------- trunk/flexotask-editor/.settings/org.eclipse.jdt.core.prefs Added: trunk/flexotask-editor/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/flexotask-editor/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/flexotask-editor/.settings/org.eclipse.jdt.core.prefs 2011-03-15 19:27:39 UTC (rev 172) @@ -0,0 +1,12 @@ +#Tue Mar 15 15:21:31 EDT 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-07-31 14:17:59
|
Revision: 171 http://flexotask.svn.sourceforge.net/flexotask/?rev=171&view=rev Author: jsauerbach Date: 2009-07-31 14:17:51 +0000 (Fri, 31 Jul 2009) Log Message: ----------- Adjust to the removal of wikispaces from sourceforge. We no longer use a wiki at all ... the two wiki pages that we have have been converted to ordinary web pages. Modified Paths: -------------- trunk/flexotask-htdocs/index.html Added Paths: ----------- trunk/flexotask-htdocs/installing.html trunk/flexotask-htdocs/jointInstall.html Modified: trunk/flexotask-htdocs/index.html =================================================================== --- trunk/flexotask-htdocs/index.html 2009-07-03 14:39:24 UTC (rev 170) +++ trunk/flexotask-htdocs/index.html 2009-07-31 14:17:51 UTC (rev 171) @@ -15,17 +15,20 @@ <p>Release 2.0.1 is now available. A <a href="changes.html">change history</a> is now being maintained on this site. +<p>Slides from ECOOP 2009 tutorial on Flexible Task Graphs are <a +href="Flexotask.pdf">now available</a>. + <p>All installations are via the Eclipse Update mechanism. <ul> -<li><a href="http://flexotask.wiki.sourceforge.net/installing">How to +<li><a href="installing.html">How to install Flexible Task Graphs</a>. Includes the development environment, runtime APIs, documentation, and support for simulated execution and testing. Does not include bridge code to any actual real-time VM (but includes interfaces sufficient to create such a bridge or use an existing one). -<li><a href="http://flexotask.wiki.sourceforge.net/jointInstall">How +<li><a href="jointInstall.html">How to install the IBM Real Time VM Support for Flexible Task Graphs</a>. Explains how to add non-open-source components from IBM DeveloperWorks and IBM AlphaWorks to support real-time execution in the IBM WebSphere @@ -110,4 +113,5 @@ <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=242572&type=12" width="120" height="30" border="0" alt="Get Flexible Task Graphs at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> -</body> \ No newline at end of file +</body> +</html> Added: trunk/flexotask-htdocs/installing.html =================================================================== --- trunk/flexotask-htdocs/installing.html (rev 0) +++ trunk/flexotask-htdocs/installing.html 2009-07-31 14:17:51 UTC (rev 171) @@ -0,0 +1,127 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Installing Flexible Task Graphs</title> +</head> +<body> + +<center> +<h1 style="text-align: center; color: #ff0000">Installing Flexible Task Graphs</h1> +</center> + +<p>This procedure should be followed by any user interested in +Flexible Task Graphs. It provides a universal initial introduction to +the system. After following this procedure, you will later be able to +expand your participation if you are interested in contributing to +this open source project. If you are only interested in using the +software for real-time Java application development, then the +instructions given here are all you need. + +<br><hr><h2>Prerequisites</h2> +<ol> +<li><b>A Java JRE at level 1.5 or later</b>. If you don't have one, +<a href="http://www.eclipse.org/downloads/moreinfo/jre.php">the +Eclipse site provides some guidance</a>. + +<li><b>Eclipse 3.3.1 or later</b>. If you don't have Eclipse or your +current Eclipse is too old visit <a +href="http://www.eclipse.org/downloads">the Eclipse download +site</a>. If you have never used Eclipse before, we recommend you +start with the <b>Eclipse IDE for Java Developers</b>, but you can +use other versions like <b>Eclipse Classic</b> or the Eclipse IDE +for <b>Java EE Developers</b> if they suit your other needs better. + +<li>Make sure that your Eclipse 3.3.1 (or later) actually runs on your +Java JRE 1.5 (or later). If you have multiple versions of Java and are +not sure which one your Eclipse is running on, then, with Eclipse +running, choose <b>Help->About Eclipse</b> and then <b>Configuration +Details</b>. Scroll down to the <b>java.version</b> property. By default, +Eclipse runs on the JRE that is in the <b>PATH</b>. If this does not give +the desired result, either change the <b>PATH</b> or arrange to start +Eclipse with the <b>-vm</b> option as described in the +<b>eclipse/readme/readme_eclipse.html</b> document that comes with your +Eclipse installation. There are also Eclipse feature prerequisites +but the handling of these differs between Eclipse 3.3.x and Eclipse +3.4 or later. Follow the explicit instructions below depending on your +version. +</ol> + +<br><hr><h2>Installation under Eclipse 3.3.x (at least 3.3.1)</h2> + +<p>First determine whether you have the feature prerequisites. These are + +<ul><li>The <b>Graphical Editing Framework</b> (GEF). + +<li>The <b>Plugin Development Environment</b> (PDE). +</ul> + +Eclipse downloads will come with one or the other but typically not +both. If you're not sure whether you have them, choose <b>Help->About +Eclipse</b> and then <b>Feature Details</b>. If there is a row with +<b>org.eclipse.gef</b> in the Feature Id column then you have +GEF. Similarly, if there is a row with the id <b>org.eclipse.pde</b>, you +have the PDE. Note which, if either, of these features you are +missing. You will install them along with the Flexible Task Graphs +software. Then: + +<ol> +<li>Select <b>Help->Software Updates->Find And Install</b>, choose +<b>Search For New Features to Install</b> and press <b>Next</b>. + +<li>On the next page, which shows a list of update sites, press <b>New Remote Site</b>. + +<li>Enter <b>Flexible Task Graphs</b> as the name and +<b>http://flexotask.sourceforge.net/update-site</b> as the +URL. Then press <b>Ok</b>. The new update site should appear. + +<li>Make sure the new update site is checked. If you found unsatisfied +prerequisites (GEF or PDE) then also check the <b>Europa Discovery +Site</b>, otherwise leave it unchecked. Make sure no other update site +is checked. Press <b>Finish</b>. + +<li>You may be prompted to specify a mirror but then should be presented with a page containing your selected update sites. + +<li>If you had unsatisfied prerequisites, open the <b>Europa Discovery +Site</b> and find the <b>Graphical Editing Framework</b> under +<b>Graphical Editors and Frameworks</b> and/or the <b>Plugin +Development Environment</b> under <b>Java Development</b> and check +them. + +<li>Open the <b>Flexible Task Graphs</b> site and select the features +to install. You must at least install the <b>Base Programming +Support</b>. + +<li>Press <b>Finish</b> and follow the remaining instructions to +complete installation. +</ol> + +<br><hr><h2>Installation under Eclipse 3.4 or Later</h2> +<ol> +<li>Select <b>Help->Software Updates</b>, then choose the tab labeled +<b>Available Software</b>. Press <b>Add Site</b>. + +<li>Enter <b>http://flexotask.sourceforge.net/update-site</b> and +press <b>Ok.</b> The new site should appear. + +<li>Open the just-added update site and select the features to +install. You must at least install the <b>Base Programming +Support</b>. + +<li>Press <b>Install</b> and follow the remaining instructions to +complete installation. +</ol> + +<br><hr><h2>Post-Installation Instructions</h2> + +<p>After installation is complete and Eclipse has restarted, choose +<b>Help->Help Contents</b>. Then choose <b>Flexible Task Graphs</b> +and open the <b>Programmer's Guide</b>. + +<br><hr><br> +<a href="http://sourceforge.net/projects/flexotask"> +<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=242572&type=12" +width="120" height="30" border="0" +alt="Get Flexible Task Graphs at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> +</body> +</html> \ No newline at end of file Property changes on: trunk/flexotask-htdocs/installing.html ___________________________________________________________________ Added: svn:mime-type + text/html Added: svn:eol-style + native Added: trunk/flexotask-htdocs/jointInstall.html =================================================================== --- trunk/flexotask-htdocs/jointInstall.html (rev 0) +++ trunk/flexotask-htdocs/jointInstall.html 2009-07-31 14:17:51 UTC (rev 171) @@ -0,0 +1,102 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>How to install the IBM Real Time VM Support for Flexible Task Graphs</title> +</head> +<body> + +<center> +<h1 style="text-align: center; color: #ff0000">How to install the IBM Real Time VM Support for Flexible Task Graphs</h1> +</center> + +<p>This page explains how to install the <b>IBM Flexible Task Graphs +Runtime for WebSphere Real Time</b>, which is available on the <b>IBM +alphaWorks</b> site and the <b>IBM WebSphere Real Time Virtual +Machine</b> itself, available on the <b>IBM developerWorks +site</b>. If you haven't already installed the open-source software +from this site, following these instructions will give the open-source +software as well. The three components cooperate to provide real-time +execution. You do not need all three (only the open source portion, +which runs on any platform) to develop and test Flexible Task +Graphs. Furthermore, the open source software defines interfaces that +could be implemented on other Java Virtual Machines to achieve the +same goals. + +<br><hr><h2>Prerequisites for the IBM Components</h2> + +<ul><li>An appropriate Linux kernel for running the IBM WebSphere Real +Time (WRT) VM. You need a Linux kernel at version 2.6.21 or +later. Version 2 of WRT was tested with Red Hat Enterprise MRG V1 +(2.6.24.7-74.el5rt) and with SUSE Linux Enterprise Real Time 10 +(2.6.22.19-0.12-rt). Later versions of the same kernels are likely to +work and other kernel versions <em>may</em> work but the details are beyond the +scope of this document. If you are already developing Flexible Task +Graphs on Eclipse on some other platform, there is no need to switch +to the Linux machine for development; there will be a procedure for +exporting runtimes to the target Linux platform for testing. +</ul> + +<br><hr><h2>Prerequisites for Open Source Software (if not already installed)</h2> +<ol> +<li><b>A Java JRE at level 1.5 or later</b>. If you don't have one, +<a href="http://www.eclipse.org/downloads/moreinfo/jre.php">the +Eclipse site provides some guidance</a>. + +<li><b>Eclipse 3.3.1 or later</b>. If you don't have Eclipse or your +current Eclipse is too old visit <a +href="http://www.eclipse.org/downloads">the Eclipse download +site</a>. If you have never used Eclipse before, we recommend you +start with the <b>Eclipse IDE for Java Developers</b>, but you can +use other versions like <b>Eclipse Classic</b> or the Eclipse IDE +for <b>Java EE Developers</b> if they suit your other needs better. + +<li>Make sure that your Eclipse 3.3.1 (or later) actually runs on your +Java JRE 1.5 (or later). If you have multiple versions of Java and are +not sure which one your Eclipse is running on, then, with Eclipse +running, choose <b>Help->About Eclipse</b> and then <b>Configuration +Details</b>. Scroll down to the <b>java.version</b> property. By default, +Eclipse runs on the JRE that is in the <b>PATH</b>. If this does not give +the desired result, either change the <b>PATH</b> or arrange to start +Eclipse with the <b>-vm</b> option as described in the +<b>eclipse/readme/readme_eclipse.html</b> document that comes with your +Eclipse installation. There are also Eclipse feature prerequisites +but the handling of these differs between Eclipse 3.3.x and Eclipse +3.4 or later. Follow the explicit instructions below depending on your +version. +</ol> + +<p>There are also Eclipse feature prerequisites but the handling of +these differs between Eclipse 3.3.x and Eclipse 3.4 or later. Follow +the explicit instructions you will receive after downloading the +starter package from IBM AlphaWorks. + +<br><hr><h2>Steps</h2> +<ol> +<li>Obtain a copy of the IBM WebSphere Real Time VM from +<a href="http://www.ibm.com/developerworks/java/jdk/linux/download.html">IBM +DeveloperWorks</a>. In doing this, you will necessarily establish an IBM +ID, which you can also use for <b>AlphaWorks</b>. Choose either <b>WebSphere +Real Time V2.0 32-bit xSeries (Intel compatible)</b> (SR1 version, under +the Java 6 SE category, but <em>not</em> the "soft" real time version) or +<b>WebSphere Real Time V1.0 32-bit xSeries (Intel compatible)</b> (SR3 +version, under the J2SE Version 5.0 category). We have done most of +our testing on V1.0 SR3 (and that version was used to collect the data +for our latest published paper). However, our support emphasis will be +on the newer V2.0 SR1 version. + +<li>Visit the <a href="http://www.alphaworks.ibm.com/tech/flexotasks">Flexible +Task Graph site on IBM AlphaWorks</a>. Follow the download instructions +there. You will be guided through the rest of the installation, which +will include both material from the <b>IBM AlphaWorks</b> site and from +(this) sourceforge open source site (if you haven't already installed +it). +</ol> + +<br><hr><br> +<a href="http://sourceforge.net/projects/flexotask"> +<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=242572&type=12" +width="120" height="30" border="0" +alt="Get Flexible Task Graphs at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> +</body> +</html> Property changes on: trunk/flexotask-htdocs/jointInstall.html ___________________________________________________________________ Added: svn:mime-type + text/html Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-07-03 14:39:30
|
Revision: 170 http://flexotask.svn.sourceforge.net/flexotask/?rev=170&view=rev Author: jsauerbach Date: 2009-07-03 14:39:24 +0000 (Fri, 03 Jul 2009) Log Message: ----------- minor documentation correction Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/FlexotaskSchedulerRunnable.java Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/FlexotaskSchedulerRunnable.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/FlexotaskSchedulerRunnable.java 2009-06-22 15:31:51 UTC (rev 169) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/FlexotaskSchedulerRunnable.java 2009-07-03 14:39:24 UTC (rev 170) @@ -23,8 +23,8 @@ /** The FlexotaskTimerService to use for this Runnable */ private FlexotaskTimerService timer; - /** The priority at which this Runnable is to run; a non-positive integer, with 0 representing - * the highest available (and default) priority. */ + /** The priority at which this Runnable is to run; an integer such that 0 represents a high priority considered "normal" for + * Flexotask threads; see comment on getPriority method. */ private int priority; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-22 15:31:52
|
Revision: 169 http://flexotask.svn.sourceforge.net/flexotask/?rev=169&view=rev Author: jsauerbach Date: 2009-06-22 15:31:51 +0000 (Mon, 22 Jun 2009) Log Message: ----------- Some wordsmithing to the installation instructions. Revise changes.html to show that a correction was made to the release on 6/22. Modified Paths: -------------- trunk/flexotask-htdocs/changes.html trunk/flexotask-htdocs/index.html Modified: trunk/flexotask-htdocs/changes.html =================================================================== --- trunk/flexotask-htdocs/changes.html 2009-06-22 15:14:41 UTC (rev 168) +++ trunk/flexotask-htdocs/changes.html 2009-06-22 15:31:51 UTC (rev 169) @@ -8,7 +8,9 @@ <ul> <li>Release 2.0.0 on November 18, 2008 -- corresponds to SVN revision 112. -<li>Release 2.0.1 on June 9, 2009 -- corresponds to SVN revision 166. +<li>Release 2.0.1 on June 9, 2009 -- corresponds to SVN revision 166. +<li>Minor correction to release 2.0.1 on June 22, 2009 (no new release) correponds to SVN revision 168. +</ul> <br><hr><h2><a name=""/>Changes in Version 2.0.1</h2> Modified: trunk/flexotask-htdocs/index.html =================================================================== --- trunk/flexotask-htdocs/index.html 2009-06-22 15:14:41 UTC (rev 168) +++ trunk/flexotask-htdocs/index.html 2009-06-22 15:31:51 UTC (rev 169) @@ -26,11 +26,10 @@ bridge or use an existing one). <li><a href="http://flexotask.wiki.sourceforge.net/jointInstall">How -to install Flexible Task Graphs along with the IBM Flexible Task -Graphs runtime provider</a>. Includes everything in the preceding, -plus additional non-open-source software from IBM DeveloperWorks and +to install the IBM Real Time VM Support for Flexible Task Graphs</a>. +Explains how to add non-open-source components from IBM DeveloperWorks and IBM AlphaWorks to support real-time execution in the IBM WebSphere -Real Time VM. +Real Time VM. Also, how to install all the pieces together, if you prefer. </ul> <p>The <b>Flexible Task Graphs</b> system is described in the following This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-22 15:14:43
|
Revision: 168 http://flexotask.svn.sourceforge.net/flexotask/?rev=168&view=rev Author: jsauerbach Date: 2009-06-22 15:14:41 +0000 (Mon, 22 Jun 2009) Log Message: ----------- Schema directory accidentally omitted before ... needed in order to create new plugins without checking out the source from sourceforge. Modified Paths: -------------- trunk/flexotask-editor/build.properties Modified: trunk/flexotask-editor/build.properties =================================================================== --- trunk/flexotask-editor/build.properties 2009-06-09 15:06:58 UTC (rev 167) +++ trunk/flexotask-editor/build.properties 2009-06-22 15:14:41 UTC (rev 168) @@ -4,6 +4,7 @@ flexotaskEditor.jar,\ doc.zip,\ flexotask-toc.xml, \ + schema/, \ openRuntimeProvider.zip source.flexotaskEditor.jar = src/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-09 22:43:00
|
Revision: 167 http://flexotask.svn.sourceforge.net/flexotask/?rev=167&view=rev Author: jsauerbach Date: 2009-06-09 15:06:58 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Update web site to reflect release of version 2.0.1 Modified Paths: -------------- trunk/flexotask-htdocs/changes.html trunk/flexotask-htdocs/index.html Modified: trunk/flexotask-htdocs/changes.html =================================================================== --- trunk/flexotask-htdocs/changes.html 2009-06-08 19:54:41 UTC (rev 166) +++ trunk/flexotask-htdocs/changes.html 2009-06-09 15:06:58 UTC (rev 167) @@ -5,6 +5,11 @@ </head> <body> <h1>Change History</h1> +<ul> +<li>Release 2.0.0 on November 18, 2008 -- corresponds to SVN revision 112. + +<li>Release 2.0.1 on June 9, 2009 -- corresponds to SVN revision 166. + <br><hr><h2><a name=""/>Changes in Version 2.0.1</h2> Note: although this is numbered as a maintenance release, there are Modified: trunk/flexotask-htdocs/index.html =================================================================== --- trunk/flexotask-htdocs/index.html 2009-06-08 19:54:41 UTC (rev 166) +++ trunk/flexotask-htdocs/index.html 2009-06-09 15:06:58 UTC (rev 167) @@ -10,21 +10,27 @@ <h1 style="text-align: center; color: #ff0000">Flexible Task Graphs</h1> </center> -<p>Welcome to the <b>Flexible Task Graphs</b> web site. All -installations are via the Eclipse Update mechanism. +<p>Welcome to the <b>Flexible Task Graphs</b> web site. +<p>Release 2.0.1 is now available. A <a href="changes.html">change +history</a> is now being maintained on this site. + +<p>All installations are via the Eclipse Update mechanism. + <ul> <li><a href="http://flexotask.wiki.sourceforge.net/installing">How to -install just the open source components</a>. These include the -development environment, runtime APIs, documentation, and support for -simulated execution and testing. You can later install the additional -software to support real-time execution. +install Flexible Task Graphs</a>. Includes the development +environment, runtime APIs, documentation, and support for simulated +execution and testing. Does not include bridge code to any actual +real-time VM (but includes interfaces sufficient to create such a +bridge or use an existing one). <li><a href="http://flexotask.wiki.sourceforge.net/jointInstall">How -to install a complete system</a>. Includes the open source components -from this site plus additional non-open-source software from IBM -DeveloperWorks and IBM AlphaWorks to support real-time execution in -the IBM WebSphere Real Time VM. +to install Flexible Task Graphs along with the IBM Flexible Task +Graphs runtime provider</a>. Includes everything in the preceding, +plus additional non-open-source software from IBM DeveloperWorks and +IBM AlphaWorks to support real-time execution in the IBM WebSphere +Real Time VM. </ul> <p>The <b>Flexible Task Graphs</b> system is described in the following @@ -47,7 +53,7 @@ front-end tools, or improvements to the framework itself. <ul> -<li>Please contact <a href="mailto:jsa...@us...">Joshua +<li>Please contact <a href="mailto:jo...@us...">Joshua Auerbach</a> if you are interested in contributing to this project. <li>You may also visit our <a href="http://sourceforge.net/projects/flexotask">our sourceforge @@ -60,11 +66,13 @@ (or under research agreements with IBM) starting from the older Exotasks code base. It is being made available by IBM under the Eclipse Public License. Code was written by Joshua Auerbach and -Jesper Honig Spring, with design guidance from David Bacon and Jan -Vitek. Flexible Task Graphs are a unification of four previous -programming models, so the authors of those models can all be counted -as having influenced the present model. Here are pointers to the -papers describing the original models that influenced this work. +Jesper Honig Spring, with design guidance from David Bacon, Jan Vitek, +and Rachid Guerraoui, and reflecting earlier design guidance on the +Exotask system from Christoph Kirsch. Flexible Task Graphs are a +unification of four previous programming models, so the authors of +those models can all be counted as having influenced the present +model. Here are pointers to the papers describing the original models +that influenced this work. <ul> <li><a @@ -83,7 +91,7 @@ href="http://domino.research.ibm.com/comm/research_people.nsf/pages/bacon.refereed-pubs.html/$FILE/Auerbach08LowLatency-submission.pdf">Low-Latency Time-Portable Real-Time Programming with Exotasks</a> by J.Auerbach, D. F. Bacon, D. T. Iercan, C. M. Kirsch, V. T. Rajan, H. R. Roeck, -and R. Trummer, accepted by TECS. A more detailed treatment of +and R. Trummer, published in TECS. A more detailed treatment of Exotasks that also described the integration with Eventrons, a precursor to this work. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-08 19:55:45
|
Revision: 166 http://flexotask.svn.sourceforge.net/flexotask/?rev=166&view=rev Author: jsauerbach Date: 2009-06-08 19:54:41 +0000 (Mon, 08 Jun 2009) Log Message: ----------- More pre-release fixes. Add Harmony resource bundle exclusion to immutability-declarations. Change default isolation mode to weak. Make builder a little less paranoid about unparsable templates (for example it now allows you to delete one :-)). Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/validation/immutability-declarations trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/NormalTask.java trunk/flexotask-htdocs/changes.html Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java 2009-06-07 12:01:37 UTC (rev 165) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java 2009-06-08 19:54:41 UTC (rev 166) @@ -39,8 +39,11 @@ /** Indicates that this is a weakly isolated Flexotask (its parameter, if any, must be ref-immutable and is not * deep-copied). Its presence in the graph means that all getstatic checks for the graph will require * only ref-immutability and not full immutability. + * Flexotasks are weakly isolated by default, so this must be explicitly set to false. The use of a flag that is true + * by default instead of false by default is a legacy of the Exotask origins of this code (in Exotasks, the default was + * false). */ - private boolean weaklyIsolated; + private boolean weaklyIsolated = true; /** The type of the Flexotask's default parameter value in this specification. If null, the Flexotask * has no default parameter, though it may still have a runtime parameter. @@ -295,7 +298,8 @@ /** Set whether or not this is a weakly isolated Flexotask. If set, the Flexotask's parameter, if any, must be * ref-immutable and is not deep-copied. The presence of a weakly isolated Flexotask in the graph means that all * getstatic checks for the graph will require only ref-immutability and not full immutability. - * @param weaklyIsolated true to set weak isolation, false for strong isolation (the default) + * @param weaklyIsolated true to set weak isolation (the default), false for strong isolation (this was the default + * in Exotasks but now must be set explicitly). */ public void setWeaklyIsolated(boolean weaklyIsolated) { Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/validation/immutability-declarations =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/validation/immutability-declarations 2009-06-07 12:01:37 UTC (rev 165) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/validation/immutability-declarations 2009-06-08 19:54:41 UTC (rev 166) @@ -35,3 +35,4 @@ full com.ibm.realtime.flexotask.util.NativeIO registry full com.ibm.oti.util.NumberConverter TEN_TO_THE full com.ibm.oti.util.Msg bundle +full org.apache.harmony.luni.internal.nls.Messages bundle \ No newline at end of file Modified: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java =================================================================== --- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java 2009-06-07 12:01:37 UTC (rev 165) +++ trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java 2009-06-08 19:54:41 UTC (rev 166) @@ -814,9 +814,11 @@ templates.put(template, f); } catch (Exception e) { e.printStackTrace(); - addMarkerToResource(IMarker.SEVERITY_ERROR, f, -1, - "Error parsing graph template '" + f.getName() + "': " - + e.getMessage()); +// Arguably, these errors should be swallowed since they usually mean the template isn't +// ready to be analyzed. +// addMarkerToResource(IMarker.SEVERITY_ERROR, f, -1, +// "Error parsing graph template '" + f.getName() + "': " +// + e.getMessage()); } } return templates; Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/NormalTask.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/NormalTask.java 2009-06-07 12:01:37 UTC (rev 165) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/NormalTask.java 2009-06-08 19:54:41 UTC (rev 166) @@ -101,7 +101,7 @@ private IType implementationType; /** Flag indicating that this is a communicating flexotask */ - private boolean communicating; + private boolean communicating = true; /** The name of the type of the parameter */ private String parameterType = ""; @@ -207,7 +207,7 @@ propertyList.add(pd); pd = new ComboBoxPropertyDescriptor( - new ModelProperty(ISOLATION), "Isolation", new String[] {"strong", "weak"}); + new ModelProperty(ISOLATION), "Isolation", new String[] {"weak", "strong"}); pd.setCategory(Category.BASIC_CATEGORY); propertyList.add(pd); @@ -257,7 +257,7 @@ case OUTPUT_PORTS: return portDeclsAsString(outputPortDeclarations); case ISOLATION: - return new Integer(communicating ? 1 : 0); + return new Integer(communicating ? 0 : 1); default: return null; } @@ -287,12 +287,10 @@ label.setText("implementation=" + implementation); } labels.add(label); - if (communicating) { - label = new Label(OK_IMAGE); - label.setText("Weakly isolated"); - labels.add(label); - } label = new Label(OK_IMAGE); + label.setText(communicating ? "Weakly isolated" : "strongly isolated"); + labels.add(label); + label = new Label(OK_IMAGE); if (parameterValue.length() > 0) { label.setText("Parameter class=" + parameterType); labels.add(label); @@ -377,7 +375,7 @@ case PARAMETER_VALUE: return parameterValue.length() > 0; case ISOLATION: - return communicating; + return !communicating; default: return false; } @@ -423,8 +421,8 @@ break; case ISOLATION: boolean isolation = getCommunicating(); - setCommunicating(false); - firePropertyChange(ISOLATION_PROP, isolation, false); + setCommunicating(true); + firePropertyChange(ISOLATION_PROP, isolation, true); break; } } else { @@ -537,7 +535,7 @@ break; case ISOLATION: boolean isolation = getCommunicating(); - setCommunicating(((Integer) value).intValue() > 0); + setCommunicating(((Integer) value).intValue() == 0); firePropertyChange(ISOLATION_PROP, isolation, getCommunicating()); break; } Modified: trunk/flexotask-htdocs/changes.html =================================================================== --- trunk/flexotask-htdocs/changes.html 2009-06-07 12:01:37 UTC (rev 165) +++ trunk/flexotask-htdocs/changes.html 2009-06-08 19:54:41 UTC (rev 166) @@ -69,6 +69,14 @@ error in the IDE. <li>Fixed bug in generating the name of a connection. + +<li>Fixed bug that caused the 'types' function test to fail with WebSphere Real Time 2.0, SR1. + +<li>Changed default isolation mode for tasks to 'weak' to match what is said in Flexotask papers (was 'strong', which +reflects the concept's origin in the Exotask system). + +<li>Builder is less zealous about reporting parse failures on templates ... usually these are harmless resulting from +incomplete editing. </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-07 12:01:45
|
Revision: 165 http://flexotask.svn.sourceforge.net/flexotask/?rev=165&view=rev Author: jsauerbach Date: 2009-06-07 12:01:37 +0000 (Sun, 07 Jun 2009) Log Message: ----------- More release prep: scheduler diagnostic test only runs when the underlying VM supports the functionality; change some test output to clarify that some "abnormal" results are not errors; fix some javadoc glitches. Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/reactive/ReactiveRunnableElement.java trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge1.java trunk/flexotask-functiontest/src/badscheduler/Main.java trunk/flexotask-functiontest/src/highfreqread/Main.java trunk/flexotask-functiontest/src/nativeio/Main.java Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/reactive/ReactiveRunnableElement.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/reactive/ReactiveRunnableElement.java 2009-06-06 19:24:28 UTC (rev 164) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/scheduling/reactive/ReactiveRunnableElement.java 2009-06-07 12:01:37 UTC (rev 165) @@ -77,7 +77,7 @@ /** * Add a predecessor, which is always a connection feeding one of this task's input ports. * Connections don't have predecessors - * @param taskElement the task element + * @param connectionElement the task element */ public void addPredecessor(ReactiveRunnableElement connectionElement) { if (predecessors == null) { Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java 2009-06-06 19:24:28 UTC (rev 164) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java 2009-06-07 12:01:37 UTC (rev 165) @@ -156,6 +156,15 @@ } /** + * Test whether running in an flexotask-enabled VM at at least level 1 + * @return true if running in an flexotask-enabled VM at at least level 1 + */ + public static boolean isFlexotaskVM1() + { + return vmBridge1 != null; + } + + /** * Perform an accurate nanotime sleep to the next deadline * @param nextDeadline the time, in nanoseconds, at which to wake up, using the same scale that * nanoTime uses. Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge1.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge1.java 2009-06-06 19:24:28 UTC (rev 164) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge1.java 2009-06-07 12:01:37 UTC (rev 165) @@ -13,12 +13,14 @@ */ package com.ibm.realtime.flexotask.vm; +import com.ibm.realtime.flexotask.system.FlexotaskSystemSupport; + /** * Functions added to FlexotaskVMBridge after the release of Flexotask 2.0.0 and before the next release thereafter. */ public interface FlexotaskVMBridge1 extends FlexotaskVMBridge { - /** @see FlexotaskSystemSupport#adoptPriority */ + /** @see FlexotaskSystemSupport#adoptPriority(int) */ public boolean adoptPriority(int newPriority); - /** @see FlexotaskSystemSupport#getIllegalAllocationClass */ + /** @see FlexotaskSystemSupport#getIllegalAllocationClass() */ public Class getIllegalAllocationClass(); } Modified: trunk/flexotask-functiontest/src/badscheduler/Main.java =================================================================== --- trunk/flexotask-functiontest/src/badscheduler/Main.java 2009-06-06 19:24:28 UTC (rev 164) +++ trunk/flexotask-functiontest/src/badscheduler/Main.java 2009-06-07 12:01:37 UTC (rev 165) @@ -24,10 +24,10 @@ import com.ibm.realtime.flexotask.scheduling.FlexotaskScheduler; import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulerFactory; import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulerRegistry; +import com.ibm.realtime.flexotask.system.FlexotaskSystemSupport; import com.ibm.realtime.flexotask.template.FlexotaskTaskTemplate; import com.ibm.realtime.flexotask.template.FlexotaskTemplate; import com.ibm.realtime.flexotask.template.FlexotaskValidationException; -import com.ibm.realtime.flexotask.util.SimulationSupport; /** * Tests latest support for diagnosing schedulers that fail. @@ -35,6 +35,14 @@ public class Main { public static void main(String[] args) throws FlexotaskValidationException { + /* Test whether support is present */ + if (!FlexotaskSystemSupport.isFlexotaskVM1()) { + String reason = FlexotaskSystemSupport.isFlexotaskVM() ? "older" : "simulated"; + /* No point in running this test */ + System.out.println("Skipping scheduler diagnostic test since running on " + reason + " Flexotask VM"); + return; + } + /* Set up bad scheduler factory */ FlexotaskSchedulerRegistry.registerScheduler(new FlexotaskSchedulerFactory(){ public String getName() { @@ -44,18 +52,21 @@ return new BadScheduler(); } }); + /* Make single task template for testing */ FlexotaskTemplate template = new FlexotaskTemplate(); FlexotaskTaskTemplate task = new FlexotaskTaskTemplate(); task.setName("only"); task.setImplementationClass(NullFlexotask.class.getName()); template.getTasks().add(task); + /* Set up to run the same template successively in different failure modes. The mode is indicated to the scheduler * via the parameter passed to the only task */ int[] mode = new int[1]; Map<String,Object> parameters = new HashMap<String,Object>(); parameters.put("only", mode); + /* In mode 0, the scheduler runs the task for a few seconds but doesn't fail */ FlexotaskGraph graph = template.validate("bad", parameters); graph.getRunner().start(); @@ -67,9 +78,11 @@ if (graph.getException() != null) { throw new IllegalStateException("Unexpected exception in mode 0", graph.getException()); } + /* In mode 1, the scheduler fails with a NullPointerException, simulating some programming mistake */ mode[0] = 1; graph = template.validate("bad", parameters); + System.out.println("A NullPointerException is expected here:"); graph.getRunner().start(); try { Thread.sleep(2000); } catch(InterruptedException e) {} runner = graph.getRunner(); @@ -83,10 +96,12 @@ if (!(ex instanceof NullPointerException)) { throw new IllegalStateException("Unexpected exception type " + ex.getClass().getName() + " in mode 1"); } + /* In mode 2, the scheduler throws IllegalArgumentException with message "voila", simulating the scheduler finding some * terminal violation of its assumptions */ mode[0] = 2; graph = template.validate("bad", parameters); + System.out.println("An IllegalArgumentException is expected here:"); graph.getRunner().start(); try { Thread.sleep(2000); } catch(InterruptedException e) {} runner = graph.getRunner(); @@ -103,14 +118,12 @@ if (!"voila".equals(ex.getMessage())) { throw new IllegalStateException("Unexpected exception message '" + ex.getMessage() + "' in mode 2"); } + /* In mode 3, the scheduler "accidentally" allocates something, causing an IllegalStateException to be issued * from a controller or driver at the next memory switch. The bad class should be java.lang.Long. */ - if (SimulationSupport.isSimulating()) { - System.err.println("Skipping mode 3 test because not running in a real time VM"); - return; - } mode[0] = 3; graph = template.validate("bad", parameters); + System.out.println("An IllegalStateException is expected here:"); graph.getRunner().start(); try { Thread.sleep(2000); } catch(InterruptedException e) {} runner = graph.getRunner(); Modified: trunk/flexotask-functiontest/src/highfreqread/Main.java =================================================================== --- trunk/flexotask-functiontest/src/highfreqread/Main.java 2009-06-06 19:24:28 UTC (rev 164) +++ trunk/flexotask-functiontest/src/highfreqread/Main.java 2009-06-07 12:01:37 UTC (rev 165) @@ -102,7 +102,7 @@ graph.getRunner().start(); HighFreqReaderIntf guard = (HighFreqReaderIntf) graph.getGuardObject("Test"); - System.err.println("Graph started"); + System.out.println("Graph started."); int sleepsPerSecond = 1000 / oThreadSleep; for (int i = 0; i < runlength * 1000 / oThreadSleep; i++) { Thread.sleep(oThreadSleep); @@ -110,17 +110,17 @@ try { guard.update((short) i); } catch (AtomicException e) { - System.err.println("Transaction " + i + " aborted"); + System.out.println("Transaction " + i + " aborted (expected)"); } catch (Exception e) { e.printStackTrace(); } } if (i % sleepsPerSecond == 0) { - System.err.println(i + (communicate ? " updates" : " waits")); + System.out.println(i + (communicate ? " updates" : " waits")); } } - System.err.println("Destroying graph"); + System.out.println("Destroying graph"); graph.destroy(); - System.err.println("Done"); + System.out.println("Done"); } } Modified: trunk/flexotask-functiontest/src/nativeio/Main.java =================================================================== --- trunk/flexotask-functiontest/src/nativeio/Main.java 2009-06-06 19:24:28 UTC (rev 164) +++ trunk/flexotask-functiontest/src/nativeio/Main.java 2009-06-07 12:01:37 UTC (rev 165) @@ -45,7 +45,7 @@ { /* Check environment ... no point in running when only simulating */ if (NativeIO.isSimulated()) { - System.err.println("NativeIO test not run since native support not present"); + System.out.println("Skipping NativeIO test since not on a real Flexotask VM"); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-06 19:24:48
|
Revision: 163 http://flexotask.svn.sourceforge.net/flexotask/?rev=163&view=rev Author: jsauerbach Date: 2009-06-06 19:24:18 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Increment version to 2.0.1 preparatory to release. Also, change logic for handshaking with the VM provider so that it is possible for the VM provider to be up-level as well as down-level to the Flexotask core version (only the down-level case was supported before). Modified Paths: -------------- trunk/flexotask-tuningfork-feature/feature.xml Modified: trunk/flexotask-tuningfork-feature/feature.xml =================================================================== --- trunk/flexotask-tuningfork-feature/feature.xml 2009-06-06 10:59:53 UTC (rev 162) +++ trunk/flexotask-tuningfork-feature/feature.xml 2009-06-06 19:24:18 UTC (rev 163) @@ -1,16 +1,16 @@ -<?xml version="1.0" encoding="UTF-8"?> -<feature - id="com.ibm.realtime.flexotask.tuningfork" - label="Flexotask Tuningfork Tracing" - version="2.0.0" - provider-name="IBM Research"> - - <description> +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="com.ibm.realtime.flexotask.tuningfork" + label="Flexotask Tuningfork Tracing" + version="2.0.1" + provider-name="IBM Research"> + + <description> Uses the JavaTraceGenerationViaNative capability of TuningFork -to provide a tracing capability for Flexotask schedulers. - </description> - - <copyright> +to provide a tracing capability for Flexotask schedulers. + </description> + + <copyright> Copyright (c) 2006 - 2008 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 @@ -18,10 +18,10 @@ http://www.eclipse.org/legal/epl-v10.html Contributors: - IBM Corporation - initial API and implementation - </copyright> - - <license> + IBM Corporation - initial API and implementation + </copyright> + + <license> Eclipse Public License -v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE @@ -243,44 +243,48 @@ intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights -to a jury trial in any resulting litigation. - </license> - - <url> - <update label="Flexible Task Graphs" url="http://flexotask.sourceforge.net/update-site"/> - </url> - - <requires> - <import plugin="com.ibm.tuningfork.traceGeneration"/> - <import plugin="com.ibm.realtime.flexotask"/> - <import plugin="com.ibm.tuningfork.traceGeneration.vianative"/> - <import plugin="com.ibm.realtime.analysis"/> - <import feature="com.ibm.realtime.flexotask.feature" version="2.0.0" match="greaterOrEqual"/> - <import plugin="com.ibm.realtime.flexotask.editor"/> - <import plugin="org.eclipse.core.runtime"/> - <import plugin="org.eclipse.jdt.core"/> - </requires> - - <plugin - id="com.ibm.tuningfork.traceGeneration" - download-size="0" - install-size="0" - version="2.0.0" - unpack="false"/> - - <plugin - id="com.ibm.tuningfork.traceGeneration.vianative" - download-size="0" - install-size="0" - version="2.0.0" - unpack="false"/> - - <plugin - id="com.ibm.realtime.flexotask.tuningfork" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin id="com.ibm.realtime.flexotask.tuningfork.source" version="2.0.0"/> - -</feature> +to a jury trial in any resulting litigation. + </license> + + <url> + <update label="Flexible Task Graphs" url="http://flexotask.sourceforge.net/update-site"/> + </url> + + <requires> + <import plugin="com.ibm.tuningfork.traceGeneration"/> + <import plugin="com.ibm.realtime.flexotask"/> + <import plugin="com.ibm.tuningfork.traceGeneration.vianative"/> + <import plugin="com.ibm.realtime.analysis"/> + <import feature="com.ibm.realtime.flexotask.feature" version="2.0.1" match="greaterOrEqual"/> + <import plugin="com.ibm.realtime.flexotask.editor"/> + <import plugin="org.eclipse.core.runtime"/> + <import plugin="org.eclipse.jdt.core"/> + </requires> + + <plugin + id="com.ibm.tuningfork.traceGeneration" + download-size="0" + install-size="0" + version="2.0.0" + unpack="false"/> + + <plugin + id="com.ibm.tuningfork.traceGeneration.vianative" + download-size="0" + install-size="0" + version="2.0.0" + unpack="false"/> + + <plugin + id="com.ibm.realtime.flexotask.tuningfork" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask.tuningfork.source" + download-size="0" + install-size="0" + version="2.0.1"/> + +</feature> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-06 19:24:29
|
Revision: 164 http://flexotask.svn.sourceforge.net/flexotask/?rev=164&view=rev Author: jsauerbach Date: 2009-06-06 19:24:28 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Increment version to 2.0.1 preparatory to release. Also, change logic for handshaking with the VM provider so that it is possible for the VM provider to be up-level as well as down-level to the Flexotask core version (only the down-level case was supported before). Modified Paths: -------------- trunk/flexotask/META-INF/MANIFEST.MF trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java trunk/flexotask-development/META-INF/MANIFEST.MF trunk/flexotask-editor/META-INF/MANIFEST.MF trunk/flexotask-features/feature.xml trunk/flexotask-functiontest-plugin/META-INF/MANIFEST.MF trunk/flexotask-generic/META-INF/MANIFEST.MF trunk/flexotask-tuningfork/META-INF/MANIFEST.MF trunk/flexotask-update/site.xml trunk/realtime-analysis/META-INF/MANIFEST.MF Modified: trunk/flexotask/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Flexotask Support Bundle-SymbolicName: com.ibm.realtime.flexotask -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Bundle-ClassPath: flexotask.jar Bundle-Vendor: IBM Research Export-Package: com.ibm.realtime.flexotask, Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskSystemSupport.java 2009-06-06 19:24:28 UTC (rev 164) @@ -77,8 +77,14 @@ /* Programmatic initialization of static variables */ static { - /* Find a supplied vmBridge, if any. May leave vmBridge as null, which is 'ok' but means that all realtime support will be simulated */ - findVMBridge(); + /* Find a supplied vmBridge, if any. May leave vmBridge as null, which is 'ok' but means that all realtime support will + * be simulated. Look for versions from newest to oldest */ + findVMBridge(FlexotaskVMBridge1.class); + if (vmBridge != null) { + vmBridge1 = (FlexotaskVMBridge1) vmBridge; + } else { + findVMBridge(FlexotaskVMBridge.class); + } /* Special hook to test on-demand GC */ disableScheduledGCs = Boolean.valueOf(System.getProperty("DISABLE_SCHEDULED_GCS")).booleanValue(); @@ -546,22 +552,21 @@ } /* else do nothing */ } - /** Locate an appropriate FlexotaskVMBridge implementation and assign it to vmBridge if found - * @throws IllegalStateException + /** + * Locate an appropriate FlexotaskVMBridge implementation and assign it to vmBridge if found + * @param toFind the Class of FlexotaskVMBridge to look for (over time, the interface evolves; the class represents + * the version; caller will look for versions from newest to oldest) + * @throws IllegalStateException if an I/O error occurs or the VM bridge fails to initialize */ - private static void findVMBridge() { + private static void findVMBridge(Class toFind) { boolean somethingLoaded; try { somethingLoaded = new Service() { - public boolean register(Service.Implementation implementation) - { + public boolean register(Service.Implementation implementation) { vmBridge = (FlexotaskVMBridge) implementation; - if (implementation instanceof FlexotaskVMBridge1) { - vmBridge1 = (FlexotaskVMBridge1) implementation; - } return true; } - }.load(FlexotaskVMBridge.class); + }.load(toFind); } catch (IOException e) { throw new IllegalStateException(e.getMessage(), e); } Modified: trunk/flexotask-development/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-development/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-development/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Flexotask Development Time Type Checker Plug-in Bundle-SymbolicName: com.ibm.realtime.flexotask.development;singleton:=true -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Bundle-ClassPath: flexotaskdev.jar Bundle-Activator: com.ibm.realtime.flexotask.development.builder.Activator Bundle-Vendor: IBM Research Modified: trunk/flexotask-editor/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-editor/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-editor/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Flexotask Graphical Editor Bundle-SymbolicName: com.ibm.realtime.flexotask.editor; singleton:=true -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Bundle-ClassPath: flexotaskEditor.jar Bundle-Activator: com.ibm.realtime.flexotask.editor.EEditPlugin Bundle-Vendor: IBM Research Modified: trunk/flexotask-features/feature.xml =================================================================== --- trunk/flexotask-features/feature.xml 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-features/feature.xml 2009-06-06 19:24:28 UTC (rev 164) @@ -1,15 +1,15 @@ -<?xml version="1.0" encoding="UTF-8"?> -<feature - id="com.ibm.realtime.flexotask.feature" - label="Flexible Task Graphs Feature" - version="2.0.0" - provider-name="IBM Research"> - - <description> - Core Features of the Flexible Task Graphs System - </description> - - <copyright> +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="com.ibm.realtime.flexotask.feature" + label="Flexible Task Graphs Feature" + version="2.0.1" + provider-name="IBM Research"> + + <description> + Core Features of the Flexible Task Graphs System + </description> + + <copyright> Copyright (c) 2006 - 2008 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 @@ -17,11 +17,11 @@ http://www.eclipse.org/legal/epl-v10.html Contributors: - IBM Corporation - initial API and implementation - </copyright> - - <license> -Flexible Task Graphs Software User Agreement + IBM Corporation - initial API and implementation + </copyright> + + <license> + Flexible Task Graphs Software User Agreement November 7, 2008 The Flexible Task Graphs software is licensed under the terms of the @@ -264,38 +264,38 @@ 1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the + "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - "You" (or "Your") shall mean an individual or Legal Entity + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - "Object" form shall mean any form resulting from mechanical + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - "Work" shall mean the work of authorship, whether in Source or + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - "Derivative Works" shall mean any work, whether in Source or Object + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes @@ -303,21 +303,21 @@ separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" + the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + designated in writing by the copyright owner as "Not a Contribution." - "Contributor" shall mean Licensor and any individual or Legal Entity + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. @@ -361,7 +361,7 @@ excluding those notices that do not pertain to any part of the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not @@ -400,7 +400,7 @@ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, + Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A @@ -436,94 +436,94 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier + same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] - Licensed under the Apache License, Version 2.0 (the "License"); + 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, + 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. - </license> - - <url> - <update label="Flexible Task Graphs" url="http://flexotask.sourceforge.net/update-site"/> - </url> - - <requires> - <import plugin="com.ibm.realtime.analysis"/> - <import plugin="com.ibm.realtime.flexotask.generic"/> - <import plugin="com.ibm.realtime.flexotask"/> - <import plugin="org.eclipse.gef" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.ui" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.core.resources" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.ui.views" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.ui.ide" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.jdt.ui"/> - <import plugin="org.eclipse.jdt.core"/> - <import plugin="org.eclipse.ant.core"/> - <import plugin="org.eclipse.pde.core"/> - <import plugin="org.eclipse.ui.console"/> - <import plugin="com.ibm.realtime.flexotask.editor"/> - <import plugin="org.eclipse.jdt.launching"/> - <import feature="org.eclipse.pde" version="3.3.2.R33x_r20071022-7N7M4CYWLBCz-yHkMIuHN"/> - <import feature="org.eclipse.gef" version="3.3.1.v20070814"/> - </requires> - - <plugin - id="com.ibm.realtime.analysis" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin - id="com.ibm.realtime.flexotask" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin - id="com.ibm.realtime.flexotask.editor" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin - id="com.ibm.realtime.flexotask.generic" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin - id="com.ibm.realtime.flexotask.development" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin - id="com.ibm.realtime.flexotask.source" - download-size="0" - install-size="0" - version="2.0.0"/> - - <plugin - id="com.ibm.realtime.flexotask.functiontest" - download-size="0" - install-size="0" - version="2.0.0"/> - -</feature> + limitations under the License. + </license> + + <url> + <update label="Flexible Task Graphs" url="http://flexotask.sourceforge.net/update-site"/> + </url> + + <requires> + <import plugin="com.ibm.realtime.analysis"/> + <import plugin="com.ibm.realtime.flexotask.generic"/> + <import plugin="com.ibm.realtime.flexotask"/> + <import plugin="org.eclipse.gef" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.ui" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.core.resources" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.ui.views" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.ui.ide" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.jdt.ui"/> + <import plugin="org.eclipse.jdt.core"/> + <import plugin="org.eclipse.ant.core"/> + <import plugin="org.eclipse.pde.core"/> + <import plugin="org.eclipse.ui.console"/> + <import plugin="com.ibm.realtime.flexotask.editor"/> + <import plugin="org.eclipse.jdt.launching"/> + <import feature="org.eclipse.pde" version="3.3.2.R33x_r20071022-7N7M4CYWLBCz-yHkMIuHN"/> + <import feature="org.eclipse.gef" version="3.3.1.v20070814"/> + </requires> + + <plugin + id="com.ibm.realtime.analysis" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask.editor" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask.generic" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask.development" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask.source" + download-size="0" + install-size="0" + version="2.0.1"/> + + <plugin + id="com.ibm.realtime.flexotask.functiontest" + download-size="0" + install-size="0" + version="2.0.1"/> + +</feature> Modified: trunk/flexotask-functiontest-plugin/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-functiontest-plugin/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-functiontest-plugin/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,5 +2,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: Flexotask Function Test Bundle-SymbolicName: com.ibm.realtime.flexotask.functiontest -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Bundle-Vendor: IBM Research Modified: trunk/flexotask-generic/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-generic/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-generic/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Generic Types extension for Flexotask Bundle-SymbolicName: com.ibm.realtime.flexotask.generic -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Bundle-Vendor: IBM Research Require-Bundle: com.ibm.realtime.flexotask Export-Package: com.ibm.realtime.flexotask, Modified: trunk/flexotask-tuningfork/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-tuningfork/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-tuningfork/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Flexotask Tuningfork Support Bundle-SymbolicName: com.ibm.realtime.flexotask.tuningfork;singleton:=true -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Export-Package: com.ibm.realtime.flexotask.tuningfork Require-Bundle: com.ibm.realtime.flexotask, com.ibm.tuningfork.traceGeneration, Modified: trunk/flexotask-update/site.xml =================================================================== --- trunk/flexotask-update/site.xml 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/flexotask-update/site.xml 2009-06-06 19:24:28 UTC (rev 164) @@ -3,10 +3,10 @@ <description url="http://flexotask.sourceforge.net/update-site"> Flexible Task Graphs </description> - <feature url="features/com.ibm.realtime.flexotask.feature_2.0.0.jar" id="com.ibm.realtime.flexotask.feature" version="2.0.0"> + <feature url="features/com.ibm.realtime.flexotask.feature_2.0.1.jar" id="com.ibm.realtime.flexotask.feature" version="2.0.1"> <category name="Base Programming Support"/> </feature> - <feature url="features/com.ibm.realtime.flexotask.tuningfork_2.0.0.jar" id="com.ibm.realtime.flexotask.tuningfork" version="2.0.0"> + <feature url="features/com.ibm.realtime.flexotask.tuningfork_2.0.1.jar" id="com.ibm.realtime.flexotask.tuningfork" version="2.0.1"> <category name="Tracing Packages"/> </feature> <category-def name="Base Programming Support" label="Base Programming Support"> Modified: trunk/realtime-analysis/META-INF/MANIFEST.MF =================================================================== --- trunk/realtime-analysis/META-INF/MANIFEST.MF 2009-06-06 19:24:18 UTC (rev 163) +++ trunk/realtime-analysis/META-INF/MANIFEST.MF 2009-06-06 19:24:28 UTC (rev 164) @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Realtime Analysis Plug-in Bundle-SymbolicName: com.ibm.realtime.analysis -Bundle-Version: 2.0.0 +Bundle-Version: 2.0.1 Bundle-Vendor: IBM Research Bundle-ClassPath: realtimeAnalysis.jar, bcel-5.2.jar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-06 11:00:01
|
Revision: 162 http://flexotask.svn.sourceforge.net/flexotask/?rev=162&view=rev Author: jsauerbach Date: 2009-06-06 10:59:53 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Add change log preparatory to new release. Added Paths: ----------- trunk/flexotask-htdocs/changes.html Added: trunk/flexotask-htdocs/changes.html =================================================================== --- trunk/flexotask-htdocs/changes.html (rev 0) +++ trunk/flexotask-htdocs/changes.html 2009-06-06 10:59:53 UTC (rev 162) @@ -0,0 +1,74 @@ +<!doctype html public "html2.0"> +<html> +<head> +<title>Change History</title> +</head> +<body> +<h1>Change History</h1> +<br><hr><h2><a name=""/>Changes in Version 2.0.1</h2> + +Note: although this is numbered as a maintenance release, there are +some minor functional changes. + +<ul> +<li>Eliminated the "by reference" connection mode, which requires a +runtime check and hence violates Flexotask philosophy. Renamed the +remaining two connection modes: use "CloneAlways" (the default, +formerly "deepclone") or "CloneIfNeeded" (formerly "hybrid"). The old +names are still accepted from existing templates but are deprecated. +Note that for cases where "by reference" did not throw an exception, +then "CloneIfNeeded" will give the same result at the same cost. + +<li>Better diagnostics for failing scheduler, and earlier and more +precise detection when schedulers violate rules. Requires a +cooperating VM provider. For the IBM VM provider, this is version +2.0.2, expected to be available on IBM alphaWorks soon. With the old +VM provider, there should be no improvement and no regression. + +<li>Support priority differentiation in threads used by schedulers. +Requires a cooperating VM provider. For the IBM VM provider, this is +version 2.0.2, expected to be available on IBM alphaWorks soon. With +the old VM provider you may see messages saying that priorities could +not be set but the configuration should still work. + +<li>Establish separate versioning for runtime providers so that the +Flexotask core system and those providers can evolve +semi-independently. + +<li>Added a reactive scheduler to serve as an example for building +schedulers that react to external events. + +<li>In the editor, give timing grammars more ability to inspect the +entire graph, check global consistency, and propagate changes related +to their annotations. + +<li>In NativeIO add the ability to dynamically vary between blocking +and non-blocking operations on an individual socket. Add +NonBlockingBuffer class to aid in managing partial reads and writes in +Flexotask execute methods. + +<li>Enable peeking on ports by Flexotasks. + +<li>Improve the ability for projects that extend flexotask extension +points to contribute directly to the classpaths of flexotask +application projects without having to be installed as plugins. + +<li>Added checking that deep copy connections have stable types. + +<li>Added check to ensure that class defined in flexotask task +template is indeed a flexotask + +<li>Limit the depth of search for reasons when reporting an error to +avoid OutOfMemory in some cases. + +<li>Refinements to the list of JDK classes known a priori to be +immutable or reference immutable. + +<li>Fixed problems related to unexpected errors in the builder (such +as class loading errors). Builder will stop hereafter and report an +error in the IDE. + +<li>Fixed bug in generating the name of a connection. +</ul> +</body> +</html> Property changes on: trunk/flexotask-htdocs/changes.html ___________________________________________________________________ Added: svn:mime-type + text/html Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-05 18:48:21
|
Revision: 161 http://flexotask.svn.sourceforge.net/flexotask/?rev=161&view=rev Author: jsauerbach Date: 2009-06-05 18:48:13 +0000 (Fri, 05 Jun 2009) Log Message: ----------- Edit and wordsmith the build cycle description after actually trying it out. Modified Paths: -------------- trunk/flexotask-update/BUILDCYCLE Modified: trunk/flexotask-update/BUILDCYCLE =================================================================== --- trunk/flexotask-update/BUILDCYCLE 2009-06-05 17:37:26 UTC (rev 160) +++ trunk/flexotask-update/BUILDCYCLE 2009-06-05 18:48:13 UTC (rev 161) @@ -1,30 +1,48 @@ -This file describes a complete build cycle. It does not include the instructions for building a vendor's runtime provider -but includes everything that is under open source control. +This file describes a complete build cycle. It does not include the +instructions for building a vendor's runtime provider but includes +everything that is under open source control. -1. Prerequisite: all Java code builds locally in local projects. The code tests out using the flexotask-functiontest and - flexotask-devtest when run locally. +1. Prerequisites before starting: + - all Java code builds locally in local projects -2. On a Linux system build the flexotask/native directory using 'make' (see instructions in - makefile). + - all unit tests in flexotask-functiontest and flexotask-devtest must + pass in local projects + +2. On a Linux system build the flexotask/native directory using +'make' (see instructions in makefile). -3. Build any other components' native directories that are mentioned in 'openRuntime-build.xml' in the flexotask-editor project. -These include contributions from two tuningforkvp projects: JavaTraceGeneration and JavaTraceGenerationViaNative. +3. Build any other components' native directories that are mentioned +in 'openRuntime-build.xml' in the flexotask-editor project. These +include contributions from two tuningforkvp projects: + - JavaTraceGeneration and + - JavaTraceGenerationViaNative. -4. Run openRuntime-build to build the openRuntimeProvider.zip. +4. Run openRuntime-build.xml to build the openRuntimeProvider.zip. -5. In this project (flexotask-update) right-click on site.xml and "Build Site" to build a partial site image. +5. In this project (flexotask-update) right-click on site.xml and +"Build Site" to build a partial site image. -6. With a separate utility, run the equinox utility (something like: -<path>/eclipse -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator -updateSite - <path>/flexotask-update -site file:<path>/flexotask-update/site.xml - -metadataRepositoryName "Flexible Task Graphs Open Source Update Site") +6. With a separate utility, run the equinox utility (something like: +<path>/eclipse + -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator + -updateSite <path>/flexotask-update + -site file:<path>/flexotask-update/site.xml + -metadataRepositoryName "Flexible Task Graphs Open Source Update Site") -7. The resulting update site has the same shape as a public release on sourceforge. +7. The resulting update site has the same shape as a public release +on sourceforge. It must be tested by installing in virgin Eclipses +3.3.x and 3.4.x. The test includes exporting a runtime and running +the unit tests in flexotask-functiontest for real against at least one +runtime provider. -The actual update site should only be changed by a flexotask project admin. Special additional steps: +The actual update site should only be changed by a flexotask project +admin. Special additional steps: -1. Increment version numbers to ensure a unique identity as seen by the Eclipse update manager. This must be done -prior to steps 5-6. +a. Increment version numbers to ensure a unique identity as seen by +the Eclipse update manager. This must be done prior to steps 5-6. -2. Ensure that the repository is labelled to identify code corresponding to the release (this was not done for version 2.0.0, -which was a mistake). \ No newline at end of file +b. Ensure that correlation between the release and the SVN version is +known. For clarity, these are recorded here: + +Release 2.0.0 corresponds to svn version 112 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-05 17:37:34
|
Revision: 160 http://flexotask.svn.sourceforge.net/flexotask/?rev=160&view=rev Author: jsauerbach Date: 2009-06-05 17:37:26 +0000 (Fri, 05 Jun 2009) Log Message: ----------- (Feature request tracker 2801854). Remove connection mode 'byref' and rename the remaining two. Also fixed some minor bugs found when running regression tests. Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/system/ConnectionDriverImpl.java trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskOutputPortImpl.java trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java trunk/flexotask/src/com/ibm/realtime/flexotask/validation/CommonCodeValidator.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/system/ConnectionDriverImpl.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/system/ConnectionDriverImpl.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/system/ConnectionDriverImpl.java 2009-06-05 17:37:26 UTC (rev 160) @@ -222,13 +222,9 @@ throw new IllegalStateException("Scheduler allocated object of type " + illegal.getName()); } Object outObj; - if (modeIndex == FlexotaskConnectionMode.BYREF_INDEX) { - outObj = inObj; - } - else if (modeIndex == FlexotaskConnectionMode.DEEPCLONE_INDEX){ + if (modeIndex == FlexotaskConnectionMode.CloneAlwaysIndex){ outObj = FlexotaskSystemSupport.deepClone(inObj, null); - } else { - /* hybrid */ + } else { // CloneIfNeeded outObj = FlexotaskSystemSupport.deepClone(inObj, input); } output.setValue(outObj); Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskOutputPortImpl.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskOutputPortImpl.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskOutputPortImpl.java 2009-06-05 17:37:26 UTC (rev 160) @@ -23,10 +23,6 @@ /** The port's type */ protected Class type; - /** Indicates if port connects to a connection having by-reference - * connection mode */ - protected boolean isByRef; - /** The output port's buffer */ private final PortBuffer buffer; @@ -35,9 +31,8 @@ */ private long count = 0; - protected FlexotaskOutputPortImpl(Class type, boolean isBuffered, boolean isByRef) { + protected FlexotaskOutputPortImpl(Class type, boolean isBuffered) { this.type = type; - this.isByRef = isByRef; if (isBuffered) { buffer = new PortBuffer(); } @@ -55,8 +50,6 @@ if (value != null && !type.isAssignableFrom(value.getClass())) { throw new ClassCastException(value.getClass().getName()); } - if (isByRef && FlexotaskSystemSupport.isOnPrivateHeap(value)) - throw new IllegalArgumentException("The provided object is not pinned as required by the connection mode."); if (buffer != null) { buffer.insertLast(value); } Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java 2009-06-05 17:37:26 UTC (rev 160) @@ -17,8 +17,6 @@ import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; import java.util.Map; import java.util.Set; @@ -229,6 +227,8 @@ atomicTask.lock = guard; guards.put(task.getName(), guard); } catch (Exception e) { + // If you get here when running the function test under Eclipse, recall that there's a special launch configuration + // that should be used ... it puts the 'generated' folder in the classpath throw new FlexotaskValidationException("Guard could not be constructed for atomic Flexotask " + task.getName()); } } @@ -440,24 +440,12 @@ private static Map instantiate(FlexotaskTemplate specification, Map heapSizes, Map initializationMap, FlexotaskTimer timer) throws FlexotaskValidationException { - Map byRefConnMap = new HashMap(); - /** Map the between task name and a list of the names of its output ports that are by-reference */ - for (Iterator iter = specification.getConnections().iterator(); iter.hasNext();) { - FlexotaskConnectionTemplate conn = (FlexotaskConnectionTemplate) iter.next(); - if (conn.getConnectionMode() == FlexotaskConnectionMode.BYREF) { - if (!byRefConnMap.containsKey(conn.getInput().getName())) - byRefConnMap.put(conn.getInput().getName(), new LinkedList()); - List list = (List) byRefConnMap.get(conn.getInput().getName()); - list.add(conn.getInput().getOutputPortNames()[conn.getOutputPortToRead()]); - } - } - Map taskMap = new HashMap(); /* Instantiate all the Flexotasks, along with their ports */ for (Iterator iter = specification.getTasks().iterator(); iter.hasNext();) { FlexotaskTaskTemplate task = (FlexotaskTaskTemplate) iter.next(); Object parameter = initializationMap.get(task.getName()); - taskMap.put(task, instantiateTask(task, (long[]) heapSizes.get(task), parameter, byRefConnMap, timer)); + taskMap.put(task, instantiateTask(task, (long[]) heapSizes.get(task), parameter, timer)); } /* Process all the connections, instantiating all ConnectionDrivers. */ @@ -533,15 +521,14 @@ * @param heapSizes the initial and maximum heap sizes for the task as a long[2] or null to indicate * use of the defaults * @param parameter the parameter to pass the Flexotask's initialize method - * @param byRefConnMap the map between task name and a list of the names of its output ports that - * are by-reference. + * are by-reference. * @param timer the FlexotaskTimer for this graph, to be used if the flexotask is time-aware * @return an FlexotaskController for the task and its ports. This is used both to complete * instantation (the ConnectionDrivers use the ports) and to serve as a runtime controller * for the Flexotask and its private heap * @throws FlexotaskValidationException if anything goes wrong */ - private static FlexotaskController instantiateTask(FlexotaskTaskTemplate task, long[] heapSizes, Object parameter, Map byRefConnMap, + private static FlexotaskController instantiateTask(FlexotaskTaskTemplate task, long[] heapSizes, Object parameter, FlexotaskTimer timer) throws FlexotaskValidationException { /* Apply the default value to the parameter, except for communicators, for whom the default parameter is @@ -612,11 +599,7 @@ root.setOutputPorts(outputPorts); /* Create output ports */ for (int i = 0; i < outputPorts.length; i++) { - boolean isByRef = false; - List byRefOutputPorts = (List) byRefConnMap.get(task.getName()); - if (byRefOutputPorts != null) - isByRef = (byRefOutputPorts.contains(task.getOutputPortNames()[i])); - outputPorts[i] = new FlexotaskOutputPortImpl(outputPortClasses[i], task.getOutputPortBuffering()[i], isByRef); + outputPorts[i] = new FlexotaskOutputPortImpl(outputPortClasses[i], task.getOutputPortBuffering()[i]); } Flexotask flexotask; try { Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java 2009-06-05 17:37:26 UTC (rev 160) @@ -22,33 +22,28 @@ * * <p>Possible modes are: * <ul> - * <li>BYREF - indicating that only objects on the public heap may be transmitted; all such - * objects are transmitted by reference. Attempts to transmit other objects cause an - * IllegalArgumentException at the time an object is stored in an output port. - * <li>DEEPCLONE - indicates that all objects are transmitted by deep-cloning them, regardless of where + * <li>CloneAlways - indicates that all objects are transmitted by deep-cloning them, regardless of where * they reside; the result is always a new object. - * <li>HYBRID - indicates that objects are transmitted by reference if they reside on the public heap + * <li>CloneIfNeeded - indicates that objects are transmitted by reference if they reside on the public heap * and by deep-cloning if they reside in the Flexotask private memory space * </ul> * */ public final class FlexotaskConnectionMode { - /** Indicates the mode by which objects are moved by reference */ - public static final int BYREF_INDEX = 0; - /** Indicates the mode by which objects are moved by reference */ - public static final FlexotaskConnectionMode BYREF = new FlexotaskConnectionMode("byref", BYREF_INDEX); /** Indicates the mode by which objects are moved by deep-cloning them */ - public static final int DEEPCLONE_INDEX = 1; + public static final int CloneAlwaysIndex = 0; /** Indicates the mode by which objects are moved by deep-cloning them */ - public static final FlexotaskConnectionMode DEEPCLONE = new FlexotaskConnectionMode("deepclone", DEEPCLONE_INDEX); + public static final FlexotaskConnectionMode CloneAlways = new FlexotaskConnectionMode("CloneAlways", CloneAlwaysIndex); /** Indicates the mode by which objects are moved by reference for the * pinned, heap-allocated objects, and by deep-cloning otherwise */ - public static final int HYBRID_INDEX = 2; + public static final int CloneIfNeededIndex = 1; /** Indicates the mode by which objects are moved by reference for the * pinned, heap-allocated objects, and by deep-cloning otherwise */ - public static final FlexotaskConnectionMode HYBRID = new FlexotaskConnectionMode("hybrid", HYBRID_INDEX); + public static final FlexotaskConnectionMode CloneIfNeeded = new FlexotaskConnectionMode("CloneIfNeeded", CloneIfNeededIndex); /** The array of all possible modes */ - private static final FlexotaskConnectionMode[] modes = { BYREF, DEEPCLONE, HYBRID }; + private static final FlexotaskConnectionMode[] modes = { CloneAlways, CloneIfNeeded }; + /** Accept older names to avoid breaking old templates (except for those that use byref) */ + private static final String[] oldNames = { "deepclone", "hybrid" }; /** The mode of the current instance */ private final String mode; /** The index of the current instance. This retains its meaning even when the FlexotaskConnectionMode @@ -74,8 +69,16 @@ */ public static boolean isValid(String mode) { for (int i = 0; i < modes.length; i++) { - modes[i].mode.equalsIgnoreCase(mode); return true; + if (modes[i].mode.equalsIgnoreCase(mode)) { + return true; + } } + /* For backward compatibility, older deprecated names for the same thing */ + for (int i = 0; i < oldNames.length; i++) { + if (oldNames[i].equalsIgnoreCase(mode)) { + return true; + } + } return false; } @@ -90,6 +93,12 @@ for (int i = 0; i < modes.length; i++) { if (modes[i].mode.equalsIgnoreCase(mode)) return modes[i]; } + /* For backward compatibility, older deprecated names for the same thing */ + for (int i = 0; i < oldNames.length; i++) { + if (oldNames[i].equalsIgnoreCase(mode)) { + return modes[i]; + } + } throw new IllegalArgumentException("Provided mode is invalid."); } Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java 2009-06-05 17:37:26 UTC (rev 160) @@ -38,7 +38,7 @@ private int inputPortToWrite; /** The connection mode indicating how objects are moved between the ports of * the connection. */ - private FlexotaskConnectionMode mode = FlexotaskConnectionMode.DEEPCLONE; + private FlexotaskConnectionMode mode = FlexotaskConnectionMode.CloneAlways; /** * Specify a new FlexotaskConnectionTemplate in one step Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java 2009-06-05 17:37:26 UTC (rev 160) @@ -325,7 +325,7 @@ } String mode = element.getAttribute("mode"); if (mode.length() == 0) { - mode = FlexotaskConnectionMode.DEEPCLONE.toString(); + mode = FlexotaskConnectionMode.CloneAlways.toString(); } if (!FlexotaskConnectionMode.isValid(mode)) { throw new FlexotaskValidationException("Invalid connection mode on connection " Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/validation/CommonCodeValidator.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/validation/CommonCodeValidator.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/validation/CommonCodeValidator.java 2009-06-05 17:37:26 UTC (rev 160) @@ -42,9 +42,6 @@ import com.ibm.realtime.flexotask.FlexotaskOutputPort; import com.ibm.realtime.flexotask.system.FlexotaskSystemSupport; import com.ibm.realtime.flexotask.system.TransactionalOperations; -import com.ibm.realtime.flexotask.template.FlexotaskConnectionMode; -import com.ibm.realtime.flexotask.template.FlexotaskConnectionTemplate; -import com.ibm.realtime.flexotask.template.FlexotaskPortTemplate; import com.ibm.realtime.flexotask.template.FlexotaskStableMode; import com.ibm.realtime.flexotask.template.FlexotaskTaskTemplate; import com.ibm.realtime.flexotask.template.FlexotaskTemplate; @@ -308,7 +305,7 @@ for (Iterator i = template.getStableClasses().iterator(); i.hasNext(); ) { String className = (String) i.next(); try { - Class clazz = Class.forName(className, false, context.getClassLoader()); //context.getClassLoader().loadClass(className); + Class clazz = resolveClass(className, context.getClassLoader()); //context.getClassLoader().loadClass(className); stableClasses.add(clazz); } catch (ClassNotFoundException e) { @@ -316,28 +313,23 @@ } } } - /* Check port semantics */ - for (Iterator iter = template.getConnections().iterator(); iter.hasNext();) { - FlexotaskConnectionTemplate element = (FlexotaskConnectionTemplate) iter.next(); - /* we do not check BYREF connections as we do not know the allocation - * context of the objects being written to the output port, which is - * what we're interested in for BYREF connections. Thus, this check is - * performed during runtime in the output port implementation. */ - - /* for DEEPCLONE we need to check that the type of the objects being - * written to the output port is stable. */ - if (element.getConnectionMode() != FlexotaskConnectionMode.BYREF) { - FlexotaskPortTemplate inputPort = element.getInput().getOutputPort(element.getInputPortToWrite()); - + /* Check port semantics. Types of all output ports must be stable. */ + for (Iterator iter = template.getTasks().iterator(); iter.hasNext();) { + FlexotaskTaskTemplate task = (FlexotaskTaskTemplate) iter.next(); + String[] outputPortTypes = task.getOutputPortTypes(); + for (int i = 0; i < outputPortTypes.length; i++) { + String portType = outputPortTypes[i]; try { - Class clazz = Class.forName(inputPort.getPortType(), false, context.getClassLoader()); + Class clazz = resolveClass(portType, context.getClassLoader()); if (!isStable(clazz)) - addTypeRuleViolation(Severity.ERROR, "The class '" + inputPort.getPortType() + "' used by a task port for 'deep clone' or 'hybrid' semantics is not declared Stable as required."); + addTypeRuleViolation(Severity.ERROR, "The transient class '" + portType + "' is transmitted by task '" + + task.getName() + "' on port '" + task.getOutputPort(i).getPortName()); } catch (ClassNotFoundException e) { - addTypeRuleViolation(Severity.ERROR, "The class '" + inputPort.getPortType() + "' used by a task port in the Flexotask template could not be loaded."); + addTypeRuleViolation(Severity.ERROR, "The class '" + portType + + "' used by task '" + task.getName() + "' in the Flexotask template could not be loaded."); } - } + } } mayNotAllocate = !template.isAllocating(); mayNotSynchronize = !template.isSynchronizing(); Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java 2009-06-05 17:36:55 UTC (rev 159) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java 2009-06-05 17:37:26 UTC (rev 160) @@ -37,11 +37,11 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; import org.eclipse.ui.views.properties.TextPropertyDescriptor; -import com.ibm.realtime.flexotask.template.FlexotaskConnectionMode; -import com.ibm.realtime.flexotask.template.FlexotaskValidationException; import com.ibm.realtime.flexotask.editor.dialogs.ClassPropertyDescriptor; import com.ibm.realtime.flexotask.editor.dialogs.PortNamePropertyDescriptor; import com.ibm.realtime.flexotask.editor.dialogs.PortNameCellEditor.PortNameWrapper; +import com.ibm.realtime.flexotask.template.FlexotaskConnectionMode; +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; /** @@ -95,9 +95,6 @@ /** Indicates that type information is being propagated; stops cyclic propagation if true */ private boolean propagatingType; - /** Indicates that port buffering status is being propagated; stops cyclic propagation if true */ - private boolean propagatingPortBuffering; - /** Connection's source endpoint. */ private Task source; @@ -120,7 +117,7 @@ private String type = ""; /** The mode of this connection */ - private FlexotaskConnectionMode mode = FlexotaskConnectionMode.DEEPCLONE; + private FlexotaskConnectionMode mode = FlexotaskConnectionMode.CloneAlways; /** * Create a connection between two tasks @@ -189,7 +186,9 @@ propertyList.add(pd); } pd = new ComboBoxPropertyDescriptor( - new ModelProperty(MODE), "Connection mode", new String[] {FlexotaskConnectionMode.BYREF.toString(), FlexotaskConnectionMode.DEEPCLONE.toString(), FlexotaskConnectionMode.HYBRID.toString()}); + new ModelProperty(MODE), "Connection mode", new String[] { + FlexotaskConnectionMode.CloneAlways.toString(), FlexotaskConnectionMode.CloneIfNeeded.toString() + }); pd.setCategory(Category.BASIC_CATEGORY); propertyList.add(pd); LocalTiming timing = getTiming(); @@ -509,7 +508,7 @@ setType(""); return; case MODE: - setMode(FlexotaskConnectionMode.DEEPCLONE); + setMode(FlexotaskConnectionMode.CloneAlways); return; case ID: setName(null); @@ -556,9 +555,7 @@ */ private void propagatePortBuffering(NormalTask task, boolean newValue, String name, boolean isSourcePort) { - propagatingPortBuffering = true; task.propagatingPortBuffering(newValue, name, isSourcePort); - propagatingPortBuffering = false; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-05 17:36:57
|
Revision: 159 http://flexotask.svn.sourceforge.net/flexotask/?rev=159&view=rev Author: jsauerbach Date: 2009-06-05 17:36:55 +0000 (Fri, 05 Jun 2009) Log Message: ----------- (Feature request tracker 2801854). Remove connection mode 'byref' and rename the remaining two. Also fixed some minor bugs found when running regression tests. Modified Paths: -------------- trunk/flexotask-devtest/src/base/RewriterTestCase.java Modified: trunk/flexotask-devtest/src/base/RewriterTestCase.java =================================================================== --- trunk/flexotask-devtest/src/base/RewriterTestCase.java 2009-06-04 20:53:53 UTC (rev 158) +++ trunk/flexotask-devtest/src/base/RewriterTestCase.java 2009-06-05 17:36:55 UTC (rev 159) @@ -158,6 +158,7 @@ return false; } } + return true; } return dir.delete(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-06-04 20:54:01
|
Revision: 158 http://flexotask.svn.sourceforge.net/flexotask/?rev=158&view=rev Author: jsauerbach Date: 2009-06-04 20:53:53 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Add an instruction file for how to build a new update site image. Preparatory to building release 2.0.1 or 2.1.0 or whatever we're going to call it. Added Paths: ----------- trunk/flexotask-update/BUILDCYCLE Added: trunk/flexotask-update/BUILDCYCLE =================================================================== --- trunk/flexotask-update/BUILDCYCLE (rev 0) +++ trunk/flexotask-update/BUILDCYCLE 2009-06-04 20:53:53 UTC (rev 158) @@ -0,0 +1,30 @@ +This file describes a complete build cycle. It does not include the instructions for building a vendor's runtime provider +but includes everything that is under open source control. + +1. Prerequisite: all Java code builds locally in local projects. The code tests out using the flexotask-functiontest and + flexotask-devtest when run locally. + +2. On a Linux system build the flexotask/native directory using 'make' (see instructions in + makefile). + +3. Build any other components' native directories that are mentioned in 'openRuntime-build.xml' in the flexotask-editor project. +These include contributions from two tuningforkvp projects: JavaTraceGeneration and JavaTraceGenerationViaNative. + +4. Run openRuntime-build to build the openRuntimeProvider.zip. + +5. In this project (flexotask-update) right-click on site.xml and "Build Site" to build a partial site image. + +6. With a separate utility, run the equinox utility (something like: +<path>/eclipse -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator -updateSite + <path>/flexotask-update -site file:<path>/flexotask-update/site.xml + -metadataRepositoryName "Flexible Task Graphs Open Source Update Site") + +7. The resulting update site has the same shape as a public release on sourceforge. + +The actual update site should only be changed by a flexotask project admin. Special additional steps: + +1. Increment version numbers to ensure a unique identity as seen by the Eclipse update manager. This must be done +prior to steps 5-6. + +2. Ensure that the repository is labelled to identify code corresponding to the release (this was not done for version 2.0.0, +which was a mistake). \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-04-20 12:59:26
|
Revision: 157 http://flexotask.svn.sourceforge.net/flexotask/?rev=157&view=rev Author: jsauerbach Date: 2009-04-20 12:59:23 +0000 (Mon, 20 Apr 2009) Log Message: ----------- Fix some settings to reduce warnings. Create export ant script. Put resulting jar in svn:ignore. Added Paths: ----------- trunk/flexotask-streaming-examples/.settings/ trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.core.prefs trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.ui.prefs trunk/flexotask-streaming-examples/export.xml Property Changed: ---------------- trunk/flexotask-streaming-examples/ Property changes on: trunk/flexotask-streaming-examples ___________________________________________________________________ Added: svn:ignore + streamingExamples.jar flexotaskStreamingExamples.jar Added: trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.core.prefs 2009-04-20 12:59:23 UTC (rev 157) @@ -0,0 +1,56 @@ +#Mon Apr 13 12:13:29 EDT 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning Added: trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ trunk/flexotask-streaming-examples/.settings/org.eclipse.jdt.ui.prefs 2009-04-20 12:59:23 UTC (rev 157) @@ -0,0 +1,3 @@ +#Mon Apr 13 12:13:29 EDT 2009 +eclipse.preferences.version=1 +internal.default.compliance=default Added: trunk/flexotask-streaming-examples/export.xml =================================================================== --- trunk/flexotask-streaming-examples/export.xml (rev 0) +++ trunk/flexotask-streaming-examples/export.xml 2009-04-20 12:59:23 UTC (rev 157) @@ -0,0 +1,10 @@ +<project default="jars"> + <target name="clean"> + <delete file="flexotaskStreamingExamples.jar"/> + </target> + <target name="jars" depends="clean"> + <jar destfile="flexotaskStreamingExamples.jar"> + <fileset dir="bin"/> + </jar> + </target> +</project> \ No newline at end of file Property changes on: trunk/flexotask-streaming-examples/export.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-04-13 14:14:52
|
Revision: 156 http://flexotask.svn.sourceforge.net/flexotask/?rev=156&view=rev Author: jsauerbach Date: 2009-04-13 14:14:47 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Minor changes to eliminate compiler warnings and to restore the ability to build debug.zip. Also add the latter to svn:ignore. Modified Paths: -------------- trunk/flexotask-streaming/.project trunk/flexotask-streaming/build.properties trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerMasterRunner.java Added Paths: ----------- trunk/flexotask-streaming/.externalToolBuilders/ trunk/flexotask-streaming/.externalToolBuilders/flexotask-streaming debug.xml.launch trunk/flexotask-streaming/.settings/ trunk/flexotask-streaming/.settings/org.eclipse.jdt.core.prefs Property Changed: ---------------- trunk/flexotask-streaming/ Property changes on: trunk/flexotask-streaming ___________________________________________________________________ Modified: svn:ignore - streamit.jar + streamit.jar debug.zip Added: trunk/flexotask-streaming/.externalToolBuilders/flexotask-streaming debug.xml.launch =================================================================== --- trunk/flexotask-streaming/.externalToolBuilders/flexotask-streaming debug.xml.launch (rev 0) +++ trunk/flexotask-streaming/.externalToolBuilders/flexotask-streaming debug.xml.launch 2009-04-13 14:14:47 UTC (rev 156) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/flexotask-streaming/debug.xml"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="flexotask-streaming"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/flexotask-streaming/debug.xml}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value=""/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> Modified: trunk/flexotask-streaming/.project =================================================================== --- trunk/flexotask-streaming/.project 2009-04-13 13:36:23 UTC (rev 155) +++ trunk/flexotask-streaming/.project 2009-04-13 14:14:47 UTC (rev 156) @@ -26,7 +26,7 @@ <arguments> <dictionary> <key>LaunchConfigHandle</key> - <value><project>/.externalToolBuilders/flexotask-streaming debug.xml [Builder].launch</value> + <value><project>/.externalToolBuilders/flexotask-streaming debug.xml.launch</value> </dictionary> </arguments> </buildCommand> Added: trunk/flexotask-streaming/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/flexotask-streaming/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/flexotask-streaming/.settings/org.eclipse.jdt.core.prefs 2009-04-13 14:14:47 UTC (rev 156) @@ -0,0 +1,56 @@ +#Mon Apr 13 10:05:12 EDT 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning Modified: trunk/flexotask-streaming/build.properties =================================================================== --- trunk/flexotask-streaming/build.properties 2009-04-13 13:36:23 UTC (rev 155) +++ trunk/flexotask-streaming/build.properties 2009-04-13 14:14:47 UTC (rev 156) @@ -2,6 +2,5 @@ bin.includes = META-INF/,\ flexotaskStreaming.jar,\ plugin.xml,\ - streamit.jar,\ - flexotaskStreamingsrc.zip + streamit.jar source.flexotaskStreaming.jar = src/ Modified: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java 2009-04-13 13:36:23 UTC (rev 155) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java 2009-04-13 14:14:47 UTC (rev 156) @@ -18,10 +18,7 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; import java.util.List; -import java.util.Set; import org.eclipse.core.runtime.CoreException; import org.eclipse.draw2d.Label; Modified: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerMasterRunner.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerMasterRunner.java 2009-04-13 13:36:23 UTC (rev 155) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerMasterRunner.java 2009-04-13 14:14:47 UTC (rev 156) @@ -35,6 +35,7 @@ */ class StreamSchedulerMasterRunner extends SchedulerMasterRunner { /** Debugging flag */ + @SuppressWarnings("unused") private static final boolean debug = true; /** The timing data */ private StreamBasedGlobalTimingData timingData; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2009-04-13 13:40:09
|
Revision: 155 http://flexotask.svn.sourceforge.net/flexotask/?rev=155&view=rev Author: jsauerbach Date: 2009-04-13 13:36:23 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Add streamit.jar to svn:ignore so if you grab a copy from somewhere, svn won't be tempted to check it in. Property Changed: ---------------- trunk/flexotask-streaming/ Property changes on: trunk/flexotask-streaming ___________________________________________________________________ Added: svn:ignore + streamit.jar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jhs...@us...> - 2009-04-12 15:51:58
|
Revision: 154 http://flexotask.svn.sourceforge.net/flexotask/?rev=154&view=rev Author: jhspring Date: 2009-04-12 15:51:56 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Initial import. Added Paths: ----------- trunk/flexotask-streaming-feature/.project trunk/flexotask-streaming-feature/build.properties trunk/flexotask-streaming-feature/feature.xml Added: trunk/flexotask-streaming-feature/.project =================================================================== --- trunk/flexotask-streaming-feature/.project (rev 0) +++ trunk/flexotask-streaming-feature/.project 2009-04-12 15:51:56 UTC (rev 154) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>flexotask-streaming-feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription> Added: trunk/flexotask-streaming-feature/build.properties =================================================================== --- trunk/flexotask-streaming-feature/build.properties (rev 0) +++ trunk/flexotask-streaming-feature/build.properties 2009-04-12 15:51:56 UTC (rev 154) @@ -0,0 +1 @@ +bin.includes = feature.xml Added: trunk/flexotask-streaming-feature/feature.xml =================================================================== --- trunk/flexotask-streaming-feature/feature.xml (rev 0) +++ trunk/flexotask-streaming-feature/feature.xml 2009-04-12 15:51:56 UTC (rev 154) @@ -0,0 +1,274 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="com.ibm.realtime.flexotask.streaming" + label="Flexotask Streaming Scheduler and Timing Grammar" + version="1.1.0" + provider-name="IBM Research and Ecole Polytechnique Federale de Lausanne (EPFL)"> + + <description> + Streaming Scheduler and Timing Grammar for the Flexible Task Graphs System + </description> + + <copyright> + Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique Federale de Lausanne (EPFL). +All rights reserved. This program and the accompanying materials +are made available under the terms of the Eclipse Public License +v1.0 which accompanies this distribution, is available at +http://www.eclipse.org/legal/epl-v10.html. + +Contributors: +IBM Corporation +EPFL + </copyright> + + <license> + Flexible Task Graphs Software User Agreement November 7, 2008 +The Flexible Task Graphs software is licensed under the terms of the +Eclipse Public License v1.0. http://www.eclipse.org/legal/epl-v10.html, +which follows. + + Eclipse Public License -v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF +THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and +are distributed by that particular Contributor. A Contribution +'originates' from a Contributor if it was added to the Program by such +Contributor itself or anyone acting on such Contributor's behalf. +Contributions do not include additions to the Program which: (i) are +separate modules of software distributed in conjunction with the Program +under their own license agreement, and (ii) are not derivative works of +the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free copyright +license to reproduce, prepare derivative works of, publicly display, +publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and +object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free patent license +under Licensed Patents to make, use, sell, offer to sell, import and +otherwise transfer the Contribution of such Contributor, if any, in +source code and object code form. This patent license shall apply to the +combination of the Contribution and the Program if, at the time the +Contribution is added by the Contributor, such addition of the +Contribution causes such combination to be covered by the Licensed +Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the +licenses to its Contributions set forth herein, no assurances are +provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility to +secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow Recipient +to distribute the Program, it is Recipient's responsibility to acquire +that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright +license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form +under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties +and conditions, express and implied, including warranties or conditions +of title and non-infringement, and implied warranties or conditions of +merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and +consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are +offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable +manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained +within the Program. + +Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, the +Contributor who includes the Program in a commercial product offering +should do so in a manner which does not create potential liability for +other Contributors. Therefore, if a Contributor includes the Program in +a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the +Program in a commercial product offering. The obligations in this +section do not apply to any claims or Losses relating to any actual or +alleged intellectual property infringement. In order to qualify, an +Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial +Contributor to control, and cooperate with the Commercial Contributor +in, the defense and any related settlement negotiations. The Indemnified +Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED +ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES +OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR +A PARTICULAR PURPOSE. Each Recipient is solely responsible for +determining the appropriateness of using and distributing the Program +and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program +errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR +ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further action +by the parties hereto, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including +a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or +hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails +to comply with any of the material terms or conditions of this Agreement +and does not cure such failure in a reasonable period of time after +becoming aware of such noncompliance. If all Recipient's rights under +this Agreement terminate, Recipient agrees to cease use and distribution +of the Program as soon as reasonably practicable. However, Recipient's +obligations under this Agreement and any licenses granted by Recipient +relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and may +only be modified in the following manner. The Agreement Steward reserves +the right to publish new versions (including revisions) of this +Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the +initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is +published, Contributor may elect to distribute the Program (including +its Contributions) under the new version. Except as expressly stated in +Sections 2(a) and 2(b) above, Recipient receives no rights or licenses +to the intellectual property of any Contributor under this Agreement, +whether expressly, by implication, estoppel or otherwise. All rights in +the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to +this Agreement will bring a legal action under this Agreement more than +one year after the cause of action arose. Each party waives its rights +to a jury trial in any resulting litigation. + </license> + + <url> + <update label="Flexible Task Graphs" url="http://flexotask.sourceforge.net/update-site"/> + </url> + + <requires> + <import feature="com.ibm.realtime.flexotask.feature" version="1.1.0"/> + <import plugin="org.eclipse.ui"/> + <import plugin="org.eclipse.core.runtime"/> + <import plugin="com.ibm.realtime.flexotask"/> + <import plugin="org.eclipse.ui.views"/> + <import plugin="com.ibm.realtime.flexotask.editor"/> + <import plugin="org.eclipse.draw2d"/> + </requires> + + <plugin + id="com.ibm.realtime.flexotask.streaming" + download-size="0" + install-size="0" + version="1.1.0"/> + +</feature> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jhs...@us...> - 2009-04-12 15:51:32
|
Revision: 153 http://flexotask.svn.sourceforge.net/flexotask/?rev=153&view=rev Author: jhspring Date: 2009-04-12 15:51:31 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Initial import. Added Paths: ----------- trunk/flexotask-streaming-feature/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jhs...@us...> - 2009-04-12 15:50:37
|
Revision: 152 http://flexotask.svn.sourceforge.net/flexotask/?rev=152&view=rev Author: jhspring Date: 2009-04-12 15:50:34 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Initial import. Added Paths: ----------- trunk/flexotask-streaming-examples/.classpath trunk/flexotask-streaming-examples/.project trunk/flexotask-streaming-examples/src/ trunk/flexotask-streaming-examples/src/common/ trunk/flexotask-streaming-examples/src/common/DummyTask.java trunk/flexotask-streaming-examples/src/common/MiddleTask.java trunk/flexotask-streaming-examples/src/common/ParallelizingWorkEstimator.java trunk/flexotask-streaming-examples/src/common/SinkTask.java trunk/flexotask-streaming-examples/src/common/SourceTask.java trunk/flexotask-streaming-examples/src/complex/ trunk/flexotask-streaming-examples/src/complex/ComplexDuoMain.java trunk/flexotask-streaming-examples/src/complex/ComplexUniMain.java trunk/flexotask-streaming-examples/src/complex/flexotaskGraphComplex.ftg trunk/flexotask-streaming-examples/src/fft2/ trunk/flexotask-streaming-examples/src/fft2/CombineDFT.java trunk/flexotask-streaming-examples/src/fft2/FFT2Main.java trunk/flexotask-streaming-examples/src/fft2/FFTReorderSimple.java trunk/flexotask-streaming-examples/src/fft2/FFTTestSource.java trunk/flexotask-streaming-examples/src/fft2/FloatPrinter.java trunk/flexotask-streaming-examples/src/simple/ trunk/flexotask-streaming-examples/src/simple/SimpleDuoMain.java trunk/flexotask-streaming-examples/src/simple/SimpleUniMain.java trunk/flexotask-streaming-examples/src/simple/flexotaskGraphSimple.ftg trunk/flexotask-streaming-examples/src/splitjoindup/ trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupDuoMain.java trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupUniMain.java trunk/flexotask-streaming-examples/src/splitjoindup/flexotaskGraphSJ.ftg trunk/flexotask-streaming-examples/src/splitjoinrr/ trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRDuoMain.java trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRUniMain.java trunk/flexotask-streaming-examples/src/splitjoinrr/flexotaskGraphSJ.ftg Added: trunk/flexotask-streaming-examples/.classpath =================================================================== --- trunk/flexotask-streaming-examples/.classpath (rev 0) +++ trunk/flexotask-streaming-examples/.classpath 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="com.ibm.realtime.flexotask.editor.classpath/1.0"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/flexotask-streaming-examples/.project =================================================================== --- trunk/flexotask-streaming-examples/.project (rev 0) +++ trunk/flexotask-streaming-examples/.project 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>flexotask-streaming-examples</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>FlexotaskBuilder.builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>FlexotaskBuilder.nature</nature> + </natures> +</projectDescription> Added: trunk/flexotask-streaming-examples/src/common/DummyTask.java =================================================================== --- trunk/flexotask-streaming-examples/src/common/DummyTask.java (rev 0) +++ trunk/flexotask-streaming-examples/src/common/DummyTask.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,28 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package common; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; + +public class DummyTask implements Flexotask { + public void execute() { + } + + public void initialize(FlexotaskInputPort[] arg0, FlexotaskOutputPort[] arg1, Object arg2) { + } +} Added: trunk/flexotask-streaming-examples/src/common/MiddleTask.java =================================================================== --- trunk/flexotask-streaming-examples/src/common/MiddleTask.java (rev 0) +++ trunk/flexotask-streaming-examples/src/common/MiddleTask.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,49 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package common; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; +import com.ibm.realtime.flexotask.util.ESystem; + +public class MiddleTask implements Flexotask { + private int mult = 1; + private FlexotaskOutputPort output; + private FlexotaskInputPort input; + + public void execute() { + Object o = input.getValue(); + ESystem.out.println("Relaying: " + o); + if (o == null) + throw new Error("Relaying null!"); + output.setValue(o); + } + + public void initialize(FlexotaskInputPort[] arg0, FlexotaskOutputPort[] arg1, Object arg2) { + if ((arg0 == null) || (arg0.length != 1)) + throw new RuntimeException("Expected single intput port is not present!"); + input = arg0[0]; + if ((arg1 == null) || (arg1.length != 1)) + throw new RuntimeException("Expected single output port is not present!"); + output = arg1[0]; + if (arg2 != null) { + if (!(arg2 instanceof Integer)) + throw new RuntimeException("Expected integer value not provided!"); + mult = ((Integer) arg2).intValue(); + } + } +} \ No newline at end of file Added: trunk/flexotask-streaming-examples/src/common/ParallelizingWorkEstimator.java =================================================================== --- trunk/flexotask-streaming-examples/src/common/ParallelizingWorkEstimator.java (rev 0) +++ trunk/flexotask-streaming-examples/src/common/ParallelizingWorkEstimator.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,34 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package common; + +import at.dms.kjc.JPhylum; +import at.dms.kjc.sir.SIRFilter; +import at.dms.kjc.sir.lowering.partition.WorkEstimate.WorkVisitorIntf; + +public class ParallelizingWorkEstimator implements WorkVisitorIntf { + + public long getWork(SIRFilter theFilter) { + // TODO Auto-generated method stub + return 10000; + } + + public long getWork(SIRFilter theFilter, JPhylum node) { + // TODO Auto-generated method stub + return 10000; + } + +} Added: trunk/flexotask-streaming-examples/src/common/SinkTask.java =================================================================== --- trunk/flexotask-streaming-examples/src/common/SinkTask.java (rev 0) +++ trunk/flexotask-streaming-examples/src/common/SinkTask.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,44 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package common; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; +import com.ibm.realtime.flexotask.util.ESystem; + +public class SinkTask implements Flexotask { + private int mult = 1; + private FlexotaskInputPort input; + + public void execute() { + for (int i = 0; i < mult; i++) { + Integer ival = (Integer) input.getValue(); + ESystem.out.println("Received: " + ival.intValue()); + } + } + + public void initialize(FlexotaskInputPort[] arg0, FlexotaskOutputPort[] arg1, Object arg2) { + if ((arg0 == null) || (arg0.length != 1)) + throw new RuntimeException("Expected single intput port is not present!"); + input = arg0[0]; + if (arg2 != null) { + if (!(arg2 instanceof Integer)) + throw new RuntimeException("Expected integer value not provided!"); + mult = ((Integer) arg2).intValue(); + } + } +} \ No newline at end of file Added: trunk/flexotask-streaming-examples/src/common/SourceTask.java =================================================================== --- trunk/flexotask-streaming-examples/src/common/SourceTask.java (rev 0) +++ trunk/flexotask-streaming-examples/src/common/SourceTask.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,44 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package common; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; +import com.ibm.realtime.flexotask.util.ESystem; + +public class SourceTask implements Flexotask { + private int mult = 1; + private FlexotaskOutputPort output; + private int count = 0; + + public void execute() { + count++; + ESystem.out.println("Outputting: " + count); + output.setValue(new Integer(count)); + } + + public void initialize(FlexotaskInputPort[] arg0, FlexotaskOutputPort[] arg1, Object arg2) { + if ((arg1 == null) || (arg1.length != 1)) + throw new RuntimeException("Expected single output port is not present!"); + output = arg1[0]; + if (arg2 != null) { + if (!(arg2 instanceof Integer)) + throw new RuntimeException("Expected integer value not provided!"); + mult = ((Integer) arg2).intValue(); + } + } +} \ No newline at end of file Added: trunk/flexotask-streaming-examples/src/complex/ComplexDuoMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/complex/ComplexDuoMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/complex/ComplexDuoMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,52 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package complex; + +import java.io.InputStream; +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + +public class ComplexDuoMain { + private static final int HEAP_SIZE = 10 * 1024 * 1024; + private static final int NUM_CORES = 2; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = ComplexDuoMain.class.getResourceAsStream("flexotaskGraphComplex.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + // use work estimator forcing distribution on cores + ((StreamBasedGlobalTimingData) spec.getTimingData()).setWorkEstimator("common.ParallelizingWorkEstimator"); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/20, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + } +} Added: trunk/flexotask-streaming-examples/src/complex/ComplexUniMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/complex/ComplexUniMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/complex/ComplexUniMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,50 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package complex; + +import java.io.InputStream; +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + +public class ComplexUniMain { + private static final int HEAP_SIZE = 10 * 1024 * 1024; + private static final int NUM_CORES = 1; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = ComplexUniMain.class.getResourceAsStream("flexotaskGraphComplex.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/20, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + Thread.sleep(5000); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + } +} Added: trunk/flexotask-streaming-examples/src/complex/flexotaskGraphComplex.ftg =================================================================== --- trunk/flexotask-streaming-examples/src/complex/flexotaskGraphComplex.ftg (rev 0) +++ trunk/flexotask-streaming-examples/src/complex/flexotaskGraphComplex.ftg 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,63 @@ +<FlexotaskTemplate> + <TimingProvider kind='streambased' parser='com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingDataParser' graphics='60 60 37 21' period='1s'/> + <Task id='task1' implementation='common.SourceTask' isolation='strong' graphics='60 60 165 299'> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task20' implementation='common.MiddleTask' isolation='strong' graphics='60 60 678 96'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task18' implementation='common.MiddleTask' isolation='strong' graphics='60 60 523 182'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task17' implementation='common.MiddleTask' isolation='strong' graphics='60 60 523 96'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task7' implementation='common.SinkTask' isolation='strong' graphics='60 60 899 304'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2' implementation='common.MiddleTask' isolation='strong' graphics='60 60 322 182'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task19' implementation='common.MiddleTask' isolation='strong' graphics='60 60 523 261'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task21' implementation='common.MiddleTask' isolation='strong' graphics='60 60 779 182'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Connection id='task20_task21' source='task20' target='task21' mode='deepclone'> + </Connection> + <Connection id='task18_task21' source='task18' target='task21' mode='deepclone'> + </Connection> + <Connection id='task2_task18' source='task2' target='task18' mode='deepclone'> + </Connection> + <Connection id='task2_task19' source='task2' target='task19' mode='deepclone'> + </Connection> + <Connection id='task19_task21' source='task19' target='task21' mode='deepclone'> + </Connection> + <Connection id='task21_task7' source='task21' target='task7' mode='deepclone'> + </Connection> + <Connection id='task2_task17' source='task2' target='task17' mode='deepclone'> + </Connection> + <Connection id='task1_task2' source='task1' target='task2' mode='deepclone'> + </Connection> + <Connection id='task17_task20' source='task17' target='task20' mode='deepclone'> + </Connection> + <Allocation allow='true'></Allocation> + <Synchronization allow='true'></Synchronization> + <Stable mode='default'> + </Stable> +</FlexotaskTemplate> Added: trunk/flexotask-streaming-examples/src/fft2/CombineDFT.java =================================================================== --- trunk/flexotask-streaming-examples/src/fft2/CombineDFT.java (rev 0) +++ trunk/flexotask-streaming-examples/src/fft2/CombineDFT.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,70 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package fft2; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; + +public class CombineDFT implements Flexotask { + private FlexotaskInputPort<Float> input; + private FlexotaskOutputPort<Float> output; + private int N; + private float wn_r, wn_i; + private float results[]; + + public void execute() { + int i; + float w_r = 1; + float w_i = 0; + for (i = 0; i < N; i += 2) { + float y0_r = input.peek(i); + float y0_i = input.peek(i+1); + float y1_r = input.peek(N + i); + float y1_i = input.peek(N + i + 1); + + float y1w_r = y1_r * w_r - y1_i * w_i; + float y1w_i = y1_r * w_i + y1_i * w_r; + + results[i] = y0_r + y1w_r; + results[i + 1] = y0_i + y1w_i; + + results[N + i] = y0_r - y1w_r; + results[N + i + 1] = y0_i - y1w_i; + + float w_r_next = w_r * wn_r - w_i * wn_i; + float w_i_next = w_r * wn_i + w_i * wn_r; + w_r = w_r_next; + w_i = w_i_next; + } + + for (i = 0; i < 2 * N; i++) { + input.getValue(); + output.setValue(results[i]); + } + } + + public void initialize(FlexotaskInputPort[] inputPorts, + FlexotaskOutputPort[] outputPorts, Object parameter) { + input = inputPorts[0]; + output = outputPorts[0]; + N = ((Integer) parameter).intValue(); + wn_r = (float) Math.cos(2 * 3.141592654 / ((double) N)); + wn_i = (float) Math.sin(2 * 3.141592654 / ((double) N)); + results = new float[2 * N]; + } + +} Added: trunk/flexotask-streaming-examples/src/fft2/FFT2Main.java =================================================================== --- trunk/flexotask-streaming-examples/src/fft2/FFT2Main.java (rev 0) +++ trunk/flexotask-streaming-examples/src/fft2/FFT2Main.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,145 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package fft2; + +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskConnectionTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskTaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.timing.streaming.FlexotaskTaskIORate; +import com.ibm.realtime.flexotask.timing.streaming.FlexotaskTaskPortMuxMode; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingAnnotation; + +import common.ParallelizingWorkEstimator; + +/** + * This example is taken from the Streamit benchmark code available at: + * <p> + * http://www.cag.lcs.mit.edu/streamit/apps/benchmarks/fft/streamit/FFT2.str + * <p> + * and: + * <p> + * http://www.cag.lcs.mit.edu/streamit/results/fft/code/streamit/index.html + * <p> + * The code demonstrates a fast fourier transform. + */ +public class FFT2Main { + private static final int HEAP_SIZE = 10 * 1024 * 1024; + private static final int NUM_CORES = 2; // number of cores + private static final long PERIOD = 1000 * 1000 * 1000; // use 1sec period to 'see' the output + + private static final int N = 64; + + public static void main(String argv[]) throws Exception { + + FlexotaskTemplate spec = new FlexotaskTemplate(); + spec.setTimingData(new StreamBasedGlobalTimingData(PERIOD, ParallelizingWorkEstimator.class.getName())); + + HashMap parameters = new HashMap(); + + // create task: fftTestSource (global splitter) + FlexotaskTaskTemplate fftTestSource = new FlexotaskTaskTemplate(); + fftTestSource.setName("fftTestSource"); + fftTestSource.setImplementationClass(FFTTestSource.class.getName()); + fftTestSource.setOutputPorts(new String[]{Float.class.getName()}, new boolean[]{true}, new String[]{"out"}); + fftTestSource.setTimingData(new StreamBasedTimingAnnotation(null, null, new FlexotaskTaskIORate(N * 2), FlexotaskTaskPortMuxMode.ROUNDROBIN, false)); + spec.getTasks().add(fftTestSource); + parameters.put(fftTestSource.getName(), new Integer(N)); + + // create task: floatPrinter (global joiner) + FlexotaskTaskTemplate floatPrinter = new FlexotaskTaskTemplate(); + floatPrinter.setName("floatPrinter"); + floatPrinter.setImplementationClass(FloatPrinter.class.getName()); + floatPrinter.setInputPorts(new String[]{Float.class.getName()}, new boolean[]{true}, new String[]{"in"}); + floatPrinter.setTimingData(new StreamBasedTimingAnnotation(new FlexotaskTaskIORate(N * 2), null, null, null, false)); + spec.getTasks().add(floatPrinter); + + for (int i = 0; i < 2; i++) { + FlexotaskTaskTemplate previousTask = fftTestSource; + for (int k = 1; k < (N/2); k *= 2) { + // create task: fftTestSource + FlexotaskTaskTemplate fftReorderSimple = new FlexotaskTaskTemplate(); + fftReorderSimple.setName("fftReorderSimple-" + i + "-" + k); + fftReorderSimple.setImplementationClass(FFTReorderSimple.class.getName()); + fftReorderSimple.setInputPorts(new String[]{Float.class.getName()}, new boolean[]{true}, new String[]{"in"}); + fftReorderSimple.setOutputPorts(new String[]{Float.class.getName()}, new boolean[]{true}, new String[]{"out"}); + fftReorderSimple.setTimingData(new StreamBasedTimingAnnotation(new FlexotaskTaskIORate((N / k) * 2), null, new FlexotaskTaskIORate((N / k) * 2), null, false)); + spec.getTasks().add(fftReorderSimple); + parameters.put(fftReorderSimple.getName(), new Integer(N / k)); + + // create connection + FlexotaskConnectionTemplate conn = new FlexotaskConnectionTemplate(); + conn.setName("conn-" + fftReorderSimple.getName()); + conn.setInput(previousTask); + conn.setInputPortToWrite(0); + conn.setOutput(fftReorderSimple); + conn.setOutputPortToRead(0); + spec.getConnections().add(conn); + + previousTask = fftReorderSimple; + } + + for (int j = 2; j <= N; j *= 2) { + // create task: combineDFT + FlexotaskTaskTemplate combineDFT = new FlexotaskTaskTemplate(); + combineDFT.setName("combineDFT-" + i + "-" + j); + combineDFT.setImplementationClass(CombineDFT.class.getName()); + combineDFT.setInputPorts(new String[]{Float.class.getName()}, new boolean[]{true}, new String[]{"in"}); + combineDFT.setOutputPorts(new String[]{Float.class.getName()}, new boolean[]{true}, new String[]{"out"}); + combineDFT.setTimingData(new StreamBasedTimingAnnotation(new FlexotaskTaskIORate(j * 2), null, new FlexotaskTaskIORate(j * 2), null, false)); + spec.getTasks().add(combineDFT); + parameters.put(combineDFT.getName(), new Integer(j)); + + // create connection + FlexotaskConnectionTemplate conn = new FlexotaskConnectionTemplate(); + conn.setName("conn-" + combineDFT.getName()); + conn.setInput(previousTask); + conn.setInputPortToWrite(0); + conn.setOutput(combineDFT); + conn.setOutputPortToRead(0); + spec.getConnections().add(conn); + + previousTask = combineDFT; + } + + // create connection + FlexotaskConnectionTemplate conn = new FlexotaskConnectionTemplate(); + conn.setName("conn-" + previousTask.getName() + i + "-floatPrinter"); + conn.setInput(previousTask); + conn.setInputPortToWrite(0); + conn.setOutput(floatPrinter); + conn.setOutputPortToRead(0); + spec.getConnections().add(conn); + } + + try { + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/N, globalData); + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, parameters); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000 * 10000); + + } +} Added: trunk/flexotask-streaming-examples/src/fft2/FFTReorderSimple.java =================================================================== --- trunk/flexotask-streaming-examples/src/fft2/FFTReorderSimple.java (rev 0) +++ trunk/flexotask-streaming-examples/src/fft2/FFTReorderSimple.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,54 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package fft2; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; + +public class FFTReorderSimple implements Flexotask { + private FlexotaskInputPort<Float> input; + private FlexotaskOutputPort<Float> output; + private int N, totalData; + + public void execute() { + int i; + for (i = 0; i < totalData; i+=4) { + output.setValue(input.peek(i)); + output.setValue(input.peek(i+1)); + } + + for (i = 2; i < totalData; i+=4) { + output.setValue(input.peek(i)); + output.setValue(input.peek(i+1)); + } + + for (i = 0; i < N; i++) { + input.getValue(); + input.getValue(); + } + + } + + public void initialize(FlexotaskInputPort[] inputPorts, + FlexotaskOutputPort[] outputPorts, Object parameter) { + input = inputPorts[0]; + output = outputPorts[0]; + N = ((Integer) parameter).intValue(); + totalData = N * 2; + } + +} Added: trunk/flexotask-streaming-examples/src/fft2/FFTTestSource.java =================================================================== --- trunk/flexotask-streaming-examples/src/fft2/FFTTestSource.java (rev 0) +++ trunk/flexotask-streaming-examples/src/fft2/FFTTestSource.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,41 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package fft2; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; + +public class FFTTestSource implements Flexotask { + private FlexotaskOutputPort<Float> output; + private int N; + + public void execute() { + output.setValue(0.0f); + output.setValue(0.0f); + output.setValue(1.0f); + output.setValue(0.0f); + for (int i = 0; i < 2 * (N - 2); i++) + output.setValue(0.0f); + } + + public void initialize(FlexotaskInputPort[] inputPorts, + FlexotaskOutputPort[] outputPorts, Object parameter) { + output = outputPorts[0]; + N = ((Integer) parameter).intValue(); + } + +} Added: trunk/flexotask-streaming-examples/src/fft2/FloatPrinter.java =================================================================== --- trunk/flexotask-streaming-examples/src/fft2/FloatPrinter.java (rev 0) +++ trunk/flexotask-streaming-examples/src/fft2/FloatPrinter.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,35 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package fft2; + +import com.ibm.realtime.flexotask.Flexotask; +import com.ibm.realtime.flexotask.FlexotaskInputPort; +import com.ibm.realtime.flexotask.FlexotaskOutputPort; +import com.ibm.realtime.flexotask.util.ESystem; + +public class FloatPrinter implements Flexotask { + private FlexotaskInputPort<Float> input; + + public void execute() { + float value = input.getValue().floatValue(); + //ESystem.err.println("Value: " + value); + } + + public void initialize(FlexotaskInputPort[] inputPorts, + FlexotaskOutputPort[] outputPorts, Object parameter) { + input = inputPorts[0]; + } +} Added: trunk/flexotask-streaming-examples/src/simple/SimpleDuoMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/simple/SimpleDuoMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/simple/SimpleDuoMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,52 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package simple; + +import java.io.InputStream; +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + +public class SimpleDuoMain { + private static final int HEAP_SIZE = 8 * 1024 * 1024; + private static final int NUM_CORES = 2; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = SimpleUniMain.class.getResourceAsStream("flexotaskGraphSimple.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + // use work estimator forcing distribution on cores + ((StreamBasedGlobalTimingData) spec.getTimingData()).setWorkEstimator("common.ParallelizingWorkEstimator"); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/10, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + } +} Added: trunk/flexotask-streaming-examples/src/simple/SimpleUniMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/simple/SimpleUniMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/simple/SimpleUniMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,49 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package simple; + +import java.io.InputStream; +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + +public class SimpleUniMain { + private static final int HEAP_SIZE = 8 * 1024 * 1024; + private static final int NUM_CORES = 1; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = SimpleUniMain.class.getResourceAsStream("flexotaskGraphSimple.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/10, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + } +} Added: trunk/flexotask-streaming-examples/src/simple/flexotaskGraphSimple.ftg =================================================================== --- trunk/flexotask-streaming-examples/src/simple/flexotaskGraphSimple.ftg (rev 0) +++ trunk/flexotask-streaming-examples/src/simple/flexotaskGraphSimple.ftg 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,24 @@ +<FlexotaskTemplate> + <TimingProvider kind='streambased' parser='com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingDataParser' graphics='60 60 457 116' period='1s'/> + <Task id='task1' implementation='common.SourceTask' isolation='strong' graphics='60 60 202 261'> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task3' implementation='common.SinkTask' isolation='strong' graphics='60 60 705 261'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2' implementation='common.MiddleTask' isolation='strong' graphics='60 60 457 261'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Connection id='task1_task2' source='task1' target='task2' mode='deepclone'> + </Connection> + <Connection id='task2_task3' source='task2' target='task3' mode='deepclone'> + </Connection> + <Allocation allow='true'></Allocation> + <Synchronization allow='true'></Synchronization> + <Stable mode='default'> + </Stable> +</FlexotaskTemplate> Added: trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupDuoMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupDuoMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupDuoMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,54 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package splitjoindup; + +import java.io.InputStream; +import java.util.HashMap; + + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + +public class SplitJoinDupDuoMain { + private static final int HEAP_SIZE = 8 * 1024 * 1024; + private static final int NUM_CORES = 2; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = SplitJoinDupUniMain.class.getResourceAsStream("flexotaskGraphSJ.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + // use work estimator forcing distribution on cores + ((StreamBasedGlobalTimingData) spec.getTimingData()).setWorkEstimator("common.ParallelizingWorkEstimator"); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/10, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + + } +} Added: trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupUniMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupUniMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/splitjoindup/SplitJoinDupUniMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,51 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package splitjoindup; + +import java.io.InputStream; +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + + +public class SplitJoinDupUniMain { + private static final int HEAP_SIZE = 8 * 1024 * 1024; + private static final int NUM_CORES = 1; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = SplitJoinDupUniMain.class.getResourceAsStream("flexotaskGraphSJ.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/10, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000 * 10000); + } +} Added: trunk/flexotask-streaming-examples/src/splitjoindup/flexotaskGraphSJ.ftg =================================================================== --- trunk/flexotask-streaming-examples/src/splitjoindup/flexotaskGraphSJ.ftg (rev 0) +++ trunk/flexotask-streaming-examples/src/splitjoindup/flexotaskGraphSJ.ftg 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,47 @@ +<FlexotaskTemplate> + <TimingProvider kind='streambased' parser='com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingDataParser' graphics='60 60 440 13' period='1s'/> + <Task id='task1' implementation='common.SourceTask' isolation='strong' graphics='60 60 80 238'> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task3' implementation='common.MiddleTask' isolation='strong' graphics='60 60 532 233'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2r' implementation='common.MiddleTask' isolation='strong' graphics='60 60 394 156'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task4' implementation='common.SinkTask' isolation='strong' graphics='60 60 663 233'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2l' implementation='common.MiddleTask' isolation='strong' graphics='60 60 392 336'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2' implementation='common.MiddleTask' isolation='strong' graphics='60 60 203 238'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Connection id='task2r_task3' source='task2r' target='task3' mode='deepclone'> + </Connection> + <Connection id='task1_task2' source='task1' target='task2' mode='deepclone'> + </Connection> + <Connection id='task2l_task3' source='task2l' target='task3' mode='deepclone'> + </Connection> + <Connection id='task3_task4' source='task3' target='task4' mode='deepclone'> + </Connection> + <Connection id='task2_task2l' source='task2' target='task2l' mode='deepclone'> + </Connection> + <Connection id='task2_task2r' source='task2' target='task2r' mode='deepclone'> + </Connection> + <Allocation allow='true'></Allocation> + <Synchronization allow='true'></Synchronization> + <Stable mode='default'> + </Stable> +</FlexotaskTemplate> Added: trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRDuoMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRDuoMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRDuoMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,54 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package splitjoinrr; + +import java.io.InputStream; +import java.util.HashMap; + + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + +public class SplitJoinRRDuoMain { + private static final int HEAP_SIZE = 8 * 1024 * 1024; + private static final int NUM_CORES = 2; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = SplitJoinRRUniMain.class.getResourceAsStream("flexotaskGraphSJ.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + // use work estimator forcing distribution on cores + ((StreamBasedGlobalTimingData) spec.getTimingData()).setWorkEstimator("common.ParallelizingWorkEstimator"); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/10, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + + } +} Added: trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRUniMain.java =================================================================== --- trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRUniMain.java (rev 0) +++ trunk/flexotask-streaming-examples/src/splitjoinrr/SplitJoinRRUniMain.java 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,51 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package splitjoinrr; + +import java.io.InputStream; +import java.util.HashMap; + +import com.ibm.realtime.flexotask.FlexotaskGraph; +import com.ibm.realtime.flexotask.scheduling.FlexotaskGlobalSchedulingElement; +import com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulingData; +import com.ibm.realtime.flexotask.template.FlexotaskTemplate; +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; +import com.ibm.realtime.flexotask.tools.FlexotaskXMLParser; + + +public class SplitJoinRRUniMain { + private static final int HEAP_SIZE = 8 * 1024 * 1024; + private static final int NUM_CORES = 1; + + public static void main(String[] argv) throws Exception { + + // build the graph + InputStream in = SplitJoinRRUniMain.class.getResourceAsStream("flexotaskGraphSJ.ftg"); + FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); + + FlexotaskGlobalSchedulingElement globalData = new FlexotaskGlobalSchedulingElement(HEAP_SIZE, HEAP_SIZE, NUM_CORES); + FlexotaskSchedulingData systemData = new FlexotaskSchedulingData(spec, HEAP_SIZE/10, globalData); + + try { + FlexotaskGraph graph = spec.validate("StreamScheduler", systemData, new HashMap()); + graph.getRunner().start(); + } + catch (Throwable e) { + e.printStackTrace(); + } + Thread.sleep(10000); + } +} Added: trunk/flexotask-streaming-examples/src/splitjoinrr/flexotaskGraphSJ.ftg =================================================================== --- trunk/flexotask-streaming-examples/src/splitjoinrr/flexotaskGraphSJ.ftg (rev 0) +++ trunk/flexotask-streaming-examples/src/splitjoinrr/flexotaskGraphSJ.ftg 2009-04-12 15:50:34 UTC (rev 152) @@ -0,0 +1,47 @@ +<FlexotaskTemplate> + <TimingProvider kind='streambased' parser='com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingDataParser' graphics='60 60 440 13' period='1s'/> + <Task id='task1' implementation='common.SourceTask' isolation='strong' graphics='60 60 91 234'> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2r' implementation='common.MiddleTask' isolation='strong' graphics='60 60 378 141'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task3' implementation='common.MiddleTask' isolation='strong' graphics='60 60 524 231'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task4' implementation='common.SinkTask' isolation='strong' graphics='60 60 671 231'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2' implementation='common.MiddleTask' isolation='strong' graphics='60 60 210 234'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Task id='task2l' implementation='common.MiddleTask' isolation='strong' graphics='60 60 387 345'> + <Input id='in0' type='java.lang.Integer' isBuffered='true'/> + <Output id='out0' type='java.lang.Integer' isBuffered='true'/> + <Timing popRate='1' pushRate='1' outputPortMuxMode='roundrobin' isStateless='false' ></Timing> + </Task> + <Connection id='task2r_task3' source='task2r' target='task3' mode='deepclone'> + </Connection> + <Connection id='task2_task2r' source='task2' target='task2r' mode='deepclone'> + </Connection> + <Connection id='task3_task4' source='task3' target='task4' mode='deepclone'> + </Connection> + <Connection id='task2_task2l' source='task2' target='task2l' mode='deepclone'> + </Connection> + <Connection id='task2l_task3' source='task2l' target='task3' mode='deepclone'> + </Connection> + <Connection id='task1_task2' source='task1' target='task2' mode='deepclone'> + </Connection> + <Allocation allow='true'></Allocation> + <Synchronization allow='true'></Synchronization> + <Stable mode='default'> + </Stable> +</FlexotaskTemplate> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jhs...@us...> - 2009-04-12 15:48:20
|
Revision: 151 http://flexotask.svn.sourceforge.net/flexotask/?rev=151&view=rev Author: jhspring Date: 2009-04-12 15:48:19 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Initial import. Added Paths: ----------- trunk/flexotask-streaming-examples/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jhs...@us...> - 2009-04-12 15:47:03
|
Revision: 150 http://flexotask.svn.sourceforge.net/flexotask/?rev=150&view=rev Author: jhspring Date: 2009-04-12 15:46:57 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Initial import. Added Paths: ----------- trunk/flexotask-streaming/.classpath trunk/flexotask-streaming/.project trunk/flexotask-streaming/META-INF/ trunk/flexotask-streaming/META-INF/MANIFEST.MF trunk/flexotask-streaming/build.properties trunk/flexotask-streaming/debug.xml trunk/flexotask-streaming/getstreamit-licensing.txt trunk/flexotask-streaming/getstreamit.xml trunk/flexotask-streaming/plugin.xml trunk/flexotask-streaming/src/ trunk/flexotask-streaming/src/META-INF/ trunk/flexotask-streaming/src/META-INF/services/ trunk/flexotask-streaming/src/META-INF/services/com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulerFactory trunk/flexotask-streaming/src/com/ trunk/flexotask-streaming/src/com/ibm/ trunk/flexotask-streaming/src/com/ibm/realtime/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORateCellEditor.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORatePropertyDescriptor.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/FlexotaskStreamingPlugin.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGrammarProvider.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedLocalTiming.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorPropertyDescriptor.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorSelectingCellEditor.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/BlockingConnectionRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/ConnectionRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/CrossChainConnectionRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/DefaultWorkVisitor.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/NotifyingConnectionRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/Runner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/RunnerMaker.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/SchedulerMasterRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/SchedulerSlaveRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamBackEndFactory.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamComputeNode.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamComputeNodes.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamScheduler.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerFactory.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerMasterRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/StreamSchedulerSlaveRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/TaskRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/scheduling/streaming/TimedTaskRunner.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/streaming/ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/streaming/FlexotaskTaskIORate.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/streaming/FlexotaskTaskPortMuxMode.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/streaming/StreamBasedGlobalTimingData.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/streaming/StreamBasedTimingAnnotation.java trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/timing/streaming/StreamBasedTimingDataParser.java Added: trunk/flexotask-streaming/.classpath =================================================================== --- trunk/flexotask-streaming/.classpath (rev 0) +++ trunk/flexotask-streaming/.classpath 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry exported="true" kind="lib" path="streamit.jar" sourcepath="streamitsrc.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/flexotask-streaming/.project =================================================================== --- trunk/flexotask-streaming/.project (rev 0) +++ trunk/flexotask-streaming/.project 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>flexotask-streaming</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/flexotask-streaming debug.xml [Builder].launch</value> + </dictionary> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: trunk/flexotask-streaming/META-INF/MANIFEST.MF =================================================================== --- trunk/flexotask-streaming/META-INF/MANIFEST.MF (rev 0) +++ trunk/flexotask-streaming/META-INF/MANIFEST.MF 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Flexotask Streaming Scheduler and Timing Grammar Plug-in +Bundle-SymbolicName: com.ibm.realtime.flexotask.streaming;singleton:=true +Bundle-Version: 1.1.0 +Bundle-Activator: com.ibm.realtime.flexotask.editor.timing.streaming.FlexotaskStreamingPlugin +Bundle-Vendor: IBM Research and EPFL +Require-Bundle: com.ibm.realtime.analysis, + com.ibm.realtime.flexotask, + com.ibm.realtime.flexotask.editor, + org.eclipse.ui, + org.eclipse.ui.views, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.draw2d, + org.eclipse.jdt.core, + org.eclipse.jdt.ui +Eclipse-LazyStart: true +Export-Package: com.ibm.realtime.flexotask.editor.dialogs.streaming, + com.ibm.realtime.flexotask.editor.timing.streaming, + com.ibm.realtime.flexotask.scheduling.streaming, + com.ibm.realtime.flexotask.timing.streaming +Bundle-ClassPath: flexotaskStreaming.jar, + streamit.jar Added: trunk/flexotask-streaming/build.properties =================================================================== --- trunk/flexotask-streaming/build.properties (rev 0) +++ trunk/flexotask-streaming/build.properties 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,7 @@ +output.. = bin/ +bin.includes = META-INF/,\ + flexotaskStreaming.jar,\ + plugin.xml,\ + streamit.jar,\ + flexotaskStreamingsrc.zip +source.flexotaskStreaming.jar = src/ Added: trunk/flexotask-streaming/debug.xml =================================================================== --- trunk/flexotask-streaming/debug.xml (rev 0) +++ trunk/flexotask-streaming/debug.xml 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project default="makezip"> + <target name="makezip"> + <delete file="debug.zip"/> + <zip destfile="debug.zip"> + <fileset dir="src"/> + <fileset dir="bin"/> + <zipfileset src="streamit.jar"/> + </zip> + </target> +</project> \ No newline at end of file Added: trunk/flexotask-streaming/getstreamit-licensing.txt =================================================================== --- trunk/flexotask-streaming/getstreamit-licensing.txt (rev 0) +++ trunk/flexotask-streaming/getstreamit-licensing.txt 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,5 @@ + +Be aware that the StreamIt binaries are distributed with their own licensing +requirements that are different from those applied to this Flexotask Stream +Scheduler project. Please read the licensing requirements of StreamIt before +downloading the binaries through the getstreamit Ant script. \ No newline at end of file Added: trunk/flexotask-streaming/getstreamit.xml =================================================================== --- trunk/flexotask-streaming/getstreamit.xml (rev 0) +++ trunk/flexotask-streaming/getstreamit.xml 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project default="getstreamit"> + + <property name="streamitfile" value="streamit-2.1.1.tar.gz"/> + <property name="tmp" value="tmp"/> + <property name="tmp.tar.gz" value="tmp.tar.gz"/> + <property name="tmp.tar" value="tmp.tar"/> + <property name="target.jar" value="streamit.jar"/> + + + <target name="getstreamit"> + <delete file="${target.jar}"/> + + <delete includeEmptyDirs="true" quiet="true"> + <fileset dir="${tmp}"/> + </delete> + + <mkdir dir="${tmp}"/> + + <get src="http://cag.lcs.mit.edu/streamit/restricted/${streamitfile}" dest="${tmp}/${tmp.tar.gz}" /> + + <gunzip src="${tmp}/${tmp.tar.gz}" dest="${tmp}/${tmp.tar}"/> + + <untar src="${tmp}/${tmp.tar}" dest="${tmp}/../"> + <patternset> + <include name="**/streamit.jar"/> + </patternset> + <mapper type="flatten"/> + </untar> + + <delete includeEmptyDirs="true" quiet="true"> + <fileset dir="${tmp}"/> + </delete> + </target> +</project> \ No newline at end of file Added: trunk/flexotask-streaming/plugin.xml =================================================================== --- trunk/flexotask-streaming/plugin.xml (rev 0) +++ trunk/flexotask-streaming/plugin.xml 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<plugin> + <extension + id="com.ibm.realtime.flexotask.editor.timing.streaming.StreamBasedGrammarProvider" + name="Stream-based Timing Grammar Provider" + point="com.ibm.realtime.flexotask.editor.TimingGrammar"> + <handler + class="com.ibm.realtime.flexotask.editor.timing.streaming.StreamBasedGrammarProvider" + kind="Stream-based Timing Grammar Provider"> + </handler> + </extension> +</plugin> Added: trunk/flexotask-streaming/src/META-INF/services/com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulerFactory =================================================================== --- trunk/flexotask-streaming/src/META-INF/services/com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulerFactory (rev 0) +++ trunk/flexotask-streaming/src/META-INF/services/com.ibm.realtime.flexotask.scheduling.FlexotaskSchedulerFactory 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,2 @@ +# Declare the Streaming scheduler +com.ibm.realtime.flexotask.scheduling.streaming.StreamSchedulerFactory Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORateCellEditor.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORateCellEditor.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORateCellEditor.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,144 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.dialogs.streaming; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.TextCellEditor; +import org.eclipse.swt.widgets.Composite; + +import com.ibm.realtime.flexotask.template.FlexotaskValidationException; +import com.ibm.realtime.flexotask.timing.streaming.FlexotaskTaskIORate; + +/** + * An extended text cell editor capable of validating if the entered value + * represents a valid task I/O rate. + */ +public class TaskIORateCellEditor extends TextCellEditor { + + /** Last value set by doSetValue */ + Object lastValue = ""; + + /** Flag indicating that the error message dialog is running. This suppresses the usual + * behavior of focusLost and keyReleaseOccurred so that the dialog doesn't get fired too + * many times. + */ + private boolean dialogRunning; + + /** + * Constructor. + * @param parent + */ + public TaskIORateCellEditor(Composite parent) { + super(parent); + } + + // @see org.eclipse.jface.viewers.TextCellEditor#doGetValue() + protected Object doGetValue() { + String value = (String) super.doGetValue(); + + try { + lastValue = FlexotaskTaskIORate.getTaskIORate(value).toString(); + return lastValue; + } + catch (FlexotaskValidationException e) { + setValueValid(false); + displayFormatErrorMessage(); + } + return lastValue.toString(); + } + + // @see org.eclipse.jface.viewers.TextCellEditor#doSetValue(java.lang.Object) + protected void doSetValue(Object value) + { + if (value == null) { + lastValue = ""; + return; + } + try { + lastValue = FlexotaskTaskIORate.getTaskIORate((String) value).toString(); + setValueValid(true); + super.doSetValue(lastValue); + } + catch (FlexotaskValidationException e) { + setValueValid(false); + displayFormatErrorMessage(); + } + } + + private void displayFormatErrorMessage() { + if (!dialogRunning) { + /* Display error message */ + String[] buttonLabels = new String[] {"Ok"}; + String message = "The format of the specified port rate is incorrect. Please correct!\n\n" + + "Valid formats are:\n1) N (the definite rate)\n" + + "2) [N, N] (a rate range from minimum to maximum)\n" + + "3) [N, N, N] (a rate range from minimum over average to maximum)\n" + + "\nwhere N is a positive integer."; + + MessageDialog dialog = new MessageDialog(getControl().getShell(), "Incorrect format!", + null, message, MessageDialog.ERROR, buttonLabels, 2); + dialogRunning = true; + dialog.open(); + dialogRunning = false; + } + } + /* + private boolean isRateValueValid(String value) { + try { + Integer i = new Integer(value); + if (i > 0) return true; + } + catch (Exception e) { + return false; + } + return false; + } + + private TaskIORate parseValue(Object value) { + if (value == null) return new TaskIORate(); + String str = ((String) value).trim(); + // no rate specified + if (str.length() == 0) return new TaskIORate(); + // check specified rate + if (str.startsWith("[")) { // range specified + if (!str.endsWith("]")) { + throw new IllegalArgumentException(); + } + str = str.substring(1, str.length() - 1); + StringTokenizer st = new StringTokenizer(str, ","); + if (st.countTokens() < 2 || st.countTokens() > 3) + throw new IllegalArgumentException(); + int[] values = new int[3]; + int count = 0; + while (st.hasMoreTokens()) { + String token = st.nextToken().trim(); + if (isRateValueValid(token)) + values[count++] = new Integer(token).intValue(); + else throw new IllegalArgumentException(); + } + if (count == 2) + return new TaskIORate(values[0], values[1]); + else + return new TaskIORate(values[0], values[1], values[2]); + } + else { // single value specified + if (isRateValueValid(str)) { + return new TaskIORate(new Integer(str).intValue()); + } + } + throw new IllegalArgumentException(); + }*/ +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORatePropertyDescriptor.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORatePropertyDescriptor.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/dialogs/streaming/TaskIORatePropertyDescriptor.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,42 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.dialogs.streaming; + +import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.PropertyDescriptor; + +/** + * A variation on TextPropertyDescriptor that uses a variation on TextCellEditor to post-process + * and disambiguate results when the entity being displayed is a port name. + */ +public class TaskIORatePropertyDescriptor extends PropertyDescriptor { + /** + * Create a new PortRatePropertyDescriptor + * @param id the property id + * @param displayName the display name + */ + public TaskIORatePropertyDescriptor(Object id, String displayName) + { + super(id, displayName); + } + + // @see org.eclipse.ui.views.properties.PropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite) + public CellEditor createPropertyEditor(Composite parent) + { + return new TaskIORateCellEditor(parent); + } +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/FlexotaskStreamingPlugin.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/FlexotaskStreamingPlugin.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/FlexotaskStreamingPlugin.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,56 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.timing.streaming; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +public class FlexotaskStreamingPlugin extends AbstractUIPlugin +{ + // The plug-in ID + public static final String PLUGIN_ID = "com.ibm.realtime.flexotask.streaming"; + + // The shared instance + private static FlexotaskStreamingPlugin plugin; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static FlexotaskStreamingPlugin getDefault() { + return plugin; + } + +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGlobalTiming.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,387 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.timing.streaming; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.draw2d.Label; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.search.IJavaSearchConstants; +import org.eclipse.jdt.core.search.IJavaSearchScope; +import org.eclipse.jdt.core.search.SearchEngine; +import org.eclipse.jdt.core.search.SearchMatch; +import org.eclipse.jdt.core.search.SearchParticipant; +import org.eclipse.jdt.core.search.SearchPattern; +import org.eclipse.jdt.core.search.SearchRequestor; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.views.properties.IPropertyDescriptor; +import org.eclipse.ui.views.properties.TextPropertyDescriptor; + +import com.ibm.realtime.flexotask.editor.dialogs.ClassSelectingCellEditor.ClassWrapper; +import com.ibm.realtime.flexotask.editor.model.Connection; +import com.ibm.realtime.flexotask.editor.model.GlobalTiming; +import com.ibm.realtime.flexotask.editor.model.LocalTiming; +import com.ibm.realtime.flexotask.editor.model.ModelElement; +import com.ibm.realtime.flexotask.editor.model.NormalTask; +import com.ibm.realtime.flexotask.editor.model.PortDeclaration; +import com.ibm.realtime.flexotask.editor.model.Task; +import com.ibm.realtime.flexotask.editor.model.TaskDiagram; +import com.ibm.realtime.flexotask.timing.FlexotaskTimingData; +import com.ibm.realtime.flexotask.timing.FlexotaskTimingDataParser; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; + +/** + * The GlobalTiming annotator for the stream-based grammar + */ +public class StreamBasedGlobalTiming extends GlobalTiming implements PropertyChangeListener { + + /** Property ID for the period */ + private static final String PERIOD = "StreamBasedGlobalTimingPeriod"; + /** Property ID for the period */ + private static final String WORK_ESTIMATOR = "StreamBasedGlobalTimingWorkEstimator"; + + /** The property descriptors */ + private final IPropertyDescriptor[] descriptors = new IPropertyDescriptor[] { + new TextPropertyDescriptor(PERIOD, "Period"), + new WorkEstimatorPropertyDescriptor(WORK_ESTIMATOR, "Work Estimator Class (Optional)", this) + }; + + private StreamBasedGlobalTimingData timingData; + /** The Work Estimator used for estimating the amount each task performs. */ + private IType workEstimatorType; + + /** + * Create a new StreamBasedGlobalTiming + */ + public StreamBasedGlobalTiming() { + this(new StreamBasedGlobalTimingData(-1, null)); + } + + /** + * Create a new StreamBasedGlobalTiming + * @param period the Period annotation from which to initialize + * @param workEstimatorType the Work Estimator used for estimating the amount each + * task performs. + */ + public StreamBasedGlobalTiming(StreamBasedGlobalTimingData timingData) + { + this.timingData = timingData; + this.workEstimatorType = null; + if ((timingData.getWorkEstimator() != null) && (timingData.getWorkEstimator().length() > 0)) + this.workEstimatorType = resolveType(timingData.getWorkEstimator()); + computeToolTipAndColor(); + } + + // @see com.ibm.realtime.flexotask.editor.model.GlobalTiming#getAnnotation() + public FlexotaskTimingData getAnnotation() + { + return timingData; + } + + // @see com.ibm.realtime.flexotask.editor.model.GlobalTiming#getElementAnnotator(com.ibm.realtime.flexotask.editor.model.ModelElement) + public LocalTiming getElementAnnotator(ModelElement element) + { + return new StreamBasedLocalTiming(element); + } + + // @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() + public IPropertyDescriptor[] getPropertyDescriptors() + { + return descriptors; + } + + // @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object) + public Object getPropertyValue(Object id) + { + if (PERIOD.equals(id)) + return (timingData.getPeriod() <= 0) ? "" : FlexotaskTimingDataParser.formatTime(timingData.getPeriod()); + else if (WORK_ESTIMATOR.equals(id)) + return new ClassWrapper(workEstimatorType); + return null; + } + + // @see com.ibm.realtime.flexotask.editor.model.ModelElement#getToolTipLabels(java.util.List) + public void getToolTipLabels(List<Label> labels) + { + Label label = new Label(); + if (timingData.getPeriod() <= 0) { + label.setIcon(WARNING_IMAGE); + label.setText("Period has not been specified"); + } else { + label.setIcon(OK_IMAGE); + label.setText("Period =" + FlexotaskTimingDataParser.formatTime(timingData.getPeriod())); + } + labels.add(label); + + label = new Label(); + labels.addAll(validateWorkEstimator()); + if (workEstimatorType != null) { + label.setIcon(OK_IMAGE); + label.setText("Work estimator class =" + workEstimatorType); + } else { + label.setIcon(OK_IMAGE); + label.setText("Work estimator class not set; using default!"); + } + labels.add(label); + } + + // @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object) + public boolean isPropertySet(Object id) + { + if (PERIOD.equals(id)) + return timingData.getPeriod() > 0; + else if (WORK_ESTIMATOR.equals(id)) + return (workEstimatorType != null); + else + return false; + } + + /* (non-Javadoc) + * @see com.ibm.realtime.flexotask.editor.model.ModelElement#getName() + */ + public String getName() + { + return "Stream-based Timing Mode"; + } + + // @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object) + public void resetPropertyValue(Object id) + { + if (PERIOD.equals(id)) + setAnnotation(new StreamBasedGlobalTimingData(-1)); + else if (WORK_ESTIMATOR.equals(id)) + workEstimatorType = null; + } + + // @see com.ibm.realtime.flexotask.editor.model.GlobalTiming#setAnnotation(com.ibm.realtime.flexotask.timing.FlexotaskTimingData) + public void setAnnotation(FlexotaskTimingData annotation) + { + timingData = (StreamBasedGlobalTimingData) annotation; + computeToolTipAndColor(); + } + + // @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object) + public void setPropertyValue(Object id, Object value) + { + if (PERIOD.equals(id)) { + if ((value == null) || (value.equals(""))) + timingData.setPeriod(-1); + else + timingData.setPeriod(FlexotaskTimingDataParser.parseTime((String) value)); + computeToolTipAndColor(); + } + else if (WORK_ESTIMATOR.equals(id)) { + this.workEstimatorType = ((ClassWrapper) value).classType; + if (workEstimatorType != null) + timingData.setWorkEstimator(workEstimatorType.getFullyQualifiedName()); + else + timingData.setWorkEstimator(null); + computeToolTipAndColor(); + } + } + + private IType resolveType(String implementation) + { + final IType[] ans = new IType[1]; + IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); + SearchPattern pattern = SearchPattern.createPattern(implementation, IJavaSearchConstants.CLASS, + IJavaSearchConstants.DECLARATIONS, + SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE); + SearchEngine engine = new SearchEngine(); + SearchRequestor req = new SearchRequestor() { + public void acceptSearchMatch(SearchMatch match) throws CoreException + { + if (ans[0] == null) { + Object whatnot = match.getElement(); + if (whatnot instanceof IType) { + ans[0] = (IType) match.getElement(); + } + } + } + }; + try { + engine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, + scope, req, null); + } catch (CoreException e) { + return null; + } + return ans[0]; + } + + /** + * Validate the work estimator as having the right characteristics, i.e., that + * it implements the expected interface. In any case, problems are + * recorded for later display in the tooltip. + */ + private List<Label> validateWorkEstimator() { + List<Label> labels = new ArrayList<Label>(); + if (workEstimatorType == null) { + if ((timingData.getWorkEstimator() != null) && (timingData.getWorkEstimator().length() > 0)) { + labels.add(new Label(timingData.getWorkEstimator() + " could not be resolved", ERROR_IMAGE)); + } + return labels; + } + try { + boolean implementsOk = isImplementer(workEstimatorType, WorkEstimatorSelectingCellEditor.WORK_ESTIMATOR_CLASSNAME); + if (!implementsOk) { + IType[] superClasses = workEstimatorType.newSupertypeHierarchy(null) + .getAllSuperclasses(workEstimatorType); + for (int i = 0; i < superClasses.length; i++) { + if (isImplementer(superClasses[i], WorkEstimatorSelectingCellEditor.WORK_ESTIMATOR_CLASSNAME)) { + implementsOk = true; + break; + } + } + } + if (!implementsOk) { + labels.add(new Label(timingData.getWorkEstimator() + " doesn't implement " + WorkEstimatorSelectingCellEditor.WORK_ESTIMATOR_CLASSNAME, ERROR_IMAGE)); + } + } catch (JavaModelException e) { + labels.add(new Label(timingData.getWorkEstimator() + " doesn't contain enough information or has unknown error", ERROR_IMAGE)); + } + return labels; + } + + /** + * Determine whether a particular IType implements a particular interface + * @param theType the IType to check + * @param implString the name of the interface to check (package qualified string) + * @return true iff theType implements implString + * @throws JavaModelException if resolution fails for a serious reason + */ + private boolean isImplementer(IType theType, String implString) throws JavaModelException + { + String[] impls = theType.getSuperInterfaceNames(); + for (int i = 0; i < impls.length; i++) { + if (impls[i].equals(implString)) { + return true; + } + String impl = getUniqueTypeResolution(impls[i], theType); + if (impl.equals(implString)) { + return true; + } + } + return false; + } + + /** + * Get the unique resolution of a possibly simple type name in the context of a type declaration + * @param toResolve the possibly simple name to resolve + * @param context the type declaration whose imports, etc are the context of the resolution + * @return the fully qualified type name resulting from the resolution or "" if either (1) + * the resolution fails, or (2) the resolution does not produce a unique answer. + */ + private String getUniqueTypeResolution(String toResolve, IType context) + { + String[][] resolves; + try { + resolves = context.resolveType(toResolve); + } catch (JavaModelException e) { + return ""; + } + if (resolves == null || resolves.length != 1) { + return ""; + } + if (resolves[0][0].length() == 0) { + /* default package */ + return resolves[0][1]; + } + return resolves[0][0] + "." + resolves[0][1]; + } + + /* (non-Javadoc) + * @see com.ibm.realtime.flexotask.editor.model.ModelElement#getParent() + */ + @Override + public void setParent(TaskDiagram parent) { + super.setParent(parent); + parent.addPropertyChangeListener(this); + } + + /* (non-Javadoc) + * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) + */ + public void propertyChange(PropertyChangeEvent evt) { + String prop = evt.getPropertyName(); + + if (prop.equals(TaskDiagram.CHILD_ADDED_PROP)) { + if (evt.getNewValue() != null) { + if (evt.getNewValue() instanceof NormalTask) + ((ModelElement) evt.getNewValue()).addPropertyChangeListener(this); + else if (!(evt.getNewValue() instanceof StreamBasedGlobalTiming)) { + /* Display error message */ + String[] buttonLabels = new String[] {"Ok"}; + String message = "With the stream-based timing grammar only normal tasks are allowed."; + MessageDialog dialog = new MessageDialog(Display.getCurrent().getActiveShell(), "Illegal Task!", + null, message, MessageDialog.ERROR, buttonLabels, 2); + dialog.open(); + } + } + } + else if (prop.equals(TaskDiagram.CHILD_REMOVED_PROP)) { + if ((evt.getNewValue() != null) && + (evt.getNewValue() instanceof NormalTask)) { + ((ModelElement) evt.getNewValue()).removePropertyChangeListener(this); + } + } + else if (prop.equals(Task.SOURCE_CONNECTIONS_PROP)) { + if (evt.getNewValue() != null) { + if (evt.getNewValue() instanceof Connection) { + Connection conn = (Connection) evt.getNewValue(); + //conn.setSourcePortBuffering(true); + //conn.setTargetPortBuffering(true); + conn.addPropertyChangeListener(this); + } + } + else if (evt.getOldValue() != null) { + if (evt.getOldValue() instanceof Connection) + ((ModelElement) evt.getOldValue()).removePropertyChangeListener(this); + } + } + else if (prop.equals(Connection.PORT_DECLARATION_CHANGED_PROP)) { + if ((evt.getNewValue() != null) && + (evt.getNewValue() instanceof PortDeclaration)) { + + Connection conn = (Connection) evt.getSource(); + if (conn.getSource() instanceof NormalTask) { + NormalTask sourceTask = (NormalTask) conn.getSource(); + sourceTask.setTiming(sourceTask.getTiming()); + } + if (conn.getTarget() instanceof NormalTask) { + NormalTask targetTask = (NormalTask) conn.getTarget(); + targetTask.setTiming(targetTask.getTiming()); + } + } + } + else if ((prop.equals(Connection.SOURCE_PORT_BUFFERING_PROP)) || + (prop.equals(Connection.TARGET_PORT_BUFFERING_PROP))) { + if ((evt.getNewValue() != null) && + (evt.getNewValue() instanceof Boolean)) { + Connection conn = (Connection) evt.getSource(); + conn.setTiming(conn.getTiming()); + } + } + } +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGrammarProvider.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGrammarProvider.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedGrammarProvider.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,61 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.timing.streaming; + +import com.ibm.realtime.flexotask.editor.model.AbstractLibraryProvider; +import com.ibm.realtime.flexotask.editor.model.GlobalTiming; +import com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider; +import com.ibm.realtime.flexotask.timing.FlexotaskTimingData; +import com.ibm.realtime.flexotask.timing.FlexotaskTimingDataParser; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedGlobalTimingData; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingDataParser; + +public class StreamBasedGrammarProvider extends AbstractLibraryProvider implements TimingGrammarProvider { + // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getDescription() + public String getDescription() { + return "Use stream-based timing grammar with rates"; + } + + // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getGlobalTiming(com.ibm.realtime.flexotask.timing.FlexotaskTimingData) + public GlobalTiming getGlobalTiming(FlexotaskTimingData annotation) { + if (annotation instanceof StreamBasedGlobalTimingData) + return new StreamBasedGlobalTiming((StreamBasedGlobalTimingData) annotation); + return null; + } + + // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getLabel() + public String getLabel() { + return "Stream-based Timing"; + } + + // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getParser() + public FlexotaskTimingDataParser getParser() { + return new StreamBasedTimingDataParser(); + } + + // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getTemplateClass() + public Class<? extends GlobalTiming> getTemplateClass() { + return StreamBasedGlobalTiming.class; + } + + /* (non-Javadoc) + * @see com.ibm.realtime.flexotask.editor.model.AbstractLibraryProvider#getPluginID() + */ + public String getPluginID() + { + return FlexotaskStreamingPlugin.PLUGIN_ID; + } +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedLocalTiming.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedLocalTiming.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/StreamBasedLocalTiming.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,346 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.timing.streaming; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import org.eclipse.draw2d.Label; +import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; +import org.eclipse.ui.views.properties.IPropertyDescriptor; +import org.eclipse.ui.views.properties.PropertyDescriptor; + +import com.ibm.realtime.flexotask.editor.dialogs.streaming.TaskIORatePropertyDescriptor; +import com.ibm.realtime.flexotask.editor.model.Category; +import com.ibm.realtime.flexotask.editor.model.Connection; +import com.ibm.realtime.flexotask.editor.model.LocalTiming; +import com.ibm.realtime.flexotask.editor.model.ModelElement; +import com.ibm.realtime.flexotask.editor.model.NormalTask; +import com.ibm.realtime.flexotask.timing.FlexotaskTimingData; +import com.ibm.realtime.flexotask.timing.streaming.FlexotaskTaskPortMuxMode; +import com.ibm.realtime.flexotask.timing.streaming.StreamBasedTimingAnnotation; + +/** + * The local annotator for all tasks under the stream-based grammar. + */ +public class StreamBasedLocalTiming implements LocalTiming { + /** Error message */ + private static final Label multiplePortsErrorLabel = new Label("Task cannot have multiple input and output ports", ModelElement.ERROR_IMAGE); + + /** Error message */ + private static final Label unbufferedPortsErrorLabel = new Label("All ports are required to be buffered", ModelElement.ERROR_IMAGE); + + /** The property ID for task pop rate */ + private static final String TASK_POP_RATE = "StreamBasedLocalTimingTaskPopRate"; + + /** The property ID for task peek rate */ + private static final String TASK_PEEK_RATE = "StreamBasedLocalTimingTaskPeekRate"; + + /** The property ID for task push rate */ + private static final String TASK_PUSH_RATE = "StreamBasedLocalTimingTaskPushRate"; + + /** The property ID for task output port mode */ + private static final String TASK_OUTPUT_PORT_MUX_MODE = "StreamBasedLocalTimingTaskOutputPortMuxMode"; + + /** The property ID for task state mode */ + private static final String TASK_STATE_MODE = "StreamBasedLocalTimingTaskStateMode"; + + /** String enumerator for when task state modes */ + private static final String[] TASK_STATE_MODES = { "stateless", "stateful" }; + + /** The editor-friendly names for the output port modes, in the same order as previous */ + private static final String[] taskOutputPortModeEditorNames = { + "uniform round-robin", "duplicate" }; + + /** The annotation */ + private StreamBasedTimingAnnotation annotation = new StreamBasedTimingAnnotation(); + + /** The model element */ + private ModelElement element; + + /** + * Constructor. + * @param element + */ + public StreamBasedLocalTiming(ModelElement element) { + this.element = element; + } + + // @see com.ibm.realtime.flexotask.editor.model.ModelElement#getToolTipLabels(java.util.List) + public void getToolTipLabels(List<Label> labels) { + if (annotation == null) { + Label label = new Label(ModelElement.OK_IMAGE); + label.setText("No timing offsets"); + } + else { + if (element instanceof NormalTask) { + if (numberOfInputPorts((NormalTask) element) > 0) { + Label label = new Label(ModelElement.OK_IMAGE); + if ((annotation.getTaskPopRate() == null) || + (!annotation.getTaskPopRate().isSpecified())) { + label.setIcon(ModelElement.WARNING_IMAGE); + label.setText("No task pop rate"); + } else { + label.setText("Task pop rate=" + + annotation.getTaskPopRate()); + } + labels.add(label); + + label = new Label(ModelElement.OK_IMAGE); + if ((annotation.getTaskPeekRate() == null) || (!annotation.getTaskPeekRate().isSpecified())) { + label.setText("No task peek rate"); + } else { + label.setText("Task peek rate=" + + annotation.getTaskPeekRate()); + } + labels.add(label); + } + + if ((numberOfOutputPorts((NormalTask) element) > 0)) { + Label label = new Label(ModelElement.OK_IMAGE); + if ((annotation.getTaskPushRate() == null) || + (!annotation.getTaskPushRate().isSpecified())) { + label.setIcon(ModelElement.WARNING_IMAGE); + label.setText("No task push rate"); + } else { + label.setText("Task push rate=" + + annotation.getTaskPushRate()); + } + labels.add(label); + + if (((NormalTask) element).getOutgoingConnections().size() > 1) { + label = new Label(ModelElement.OK_IMAGE); + if (annotation.getTaskOutputPortMode() == null) { + label.setText("No output port multiplex mode"); + } else { + FlexotaskTaskPortMuxMode portMode = annotation.getTaskOutputPortMode(); + int i = 0; + if (portMode != null) + i = portMode.asIndex(); + label.setText("Output port multiplex mode=" + + taskOutputPortModeEditorNames[i]); + } + labels.add(label); + } + } + } + } + + if (element instanceof NormalTask) { + if ((numberOfInputPorts((NormalTask) element) > 1) || + (numberOfOutputPorts((NormalTask) element) > 1)) + labels.add(multiplePortsErrorLabel); + else + labels.remove(multiplePortsErrorLabel); + } + + if (element instanceof Connection) { + if (((Connection) element).getSourcePortBuffering() && + ((Connection) element).getTargetPortBuffering()) + labels.remove(unbufferedPortsErrorLabel); + else + labels.add(unbufferedPortsErrorLabel); + } + } + + /** + * Loops through the input ports of the provided task and returns the number + * of unique port names used by the task. + * @param task the task. + * @return the number of unique input port names used by the task. + */ + private int numberOfInputPorts(NormalTask task) { + Set ports = new HashSet(); + for (Iterator<Connection> i = task.getIncomingConnections().iterator(); i.hasNext(); ) { + Connection conn = i.next(); + ports.add(conn.getTargetPortName()); + } + return ports.size(); + } + + + /** + * Loops through the output ports of the provided task and returns the number + * of unique port names used by the task. + * @param task the task. + * @return the number of unique output port names used by the task. + */ + private int numberOfOutputPorts(NormalTask task) { + Set ports = new HashSet(); + for (Iterator<Connection> i = task.getOutgoingConnections().iterator(); i.hasNext(); ) { + Connection conn = i.next(); + ports.add(conn.getSourcePortName()); + } + return ports.size(); + } + + + // @see com.ibm.realtime.flexotask.editor.model.GlobalTiming#getAnnotation() + public FlexotaskTimingData getAnnotation() { + return annotation; + } + + // @see com.ibm.realtime.flexotask.editor.model.GlobalTiming#setAnnotation(com.ibm.realtime.flexotask.timing.FlexotaskTimingData) + public void setAnnotation(FlexotaskTimingData annotation) { + this.annotation = (StreamBasedTimingAnnotation) annotation; + } + + // @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() + public IPropertyDescriptor[] getPropertyDescriptors() { + List<IPropertyDescriptor> propertyList = new ArrayList<IPropertyDescriptor>(); + PropertyDescriptor pd = null; + if ((element instanceof NormalTask) && + (((NormalTask) element).getIncomingConnections().size() > 0)) { + pd = new TaskIORatePropertyDescriptor(TASK_POP_RATE, "Task Pop Rate"); + pd.setCategory(Category.INPUT_CATEGORY); + propertyList.add(pd); + pd = new TaskIORatePropertyDescriptor(TASK_PEEK_RATE, "Task Peek Rate"); + pd.setCategory(Category.INPUT_CATEGORY); + propertyList.add(pd); + } + if ((element instanceof NormalTask) && + (((NormalTask) element).getOutgoingConnections().size() > 0)) { + pd = new TaskIORatePropertyDescriptor(TASK_PUSH_RATE, "Task Push Rate"); + pd.setCategory(Category.OUTPUT_CATEGORY); + propertyList.add(pd); + pd = new ComboBoxPropertyDescriptor(TASK_STATE_MODE, "Task State Mode", TASK_STATE_MODES ); + pd.setCategory(Category.BASIC_CATEGORY); + propertyList.add(pd); + if (((NormalTask) element).getOutgoingConnections().size() > 1) { + pd = new ComboBoxPropertyDescriptor(TASK_OUTPUT_PORT_MUX_MODE, "Task Output Port Multiplexing Mode", taskOutputPortModeEditorNames); + pd.setCategory(Category.OUTPUT_CATEGORY); + propertyList.add(pd); + } + } + return propertyList.toArray(new IPropertyDescriptor[0]); + } + + // @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object) + public Object getPropertyValue(Object id) { + if (TASK_POP_RATE.equals(id)) { + if (annotation.getTaskPopRate().isSpecified()) + return annotation.getTaskPopRate().toString(); + return null; + } + else if (TASK_PEEK_RATE.equals(id)) { + if (annotation.getTaskPeekRate().isSpecified()) + return annotation.getTaskPeekRate().toString(); + return null; + } + else if (TASK_PUSH_RATE.equals(id)) { + if (annotation.getTaskPushRate().isSpecified()) + return annotation.getTaskPushRate().toString(); + return null; + } + else if (TASK_OUTPUT_PORT_MUX_MODE.equals(id)) { + FlexotaskTaskPortMuxMode mode = annotation.getTaskOutputPortMode(); + if (mode != null) + return mode.asIndex(); + return null; + } + else if (TASK_STATE_MODE.equals(id)) + return new Integer(annotation.getTaskIsStateless() ? 0 : 1); + else + return null; + } + + // @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object) + public boolean isPropertySet(Object id) { + if (TASK_POP_RATE.equals(id)) + return annotation.getTaskPopRate().isSpecified(); + else if (TASK_PEEK_RATE.equals(id)) + return annotation.getTaskPeekRate().isSpecified(); + else if (TASK_PUSH_RATE.equals(id)) + return annotation.getTaskPushRate().isSpecified(); + else if (TASK_OUTPUT_PORT_MUX_MODE.equals(id)) + return true; + else if (TASK_STATE_MODE.equals(id)) + return annotation.getTaskIsStateless(); + else + return false; + } + + // @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object) + public void resetPropertyValue(Object id) { + if (TASK_POP_RATE.equals(id)) + setTaskInputRate(null); + else if (TASK_PEEK_RATE.equals(id)) + setTaskInputRate(null); + else if (TASK_PUSH_RATE.equals(id)) + setTaskOutputRate(null); + else if (TASK_OUTPUT_PORT_MUX_MODE.equals(id)) + setTaskOutputPortMode(null); + else if (TASK_STATE_MODE.equals(id)) + setTaskStateMode(false); + } + + // @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object) + public void setPropertyValue(Object id, Object value) { + if (TASK_POP_RATE.equals(id)) + setTaskInputRate((String) value); + else if (TASK_PEEK_RATE.equals(id)) + setTaskInputPeekRate((String) value); + else if (TASK_PUSH_RATE.equals(id)) + setTaskOutputRate((String) value); + else if (TASK_OUTPUT_PORT_MUX_MODE.equals(id)) + setTaskOutputPortMode((Integer) value); + else if (TASK_STATE_MODE.equals(id)) + setTaskStateMode(((Integer) value).intValue() == 0); + } + + // @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue() + public Object getEditableValue() { + return this; + } + + private void setTaskOutputPortMode(Integer value) { + annotation.setTaskOutputPortMode(FlexotaskTaskPortMuxMode.getTaskPortMode(value)); + } + + private void setTaskInputRate(String value) { + try { + annotation.setTaskPopRate(value); + } + catch (Exception e) { + throw new RuntimeException(e.getMessage()); + } + } + + private void setTaskInputPeekRate(String value) { + try { + annotation.setTaskPeekRate(value); + } + catch (Exception e) { + throw new RuntimeException(e.getMessage()); + } + } + + private void setTaskOutputRate(String value) { + try { + annotation.setTaskPushRate(value); + } + catch (Exception e) { + throw new RuntimeException(e.getMessage()); + } + } + + private void setTaskStateMode(boolean isStateless) { + annotation.setTaskIsStateless(isStateless); + } +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorPropertyDescriptor.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorPropertyDescriptor.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorPropertyDescriptor.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,37 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.timing.streaming; + +import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.swt.widgets.Composite; + +import com.ibm.realtime.flexotask.editor.dialogs.ClassPropertyDescriptor; +import com.ibm.realtime.flexotask.editor.model.GlobalTiming; + +public class WorkEstimatorPropertyDescriptor extends ClassPropertyDescriptor { + + private GlobalTiming globalTiming; + public WorkEstimatorPropertyDescriptor(Object id, String displayName, GlobalTiming globalTiming) { + super(id, displayName, null); + this.globalTiming = globalTiming; + } + + // @see org.eclipse.ui.views.properties.PropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite) + public CellEditor createPropertyEditor(Composite parent) + { + return new WorkEstimatorSelectingCellEditor(parent, globalTiming); + } +} Added: trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorSelectingCellEditor.java =================================================================== --- trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorSelectingCellEditor.java (rev 0) +++ trunk/flexotask-streaming/src/com/ibm/realtime/flexotask/editor/timing/streaming/WorkEstimatorSelectingCellEditor.java 2009-04-12 15:46:57 UTC (rev 150) @@ -0,0 +1,196 @@ +/* +* This file is part of Flexible Task Graphs +* (http://sourceforge.net/projects/flexotasks) +* +* Copyright (c) 2006 - 2008 IBM Corporation and Ecole Polytechnique +* Federale de Lausanne (EPFL). +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* IBM Corporation +* EPFL +*/ +package com.ibm.realtime.flexotask.editor.timing.streaming; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jdt.core.IJavaElement; +import org.eclipse.jdt.core.IPackageFragment; +import org.eclipse.jdt.core.IPackageFragmentRoot; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.search.SearchEngine; +import org.eclipse.jdt.ui.IJavaElementSearchConstants; +import org.eclipse.jdt.ui.JavaUI; +import org.eclipse.jdt.ui.actions.OpenNewClassWizardAction; +import org.eclipse.jdt.ui.wizards.NewClassWizardPage; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.dialogs.SelectionDialog; + +import com.ibm.realtime.flexotask.editor.FlexotaskEditor; +import com.ibm.realtime.flexotask.editor.dialogs.ClassSelectingCellEditor; +import com.ibm.realtime.flexotask.editor.model.GlobalTiming; + +/** + * A specialization of the class selecting cell editor which filters out and + * displays only classes for selection that implement the interface required + * for work estimate classes. + */ +public class WorkEstimatorSelectingCellEditor extends ClassSelectingCellEditor { + static final String WORK_ESTIMATOR_CLASSNAME = "at.dms.kjc.sir.lowering.partition.WorkEstimate.WorkVisitorIntf"; + /** Determines whether to offer the create dialog or the source dialog */ + private boolean useCreate; + /** Remember actual value last set for use in some dialogs */ + private Object lastValue; + /** The global timing of the graph specification */ + private GlobalTiming globalTiming; + + /** + * Constructor + * @param parent + * @param globalTiming the global timing of the graph specification + */ + public WorkEstimatorSelectingCellEditor(Composite parent, GlobalTiming globalTiming) { + super(parent); + this.globalTiming = globalTiming; + } + + // @see com.ibm.realtime.flexotask.editor.model.ClassSelectingCellEditor#doSetValue(java.lang.Object) + protected void doSetValue(Object value) + { + super.doSetValue(value); + useCreate = (value == null || value.toString().length() == 0); + lastValue = value; + } + + /** + * A class selection dialog that filters out and displays only classes found + * in the workspace that implements the interface needed in order to implement + * a work estimator class + * @param cellEditorWindow + * @return + */ + private Object openFilteringClassSelectionDialogBox(Control cellEditorWindow) + { + SelectionDialog dialog; + try { + dialog = JavaUI.createTypeDialog( + cellEditorWindow.getShell(), new ProgressMonitorDialog(null), + SearchEngine.createWorkspaceScope(), + IJavaElementSearchConstants.CONSIDER_CLASSES, false); + } catch (JavaModelException e) { + return null; + } + dialog.setTitle("Work Estimator Class selection"); + dialog.setMessage("Select a Work Estimator class"); + if (dialog.open() == IDialogConstants.CANCEL_ID) + return null; + + Object[] types= dialog.getResult(); + if (types == null || types.length == 0) + return null; + return new ClassWrapper((IType)types[0]); + } + + // @see org.eclipse.jface.viewers.DialogCellEditor#openDialogBox(org.eclipse.swt.widgets.Control) + protected Object openDialogBox(Control cellEditorWindow) + { + String[] buttonLabels = useCreate ? new String[] {"Create", "Find"} : + new String[] {"Edit Source", "Find Replacement", "Remove", "Cancel"}; + String promptMessage = useCreate ? + "You can either create a new implementation from the model or find an existing implementation" : + "You can either edit the existing implementation or find an existing implementation to " + + "replace it"; + MessageDialog prompt = new MessageDialog(cellEditorWindow.getShell(), + "Choose strategy", null, promptMessage, MessageDialog.QUESTION, buttonLabels, 0); + int choice = prompt.open(); + if (choice == 0) { + /* create */ + if (useCreate) { + return openCreateDialog(cellEditorWindow.getShell()); + } else { + FlexotaskEditor.openSource(((ClassWrapper) getValue()).classType); + return lastValue; + } + } else if (choice == 1){ + /* find */ + return openFilteringClassSelectionDialogBox(cellEditorWindow); + } else if (choice == 2){ + /* remove */ + return new ClassWrapper(null); + } else { + /* cancelled */ + return lastValue; + } + } + + /** + * Open a class creation dialog that both generates new class source and returns the new + * class as an ClassWrapper + * @param the shell to use if an error dialog is needed + * @return a new ClassWrapper or null if cancelled + */ + private ClassWrapper openCreateDialog(Shell shell) + { + OpenNewClassWizardAction action = new OpenNewClassWizardAction(); + NewClassWizardPage page = new NewClassWizardPage(); + IJavaElement javaElement = JavaCor... [truncated message content] |
From: <jhs...@us...> - 2009-04-12 15:44:23
|
Revision: 149 http://flexotask.svn.sourceforge.net/flexotask/?rev=149&view=rev Author: jhspring Date: 2009-04-12 15:44:21 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Initial import. Added Paths: ----------- trunk/flexotask-streaming/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jhs...@us...> - 2009-04-12 15:39:31
|
Revision: 148 http://flexotask.svn.sourceforge.net/flexotask/?rev=148&view=rev Author: jhspring Date: 2009-04-12 15:39:29 +0000 (Sun, 12 Apr 2009) Log Message: ----------- Removed Paths: ------------- flexotask-streaming/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |