diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 000000000..41292e8c9
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,58 @@
+# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
+
+name: Java CI with Maven
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ branches: [ "main" ]
+ schedule:
+ - cron: "0 2 * * 1-5"
+concurrency:
+ group: ${{ github.ref }}
+ cancel-in-progress: true
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: maven
+ - name: Fail on whitespace errors
+ run: git show HEAD --check
+ - name: Run Spotless
+ run: mvn -s .travis.settings.xml -Dgithub.username=${{ github.actor }} -Dgithub.password=${{ secrets.GITHUB_TOKEN }} spotless:check -B
+ - name: Cache Pip dependencies
+ uses: actions/cache@v4
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+ - name: Install global requirements
+ run: pip3.10 install -r requirements.txt
+ - name: Run Black
+ run: black --fast --check --extend-exclude \/out .
+ - name: Install test requirements
+ run: pip3.10 install -r edu.cuny.hunter.hybridize.tests/requirements.txt
+ - name: Install with Maven
+ run: mvn -U -s .travis.settings.xml -Dgithub.username=${{ github.actor }} -Dgithub.password=${{ secrets.GITHUB_TOKEN }} -Dlogging.config.file=\${maven.multiModuleProjectDirectory}/logging.ci.properties -DtrimStackTrace=true -Dtycho.showEclipseLog=false install -B -q -DskipTests=true
+ - name: Print Python 3 version.
+ run: python3 --version
+ - name: Print Python 3.10 version.
+ run: python3.10 --version
+ - name: Clone our fork of PyDev
+ run: |
+ mkdir "$HOME/git"
+ pushd "$HOME/git"
+ git clone --depth=50 --branch=pydev_9_3 https://github.com/ponder-lab/Pydev.git
+ popd
+ - name: Test with Maven
+ run: mvn -U -s .travis.settings.xml -Dgithub.username=${{ github.actor }} -Dgithub.password=${{ secrets.GITHUB_TOKEN }} -Dlogging.config.file=\${maven.multiModuleProjectDirectory}/logging.ci.properties -DtrimStackTrace=true -Dtycho.showEclipseLog=false -B verify -Pjacoco coveralls:report
diff --git a/.gitignore b/.gitignore
index cfcea51c6..138fa06a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,7 @@
.mtj.tmp/
# Package Files #
-*.jar
+# *.jar
*.war
*.nar
*.ear
@@ -89,3 +89,4 @@ local.properties
target/
.tycho-consumer-pom.xml
results
+*.versionsBackup
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e1856f385..0f23f2b0e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,7 +4,7 @@ Please see our [wiki] for more information regarding development.
## Eclipse Environment
-The plug-ins are being developed on the following Eclipse versions. Currently, newer versions of Eclipse will not resolve M2E dependencies:
+The plug-ins are being developed on the following Eclipse versions. Currently, newer versions of Eclipse will not resolve M2E dependencies. The [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer) can be used to install specific versions:
Eclipse IDE for RCP and RAP Developers (includes Incubating components)
@@ -39,7 +39,14 @@ Dependency | Update Site
[PyDev] | https://raw.githubusercontent.com/ponder-lab/Pydev/pydev_9_3/org.python.pydev.updatesite
[WALA] | https://raw.githubusercontent.com/ponder-lab/WALA/v1.6/com.ibm.wala-repository
+### Running the Evaluator
+
+Use the `edu.cuny.hunter.hybridize.evaluator` plug-in project to run the evaluation. The evaluation process will produce several CSVs, as well as perform the transformation if desired (see below for details). For convenience, there is an [Eclipse launch configuration](https://wiki.eclipse.org/FAQ_What_is_a_launch_configuration%3F) that can be used to run the evaluation. The run configuration is named [`edu.cuny.hunter.hybridize.eval/Evaluate Hybridize Functions.launch`](https://github.com/ponder-lab/Hybridize-Functions-Refactoring/blob/691cbeb87be805b8bfc336e799d938a9064a5e0e/edu.cuny.hunter.hybridize.eval/Evaluate%20Hybridize%20Functions.launch). In the run configuration dialog, you can specify several arguments to the evaluator as system properties.
+
+You can run the evaluator in several different ways, including as a command or as a menu item, which is shown in the menu bar. Either way, you must evaluate *entire* projects, as the evaluator will collect project-level data. Information on configuring the evaluator can be found on [this wiki page][evaluator wiki].
+
[wiki]: https://github.com/ponder-lab/Hybridize-Functions-Refactoring/wiki
+[evaluator wiki]: https://github.com/ponder-lab/Hybridize-Functions-Refactoring/wiki/Running-the-Evaluator
[PyDev]: https://github.com/ponder-lab/Pydev/tree/pydev_9_3
[Common Eclipse Refactoring Framework]: https://github.com/ponder-lab/Common-Eclipse-Refactoring-Framework
[Ariadne]: https://github.com/ponder-lab/ML
diff --git a/README.md b/README.md
index 58c7220ad..5a4870a93 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,53 @@
# Hybridize-Functions-Refactoring
-[![Build Status](https://app.travis-ci.com/ponder-lab/Hybridize-Functions-Refactoring.svg?token=ysqq4ZuxzD688KNytWSA&branch=main)](https://app.travis-ci.com/ponder-lab/Hybridize-Functions-Refactoring) [![Coverage Status](https://coveralls.io/repos/github/ponder-lab/Hybridize-Functions-Refactoring/badge.svg?branch=main&t=PffqbW)](https://coveralls.io/github/ponder-lab/Hybridize-Functions-Refactoring?branch=main) [![GitHub license](https://img.shields.io/badge/license-Eclipse-blue.svg)](https://github.com/khatchadourian-lab/Java-8-Stream-Refactoring/raw/master/LICENSE.txt) [![Java profiler](https://www.ej-technologies.com/images/product_banners/jprofiler_small.png)](https://www.ej-technologies.com/products/jprofiler/overview.html)
+[![Build Status](https://github.com/ponder-lab/Hybridize-Functions-Refactoring/actions/workflows/maven.yml/badge.svg)](https://github.com/ponder-lab/Hybridize-Functions-Refactoring/actions/workflows/maven.yml) [![Coverage Status](https://coveralls.io/repos/github/ponder-lab/Hybridize-Functions-Refactoring/badge.svg?branch=main&t=PffqbW)](https://coveralls.io/github/ponder-lab/Hybridize-Functions-Refactoring?branch=main) [![GitHub license](https://img.shields.io/badge/license-Eclipse-blue.svg)](https://github.com/ponder-lab/Hybridize-Functions-Refactoring/raw/master/LICENSE) [![Java profiler](https://www.ej-technologies.com/images/product_banners/jprofiler_small.png)](https://www.ej-technologies.com/products/jprofiler/overview.html)
## Introduction
-Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
+ Imperative Deep Learning programming is a promising paradigm for creating reliable and efficient Deep Learning programs. However, it is [challenging to write correct and efficient imperative Deep Learning programs](https://dl.acm.org/doi/10.1145/3524842.3528455) in TensorFlow (v2), a popular Deep Learning framework. TensorFlow provides a high-level API (`@tf.function`) that allows users to execute computational graphs using nature, imperative programming. However, writing efficient imperative TensorFlow programs requires careful consideration.
+
+This tool consists of automated refactoring research prototype plug-ins for [Eclipse][eclipse] [PyDev][pydev] that assists developers in writing optimal imperative Deep Learning code in a semantics-preserving fashion. Refactoring preconditions and transformations for automatically determining when it is safe and potentially advantageous to migrate an eager function to hybrid and improve upon already hybrid Python functions are included. The approach utilizes the [WALA][wala] [Ariadne][ariadne] static analysis framework that has been modernized to TensorFlow 2 and extended to work with modern Python constructs and whole projects. The tool also features a side-effect analysis that is used to determine if a Python function is safe to hybridize.
## Screenshot
-## Demonstration
+![Screenshot](https://khatchad.commons.gc.cuny.edu/wp-content/blogs.dir/2880/files/2024/10/Screenshot-from-2024-10-01-13-07-03.png)
## Usage
+The refactoring can be run in two different ways:
+
+1. As a command.
+ 1. Select a Python code entity.
+ 1. Select "Hybridize function..." from the "Quick Access" dialog (CTRL-3).
+1. As a menu item.
+ 1. Right-click on a Python code entity.
+ 1. Under "Refactor," choose "Hybridize function..."
+
+Currently, the refactoring works only via the package explorer and the outline views. You can either select a code entity to optimize or select multiple entities. In each case, the tool will find functions in the enclosing entity to refactor.
+
+### Update
+
+Due to https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/370, only the "command" is working.
+
## Installation
+Coming soon!
+
### Update Site
+https://raw.githubusercontent.com/ponder-lab/Hybridize-Functions-Refactoring/main/edu.cuny.hunter.hybridize.updatesite
+
### Eclipse Marketplace
+Coming soon!
+
## Contributing
For information on contributing, see [CONTRIBUTING.md][contrib].
-[wiki]: https://github.com/ponder-lab/Java-8-Stream-Refactoring/wiki
+[wiki]: https://github.com/ponder-lab/Hybridize-Functions-Refactoring/wiki
[eclipse]: http://eclipse.org
[contrib]: https://github.com/ponder-lab/Hybridize-Functions-Refactoring/blob/main/CONTRIBUTING.md
+[pydev]: http://www.pydev.org/
+[wala]: https://github.com/wala/WALA
+[ariadne]: https://github.com/wala/ML
diff --git a/edu.cuny.hunter.hybridize.core/.gitignore b/edu.cuny.hunter.hybridize.core/.gitignore
index 8000a78c4..29ec7ba14 100644
--- a/edu.cuny.hunter.hybridize.core/.gitignore
+++ b/edu.cuny.hunter.hybridize.core/.gitignore
@@ -1,2 +1,3 @@
-bin
+bin/
/target/
+lib/
diff --git a/edu.cuny.hunter.hybridize.core/META-INF/MANIFEST.MF b/edu.cuny.hunter.hybridize.core/META-INF/MANIFEST.MF
index c0f536f48..233f78035 100644
--- a/edu.cuny.hunter.hybridize.core/META-INF/MANIFEST.MF
+++ b/edu.cuny.hunter.hybridize.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: edu.cuny.hunter.hybridize.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-ClassPath: .
Automatic-Module-Name: edu.cuny.hunter.hybridize.core
diff --git a/edu.cuny.hunter.hybridize.core/abseil.xml b/edu.cuny.hunter.hybridize.core/abseil.xml
index 2ff9a784d..f93a9ca2d 100644
--- a/edu.cuny.hunter.hybridize.core/abseil.xml
+++ b/edu.cuny.hunter.hybridize.core/abseil.xml
@@ -11,6 +11,13 @@
+
+
+
+
+
+
+
@@ -23,5 +30,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/edu.cuny.hunter.hybridize.core/pom.xml b/edu.cuny.hunter.hybridize.core/pom.xml
index 6c1d27d08..f860b1998 100644
--- a/edu.cuny.hunter.hybridize.core/pom.xml
+++ b/edu.cuny.hunter.hybridize.core/pom.xml
@@ -4,7 +4,7 @@
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
..
edu.cuny.hunter.hybridize.core
diff --git a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
index 818a0c3c8..96749652a 100644
--- a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
+++ b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
@@ -17,7 +17,6 @@
import static edu.cuny.hunter.hybridize.core.wala.ml.PythonModRefWithBuiltinFunctions.PythonModVisitorWithBuiltinFunctions.GLOBAL_OUTPUT_STREAM_POINTER_KEY;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
-import static java.util.Collections.emptySet;
import static org.eclipse.core.runtime.Platform.getLog;
import static org.python.pydev.parser.visitors.NodeUtils.getFullRepresentationString;
import static org.python.pydev.parser.visitors.NodeUtils.getOffset;
@@ -129,7 +128,7 @@ public class Function {
/**
* Used for speculative analysis of the function name.
*/
- private static final String FUNCTION_NAME_CONTEXT_REGEX = ".*(train|test).*_step|call|__call__|run_model";
+ private static final String FUNCTION_NAME_CONTEXT_REGEX = ".*(train|test).*_step|call|__call__|run_model|.*inference";
private final class FunctionStatusContext extends RefactoringStatusContext {
@Override
@@ -356,12 +355,12 @@ public boolean isReduceRetracingParamExists() {
private static final String SELF_PARAMETER_NAME = "self";
- private static Map> tensorContainersCache = Maps.newHashMap();
+ private static Map> tensorContainersCache = Maps.newConcurrentMap();
/**
- * Containing {@link IDocument}s that have had import statements added to them during transformation.
+ * Containing {@link File}s that have had import statements added to them during transformation.
*/
- private static Set documentsWithAddedImport = new HashSet<>();
+ private static Set filesWithAddedImport = new HashSet<>();
private static final String TF_FUNCTION_FQN = "tensorflow.python.eager.def_function.function";
@@ -436,8 +435,7 @@ private static boolean allCreationsWithinClosureInteral(MethodReference methodRe
cache2.put(instanceKey, cache3);
}
- Boolean previous = cache3.put(callGraph, result);
- assert previous == null : "Should be a new key.";
+ cache3.put(callGraph, result);
return result;
}
@@ -474,7 +472,7 @@ private static boolean allCreationsWithinClosureInteral2(MethodReference methodR
public static void clearCaches() {
creationsCache.clear();
tensorContainersCache.clear();
- documentsWithAddedImport.clear();
+ filesWithAddedImport.clear();
}
/**
@@ -1007,8 +1005,8 @@ public void computeHybridization(IProgressMonitor monitor) throws BadLocationExc
try {
selection = Util.getSelection(decorator, document);
hybrid = isHybrid(decorator, containingModuleName, containingFile, selection, nature, monitor);
- } catch (AmbiguousDeclaringModuleException | BadLocationException | NoDeclaringModuleException | NoTextSelectionException
- | RuntimeException e) {
+ } catch (AmbiguousDeclaringModuleException | BadLocationException | NoDeclaringModuleException
+ | NoTextSelectionException e) {
String selectedText = null;
try {
selectedText = selection == null ? "(can't compute)" : selection.getSelectedText();
@@ -1641,7 +1639,7 @@ public void inferTensorTensorParameters(TensorTypeAnalysis tensorAnalysis, CallG
monitor.done();
}
- private boolean hasTensorContext() throws NoTextSelectionException {
+ private boolean hasTensorContext() {
String functionName = this.getSimpleName();
boolean matches = functionName.matches(FUNCTION_NAME_CONTEXT_REGEX);
@@ -1663,22 +1661,34 @@ private boolean hasTensorContext() throws NoTextSelectionException {
return matches;
}
- private Set getAllClassParentNames(boolean onlyLastSegment) throws NoTextSelectionException {
+ private Set getAllClassParentNames(boolean onlyLastSegment) {
+ Set ret = new HashSet<>();
SimpleNode node = this.getFunctionDefinition().getFunctionDef().parent;
if (node instanceof ClassDef) {
ClassDef def = (ClassDef) node;
- PySelection selection = Util.getSelection(def.name, getContainingDocument());
- RefactoringRequest request = new RefactoringRequest(getContainingFile(), selection, getNature());
- IPyRefactoring2 refactoring = (Refactorer) AbstractPyRefactoring.getPyRefactoring();
- HierarchyNodeModel hierarchyNode = refactoring.findClassHierarchy(request, true);
- assert def.equals(hierarchyNode.ast) : "The first node in the class hierarchy should be this class.";
+ PySelection selection = null;
+ try {
+ selection = Util.getSelection(def.name, getContainingDocument());
+ } catch (NoTextSelectionException e) {
+ LOG.info("Can't get class parent names for: " + this + " with enclosing class: " + def + " with name:" + def.name, e);
+ }
+
+ if (selection != null) {
+ RefactoringRequest request = new RefactoringRequest(getContainingFile(), selection, getNature());
+ IPyRefactoring2 refactoring = (Refactorer) AbstractPyRefactoring.getPyRefactoring();
+ HierarchyNodeModel hierarchyNode = refactoring.findClassHierarchy(request, true);
+
+ if (hierarchyNode != null)
+ return getAllParentNames(hierarchyNode, onlyLastSegment);
+ }
- return getAllParentNames(hierarchyNode, onlyLastSegment);
+ // otherwise, just traverse the base in this AST node.
+ ret.addAll(NodeUtils.getParentNames(def, onlyLastSegment));
}
- return emptySet();
+ return ret;
}
public boolean isHybridizationAvailable() {
@@ -1734,7 +1744,6 @@ private boolean matches(exprType lhsParamExpr, String lhsParamName, LocalPointer
int paramIndex = rhsPointerKey.getValueNumber() - 1;
Position parameterPosition = astMethod.getParameterPosition(paramIndex);
- LOG.info(rhsPointerKey + " position is: " + parameterPosition + ".");
if (parameterPosition != null) {
int rhsBeginColumn = parameterPosition.getFirstCol() + 1; // workaround https://github.com/jython/jython3/issues/48.
@@ -1746,10 +1755,7 @@ private boolean matches(exprType lhsParamExpr, String lhsParamName, LocalPointer
return lhsBeginColumn == rhsBeginColumn && lhsBeginLine == rhsBeginLine;
}
}
-
- LOG.info(containingFile.getName() + " does not match: " + sourceFileName + ".");
- } else
- LOG.warn("Encountered non-AST method: " + nodeMethod + ".");
+ }
return false;
}
@@ -1838,7 +1844,11 @@ private boolean tensorAnalysisIncludesParameterContainer(TensorTypeAnalysis tens
IR ir = node.getIR();
int i = paramInx + 1;
- assert i < ir.getNumberOfParameters() : "Parameter index (" + i + ") must be inbounds (" + ir.getNumberOfParameters() + ").";
+ if (i >= ir.getNumberOfParameters()) {
+ LOG.warn("Parameter index (" + i + ") must be inbounds (" + ir.getNumberOfParameters() + "). Skipping: "
+ + ir.getMethod().getSignature());
+ continue;
+ }
int param = ir.getParameter(i); // the first argument is the function being invoked.
@@ -1949,15 +1959,17 @@ private List convertToHybrid() throws BadLocationException {
if (prefix == null) {
// need to add an import if it doesn't already exist.
- if (!documentsWithAddedImport.contains(doc)) {
+ File file = this.getContainingFile();
+
+ if (!filesWithAddedImport.contains(file)) {
int line = getLineToInsertImport(doc);
int lineOffset = doc.getLineOffset(line);
- TextEdit edit = new InsertEdit(lineOffset, "from tensorflow import function");
+ TextEdit edit = new InsertEdit(lineOffset, "from tensorflow import function\n");
MultiTextEdit mte = new MultiTextEdit();
mte.addChild(edit);
ret.add(mte);
- documentsWithAddedImport.add(doc);
+ filesWithAddedImport.add(file);
}
prefix = ""; // no prefix needed.
diff --git a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/PreconditionSuccess.java b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/PreconditionSuccess.java
index 4ef6bc50e..ac54c453a 100644
--- a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/PreconditionSuccess.java
+++ b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/PreconditionSuccess.java
@@ -2,6 +2,4 @@
public enum PreconditionSuccess {
P1, P2, P3,
- // P4,
- // P5
}
diff --git a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
index 95db5151f..0359e38c4 100644
--- a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
+++ b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
@@ -346,11 +346,13 @@ private static Set getAllNewSiteReferences(int use, DefUse du,
public static Set getAllParentNames(HierarchyNodeModel hierarchyNode, boolean onlyLastSegment) {
Set ret = new HashSet<>();
- if (hierarchyNode.ast != null)
- ret.addAll(NodeUtils.getParentNames(hierarchyNode.ast, onlyLastSegment));
+ if (hierarchyNode != null) {
+ if (hierarchyNode.ast != null)
+ ret.addAll(NodeUtils.getParentNames(hierarchyNode.ast, onlyLastSegment));
- for (HierarchyNodeModel parenNode : hierarchyNode.parents)
- ret.addAll(getAllParentNames(parenNode, onlyLastSegment));
+ for (HierarchyNodeModel parenNode : hierarchyNode.parents)
+ ret.addAll(getAllParentNames(parenNode, onlyLastSegment));
+ }
return ret;
}
diff --git a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java
index d92a4c2ca..46681580c 100644
--- a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java
+++ b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java
@@ -75,31 +75,12 @@
import edu.cuny.hunter.hybridize.core.wala.ml.EclipsePythonProjectTensorAnalysisEngine;
import edu.cuny.hunter.hybridize.core.wala.ml.PythonModRefWithBuiltinFunctions;
-@SuppressWarnings("unused")
public class HybridizeFunctionRefactoringProcessor extends RefactoringProcessor {
private static final String DUMP_CALL_GRAPH_PROPERTY_KEY = "edu.cuny.hunter.hybridize.dumpCallGraph";
private static final ILog LOG = getLog(HybridizeFunctionRefactoringProcessor.class);
- private static RefactoringStatus checkDecorators(Function func) {
- RefactoringStatus status = new RefactoringStatus();
- LOG.info("Checking decorators for: " + func + ".");
- // TODO: Is the function already decorated with tf.function? NOTE: May move to checkFinalConditions() as this
- // will be dependent on other things.
- return status;
- }
-
- private static RefactoringStatus checkParameters(Function func) {
- RefactoringStatus status = new RefactoringStatus();
- LOG.info("Checking parameters for: " + func + ".");
- // TODO: Does the function have a tensor parameter (#2)?
- // NOTE: Not sure if we will be checking everything individually here since we'll do the computation in the
- // Function class. Instead, we may just need to check everything in checkFinalConditions(), as it is likely that
- // the checking will depend on several things.
- return status;
- }
-
private Set functions = new LinkedHashSet<>();
private Map projectToCallGraphBuilder = new HashMap<>();
@@ -411,12 +392,6 @@ private RefactoringStatus checkFunctions(IProgressMonitor monitor) throws Operat
// check the function preconditions.
status.merge(func.check());
- status.merge(checkParameters(func));
- subMonitor.checkCanceled();
-
- status.merge(checkDecorators(func));
- subMonitor.checkCanceled();
-
status.merge(func.getStatus());
subMonitor.worked(1);
diff --git a/edu.cuny.hunter.hybridize.core/tensorflow.xml b/edu.cuny.hunter.hybridize.core/tensorflow.xml
index fd190ca32..a845df692 100644
--- a/edu.cuny.hunter.hybridize.core/tensorflow.xml
+++ b/edu.cuny.hunter.hybridize.core/tensorflow.xml
@@ -2024,24 +2024,23 @@
+
-
-
+
-
-
+
@@ -2054,6 +2053,13 @@
+
+
+
+
+
+
+
diff --git a/edu.cuny.hunter.hybridize.eval/Evaluate Hybridize Functions.launch b/edu.cuny.hunter.hybridize.eval/Evaluate Hybridize Functions.launch
index 2b08fef52..01a3e0811 100644
--- a/edu.cuny.hunter.hybridize.eval/Evaluate Hybridize Functions.launch
+++ b/edu.cuny.hunter.hybridize.eval/Evaluate Hybridize Functions.launch
@@ -24,7 +24,7 @@
-
+
diff --git a/edu.cuny.hunter.hybridize.eval/META-INF/MANIFEST.MF b/edu.cuny.hunter.hybridize.eval/META-INF/MANIFEST.MF
index ef5bcfdd7..fb4a0c910 100644
--- a/edu.cuny.hunter.hybridize.eval/META-INF/MANIFEST.MF
+++ b/edu.cuny.hunter.hybridize.eval/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: edu.cuny.hunter.hybridize.eval;singleton:=true
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Export-Package: edu.cuny.hunter.hybridize.eval.handlers,
edu.cuny.hunter.hybridize.eval.ui.plugins
Import-Package: com.google.common.collect,
diff --git a/edu.cuny.hunter.hybridize.eval/pom.xml b/edu.cuny.hunter.hybridize.eval/pom.xml
index 6e19d01d5..8f0a07434 100644
--- a/edu.cuny.hunter.hybridize.eval/pom.xml
+++ b/edu.cuny.hunter.hybridize.eval/pom.xml
@@ -4,7 +4,7 @@
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
..
edu.cuny.hunter.hybridize.eval
diff --git a/edu.cuny.hunter.hybridize.eval/src/edu/cuny/hunter/hybridize/eval/handlers/EvaluateHybridizeFunctionRefactoringHandler.java b/edu.cuny.hunter.hybridize.eval/src/edu/cuny/hunter/hybridize/eval/handlers/EvaluateHybridizeFunctionRefactoringHandler.java
index 341088d6a..df7759274 100644
--- a/edu.cuny.hunter.hybridize.eval/src/edu/cuny/hunter/hybridize/eval/handlers/EvaluateHybridizeFunctionRefactoringHandler.java
+++ b/edu.cuny.hunter.hybridize.eval/src/edu/cuny/hunter/hybridize/eval/handlers/EvaluateHybridizeFunctionRefactoringHandler.java
@@ -168,6 +168,10 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
for (Transformation transformation : Transformation.values())
resultsHeader.add(transformation.toString());
+ String[] experimentalSettingsHeader = new String[] { "side-effects", "recursion", "type hints", "parallel", "speculative",
+ "test entrypoints" };
+ resultsHeader.addAll(Arrays.asList(experimentalSettingsHeader));
+
resultsHeader.add("time (s)");
HybridizeFunctionRefactoringProcessor processor = null;
@@ -295,6 +299,24 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
resultsPrinter.print(candidates.parallelStream().map(Function::getTransformations).filter(Objects::nonNull)
.flatMap(as -> as.parallelStream()).filter(a -> Objects.equals(a, transformation)).count());
+ // side-effects.
+ resultsPrinter.print(this.getAlwaysCheckPythonSideEffects());
+
+ // recursion.
+ resultsPrinter.print(this.getAlwaysCheckRecusion());
+
+ // type hints.
+ resultsPrinter.print(this.getAlwaysFollowTypeHints());
+
+ // parallel.
+ resultsPrinter.print(this.getProcessFunctionsInParallel());
+
+ // speculative.
+ resultsPrinter.print(this.getUseSpeculativeAnalysis());
+
+ // test entrypoints.
+ resultsPrinter.print(this.getUseTestEntrypoints());
+
// actually perform the refactoring if there are no fatal
// errors.
if (shouldPerformChange() && !status.hasFatalError()) {
@@ -543,15 +565,15 @@ public boolean getAlwaysCheckPythonSideEffects() {
return alwaysCheckPythonSideEffects;
}
- private boolean getAlwaysCheckRecusion() {
+ public boolean getAlwaysCheckRecusion() {
return alwaysCheckRecursion;
}
- private boolean getProcessFunctionsInParallel() {
+ public boolean getProcessFunctionsInParallel() {
return this.processFunctionsInParallel;
}
- private boolean getUseTestEntrypoints() {
+ public boolean getUseTestEntrypoints() {
return this.useTestEntrypoints;
}
diff --git a/edu.cuny.hunter.hybridize.feature/.project b/edu.cuny.hunter.hybridize.feature/.project
new file mode 100644
index 000000000..dacfa50d4
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.feature/.project
@@ -0,0 +1,17 @@
+
+
+ edu.cuny.hunter.hybridize.feature
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+
+
diff --git a/edu.cuny.hunter.hybridize.feature/.settings/org.eclipse.core.resources.prefs b/edu.cuny.hunter.hybridize.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/edu.cuny.hunter.hybridize.feature/build.properties b/edu.cuny.hunter.hybridize.feature/build.properties
new file mode 100644
index 000000000..da085681f
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml
+src.includes = build.properties,\
+ feature.xml,\
+ OSGI-INF/,\
+ .settings/,\
+ .project
diff --git a/edu.cuny.hunter.hybridize.feature/feature.xml b/edu.cuny.hunter.hybridize.feature/feature.xml
new file mode 100644
index 000000000..594751e53
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.feature/feature.xml
@@ -0,0 +1,94 @@
+
+
+ Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
+
+ 2024 Raffi Khatchadourian. All rights reserved.
+
+ Eclipse Public License - v 2.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 content 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 changes or additions to the
+ Program that are not Modified Works. "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 or any Secondary License (as applicable), including Contributors. "Derivative Works" shall mean any work,
+ whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. "Modified Works" shall mean any work in Source Code or
+ other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations,
+ interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. "Distribute" means the acts of a) distributing or b) making available in any manner that enables the transfer of a
+ copy. "Source Code" means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. "Secondary License" means either the GNU General Public License, Version 2.0, or any later
+ versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. 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. 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 or other 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. e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the
+ terms of a Secondary License (if permitted under the terms of Section 3). 3. REQUIREMENTS 3.1 If a Contributor Distributes the Program in any form, then: a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with
+ a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and b) the Contributor may Distribute the Program under a license different than this
+ Agreement, provided that such license: i) effectively disclaims on behalf of all other 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 other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) does not attempt to limit or alter the recipients' rights in the Source Code
+ under section 3.2; and iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. 3.2 When the Program is Distributed as Source Code: a) it must be made available under this Agreement, or if the Program (i) is
+ combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses,
+ and b) a copy of this Agreement must be included with each copy of the Program. 3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability ("notices") contained within the Program from any copy of
+ the Program which they Distribute, provided that Contributors may add their own appropriate notices. 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, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, 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, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, 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. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. Exhibit A - Form of Secondary Licenses Notice "This Source Code may also be made available under the
+ following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}." Simply including a copy of this Agreement, including this Exhibit A is not
+ sufficient to license the Source Code under Secondary Licenses. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
+ You may add additional accurate notices of copyright ownership.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/edu.cuny.hunter.hybridize.feature/pom.xml b/edu.cuny.hunter.hybridize.feature/pom.xml
new file mode 100644
index 000000000..29a5bab07
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.feature/pom.xml
@@ -0,0 +1,13 @@
+
+
+ 4.0.0
+
+ edu.cuny.hunter.hybridize
+ edu.cuny.hunter.hybridize
+ 1.1.0-SNAPSHOT
+ ..
+
+ edu.cuny.hunter.hybridize.feature
+ eclipse-feature
+ Hybridize Functions refactoring feature.
+
diff --git a/edu.cuny.hunter.hybridize.tests.report/pom.xml b/edu.cuny.hunter.hybridize.tests.report/pom.xml
index 5e22cb8e8..4379d69cd 100644
--- a/edu.cuny.hunter.hybridize.tests.report/pom.xml
+++ b/edu.cuny.hunter.hybridize.tests.report/pom.xml
@@ -4,7 +4,7 @@
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
..
edu.cuny.hunter.hybridize.tests.report
@@ -13,19 +13,19 @@
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize.core
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
compile
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize.ui
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
compile
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize.tests
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
test
diff --git a/edu.cuny.hunter.hybridize.tests/META-INF/MANIFEST.MF b/edu.cuny.hunter.hybridize.tests/META-INF/MANIFEST.MF
index 48593d6c9..ea778f7e3 100644
--- a/edu.cuny.hunter.hybridize.tests/META-INF/MANIFEST.MF
+++ b/edu.cuny.hunter.hybridize.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: edu.cuny.hunter.hybridize.tests;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
Automatic-Module-Name: edu.cuny.hunter.hybridize.tests
diff --git a/edu.cuny.hunter.hybridize.tests/pom.xml b/edu.cuny.hunter.hybridize.tests/pom.xml
index 0b1fdad17..ea5d02a1c 100644
--- a/edu.cuny.hunter.hybridize.tests/pom.xml
+++ b/edu.cuny.hunter.hybridize.tests/pom.xml
@@ -4,7 +4,7 @@
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
..
edu.cuny.hunter.hybridize.tests
diff --git a/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java b/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java
index 333c2343b..5027b695b 100644
--- a/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java
+++ b/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java
@@ -6098,6 +6098,7 @@ public void testPythonSideEffects58() throws Exception {
* https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/311.
*/
@Test
+ @Ignore("Workaround https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/374.")
public void testPythonSideEffects59() throws Exception {
Function functionFromA = this.getSingleFunction("A");
assertEquals("f", functionFromA.getIdentifier());
@@ -6127,6 +6128,7 @@ public void testPythonSideEffects59() throws Exception {
* https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/311.
*/
@Test
+ @Ignore("Workaround https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/374.")
public void testPythonSideEffects60() throws Exception {
Function functionFromA = this.getSingleFunction("A");
assertEquals("f", functionFromA.getIdentifier());
@@ -6156,6 +6158,7 @@ public void testPythonSideEffects60() throws Exception {
* https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/311.
*/
@Test
+ @Ignore("Workaround https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/374.")
public void testPythonSideEffects61() throws Exception {
Function functionFromA = this.getSingleFunction("A");
assertEquals("f", functionFromA.getIdentifier());
@@ -6706,6 +6709,7 @@ public void testTensorFlowEagerExecution() throws Exception {
* Test https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/311.
*/
@Test
+ @Ignore("Workaround https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/374.")
public void testClassInDifferentFile() throws Exception {
Set functions = getFunctions("B");
Set set = functions.stream().filter(f -> f.getIdentifier().equals("Padding2D.call")).collect(Collectors.toSet());
@@ -6742,6 +6746,7 @@ public void testClassInDifferentFile3() throws Exception {
* Test https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/311.
*/
@Test
+ @Ignore("Workaround https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/374.")
public void testClassInDifferentFile4() throws Exception {
Set functions = getFunctions("B");
Set set = functions.stream().filter(f -> f.getIdentifier().equals("Padding2D.call")).collect(Collectors.toSet());
@@ -7379,6 +7384,7 @@ public void testModule5() throws Exception {
}
@Test
+ @Ignore("Workaround https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/374.")
public void testModule6() throws Exception {
Set functions = this.getFunctions("B");
assertEquals(1, functions.size());
diff --git a/edu.cuny.hunter.hybridize.ui/META-INF/MANIFEST.MF b/edu.cuny.hunter.hybridize.ui/META-INF/MANIFEST.MF
index e3187c211..499868dd0 100644
--- a/edu.cuny.hunter.hybridize.ui/META-INF/MANIFEST.MF
+++ b/edu.cuny.hunter.hybridize.ui/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: edu.cuny.hunter.hybridize.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Automatic-Module-Name: edu.cuny.hunter.hybridize.ui
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Activator: edu.cuny.hunter.hybridize.ui.plugins.HybridizeFunctionRefactoringPlugin
diff --git a/edu.cuny.hunter.hybridize.ui/icons/icon.drawio.png b/edu.cuny.hunter.hybridize.ui/icons/icon.drawio.png
new file mode 100644
index 000000000..f0630894e
Binary files /dev/null and b/edu.cuny.hunter.hybridize.ui/icons/icon.drawio.png differ
diff --git a/edu.cuny.hunter.hybridize.ui/pom.xml b/edu.cuny.hunter.hybridize.ui/pom.xml
index d59e9323f..93eb171fc 100644
--- a/edu.cuny.hunter.hybridize.ui/pom.xml
+++ b/edu.cuny.hunter.hybridize.ui/pom.xml
@@ -4,7 +4,7 @@
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
..
edu.cuny.hunter.hybridize.ui
diff --git a/edu.cuny.hunter.hybridize.updatesite/.project b/edu.cuny.hunter.hybridize.updatesite/.project
new file mode 100644
index 000000000..864171d1c
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.updatesite/.project
@@ -0,0 +1,17 @@
+
+
+ edu.cuny.hunter.hybridize.updatesite
+
+
+
+
+
+ org.eclipse.pde.UpdateSiteBuilder
+
+
+
+
+
+ org.eclipse.pde.UpdateSiteNature
+
+
diff --git a/edu.cuny.hunter.hybridize.updatesite/.settings/org.eclipse.core.resources.prefs b/edu.cuny.hunter.hybridize.updatesite/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.updatesite/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/edu.cuny.hunter.hybridize.updatesite/artifacts.jar b/edu.cuny.hunter.hybridize.updatesite/artifacts.jar
new file mode 100644
index 000000000..078f2bee2
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/artifacts.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/category.xml b/edu.cuny.hunter.hybridize.updatesite/category.xml
new file mode 100644
index 000000000..438fdc8c5
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.updatesite/category.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
+
+
+
+
+
+
+
diff --git a/edu.cuny.hunter.hybridize.updatesite/content.jar b/edu.cuny.hunter.hybridize.updatesite/content.jar
new file mode 100644
index 000000000..2e0343df9
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/content.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011434.jar b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011434.jar
new file mode 100644
index 000000000..283472403
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011434.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011436.jar b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011436.jar
new file mode 100644
index 000000000..22644bcaf
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011436.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011440.jar b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011440.jar
new file mode 100644
index 000000000..bd7826c51
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011440.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011530.jar b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011530.jar
new file mode 100644
index 000000000..6f815785a
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.0.0.202411011530.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.1.0.202411011557.jar b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.1.0.202411011557.jar
new file mode 100644
index 000000000..6d6f6847f
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/features/edu.cuny.hunter.hybridize.feature_1.1.0.202411011557.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011434.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011434.jar
new file mode 100644
index 000000000..b9d2e872c
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011434.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011436.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011436.jar
new file mode 100644
index 000000000..0bf8d4f1d
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011436.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011440.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011440.jar
new file mode 100644
index 000000000..c4fbb863b
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011440.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011530.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011530.jar
new file mode 100644
index 000000000..3aaa78db2
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.0.0.202411011530.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.1.0.202411011557.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.1.0.202411011557.jar
new file mode 100644
index 000000000..0cd4cd7d8
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.core_1.1.0.202411011557.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011434.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011434.jar
new file mode 100644
index 000000000..106f966b1
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011434.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011436.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011436.jar
new file mode 100644
index 000000000..c6f242724
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011436.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011440.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011440.jar
new file mode 100644
index 000000000..534b0d1ae
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011440.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011530.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011530.jar
new file mode 100644
index 000000000..aef4eb2b7
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.0.0.202411011530.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.1.0.202411011557.jar b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.1.0.202411011557.jar
new file mode 100644
index 000000000..9c00bd8ae
Binary files /dev/null and b/edu.cuny.hunter.hybridize.updatesite/plugins/edu.cuny.hunter.hybridize.ui_1.1.0.202411011557.jar differ
diff --git a/edu.cuny.hunter.hybridize.updatesite/pom.xml b/edu.cuny.hunter.hybridize.updatesite/pom.xml
new file mode 100644
index 000000000..aedbd9db8
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.updatesite/pom.xml
@@ -0,0 +1,13 @@
+
+
+ 4.0.0
+
+ edu.cuny.hunter.hybridize
+ edu.cuny.hunter.hybridize
+ 1.0.0-SNAPSHOT
+ ..
+
+ edu.cuny.hunter.hybridize.updatesite
+ eclipse-repository
+ Update site for the Hybridize Functions refactoring.
+
diff --git a/edu.cuny.hunter.hybridize.updatesite/site.xml b/edu.cuny.hunter.hybridize.updatesite/site.xml
new file mode 100644
index 000000000..8ea3937ca
--- /dev/null
+++ b/edu.cuny.hunter.hybridize.updatesite/site.xml
@@ -0,0 +1,12 @@
+
+
+ Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
+
+
+
+
+
+ Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
+
+
+
diff --git a/hybridize.target b/hybridize.target
index 8e0acc2e6..4e99f9811 100644
--- a/hybridize.target
+++ b/hybridize.target
@@ -29,7 +29,7 @@
com.ibm.wala
com.ibm.wala.cast.python.ml
- 0.37.0-SNAPSHOT
+ 0.38.0-SNAPSHOT
jar
diff --git a/logging.properties b/logging.properties
index 34dd4fef5..8c6b960f9 100644
--- a/logging.properties
+++ b/logging.properties
@@ -26,7 +26,7 @@ handlers= java.util.logging.ConsoleHandler
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
-.level= FINEST
+.level= WARNING
############################################################
# Handler specific properties.
@@ -40,7 +40,7 @@ handlers= java.util.logging.ConsoleHandler
#java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
-java.util.logging.ConsoleHandler.level = FINEST
+java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
# Example to customize the SimpleFormatter output format
diff --git a/pom.xml b/pom.xml
index 3574cfb71..d5cd76475 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
edu.cuny.hunter.hybridize
edu.cuny.hunter.hybridize
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
pom
Hybridize Function Refactoring
This prototype refactoring plug-in for Eclipse PyDev represents ongoing work in developing an automated refactoring tool that would assist developers in hybridizing their Python functions.
@@ -18,6 +18,7 @@
edu.cuny.hunter.hybridize.eval
edu.cuny.hunter.hybridize.tests
edu.cuny.hunter.hybridize.tests.report
+ edu.cuny.hunter.hybridize.feature
https://github.com/ponder-lab/Hybridize-Functions-Refactoring
@@ -27,15 +28,15 @@
https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues
- Travis CI
- https://app.travis-ci.com/github/ponder-lab/Hybridize-Functions-Refactoring
+ GitHub
+ https://github.com/ponder-lab/Hybridize-Functions-Refactoring/actions/workflows/maven.yml
2.7.5
UTF-8
0.8.12
3.4.0
- 10.17.0
+ 10.20.0
4.13.2
http://download.eclipse.org/releases/${platform-version-name}
2022-09
@@ -263,9 +264,6 @@
org.eclipse.tycho
tycho-p2-repository-plugin
${tycho-version}
-
- true
-
org.eclipse.tycho
@@ -310,6 +308,11 @@
+
+ org.eclipse.tycho
+ tycho-versions-plugin
+ ${tycho-version}
+