http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/QuaternaryOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/QuaternaryOp.java 
b/src/main/java/org/apache/sysml/hops/QuaternaryOp.java
index 6395d6a..947f2ba 100644
--- a/src/main/java/org/apache/sysml/hops/QuaternaryOp.java
+++ b/src/main/java/org/apache/sysml/hops/QuaternaryOp.java
@@ -168,7 +168,7 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        @Override
-       public void checkArity() throws HopsException {
+       public void checkArity() {
                HopsException.check(_input.size() == 3 || _input.size() == 4, 
this,
                                "should have arity 3 or 4 but has arity %d", 
_input.size());
        }
@@ -194,8 +194,7 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        
        @Override
        public Lop constructLops() 
-               throws HopsException, LopsException 
-       {       
+       {
                //return already created lops
                if( getLops() != null )
                        return getLops();
@@ -302,7 +301,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructCPLopsWeightedSquaredLoss(WeightsType wtype) 
-               throws HopsException, LopsException
        {
                WeightedSquaredLoss wsloss = new WeightedSquaredLoss(
                                getInput().get(0).constructLops(),
@@ -320,7 +318,7 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
                setLops( wsloss );
        }
 
-       private Lop constructLeftFactorMRLop(Hop U, Hop V, boolean cacheU, 
double m1Size) throws HopsException, LopsException {
+       private Lop constructLeftFactorMRLop(Hop U, Hop V, boolean cacheU, 
double m1Size) {
                Lop lU = null;
                if (cacheU) {
                        // partitioning of U for read through distributed cache
@@ -349,7 +347,7 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
                return lU;
        }
 
-       private Lop constructRightFactorMRLop(Hop U, Hop V, boolean cacheV, 
double m2Size) throws HopsException, LopsException {
+       private Lop constructRightFactorMRLop(Hop U, Hop V, boolean cacheV, 
double m2Size) {
                Lop lV = null;
                if (cacheV) {
                        // partitioning of V for read through distributed cache
@@ -384,7 +382,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructMRLopsWeightedSquaredLoss(WeightsType wtype) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wsloss are factors U/V with a rank 
of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -484,7 +481,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructSparkLopsWeightedSquaredLoss(WeightsType wtype) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wsloss are factors U/V with a rank 
of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -533,9 +529,7 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
                }
        }
 
-       private void constructCPLopsWeightedSigmoid(WSigmoidType wtype) 
-               throws HopsException, LopsException
-       {
+       private void constructCPLopsWeightedSigmoid(WSigmoidType wtype) {
                WeightedSigmoid wsig = new WeightedSigmoid(
                                getInput().get(0).constructLops(),
                                getInput().get(1).constructLops(),
@@ -551,9 +545,7 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
                setLops( wsig );
        }
 
-       private void constructMRLopsWeightedSigmoid( WSigmoidType wtype ) 
-               throws HopsException, LopsException
-       {
+       private void constructMRLopsWeightedSigmoid( WSigmoidType wtype ) {
                //NOTE: the common case for wsigmoid are factors U/V with a 
rank of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
                //by applying the hop rewrite for Weighted Sigmoid only if this 
constraint holds. 
@@ -622,7 +614,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructSparkLopsWeightedSigmoid( WSigmoidType wtype ) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wsigmoid are factors U/V with a 
rank of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -671,7 +662,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructCPLopsWeightedDivMM(WDivMMType wtype) 
-               throws HopsException, LopsException
        {
                WeightedDivMM wdiv = new WeightedDivMM(
                                getInput().get(0).constructLops(),
@@ -690,7 +680,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructMRLopsWeightedDivMM( WDivMMType wtype ) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wdivmm are factors U/V with a rank 
of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -777,7 +766,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructSparkLopsWeightedDivMM( WDivMMType wtype ) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wdivmm are factors U/V with a rank 
of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -827,7 +815,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructCPLopsWeightedCeMM(WCeMMType wtype) 
-               throws HopsException, LopsException
        {
                WeightedCrossEntropy wcemm = new WeightedCrossEntropy(
                                getInput().get(0).constructLops(),
@@ -846,7 +833,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructMRLopsWeightedCeMM(WCeMMType wtype) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wcemm are factors U/V with a rank 
of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -939,7 +925,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructSparkLopsWeightedCeMM(WCeMMType wtype) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wcemm are factors U/V with a rank 
of 10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -989,7 +974,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructCPLopsWeightedUMM(WUMMType wtype) 
-               throws HopsException, LopsException
        {
                Unary.OperationTypes uop = _uop!=null ? 
                                HopsOpOp1LopsU.get(_uop) : _sop==OpOp2.POW ? 
@@ -1011,7 +995,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructMRLopsWeightedUMM( WUMMType wtype ) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wumm are factors U/V with a rank of 
10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -1085,7 +1068,6 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        }
 
        private void constructSparkLopsWeightedUMM( WUMMType wtype ) 
-               throws HopsException, LopsException
        {
                //NOTE: the common case for wumm are factors U/V with a rank of 
10s to 100s; the current runtime only
                //supports single block outer products (U/V rank <= blocksize, 
i.e., 1000 by default); we enforce this
@@ -1268,13 +1250,12 @@ public class QuaternaryOp extends Hop implements 
MultiThreadedHop
        
        @Override
        protected ExecType optFindExecType() 
-               throws HopsException 
-       {       
+       {
                checkAndSetForcedPlatform();
                
                ExecType REMOTE = OptimizerUtils.isSparkExecutionMode() ? 
ExecType.SPARK : ExecType.MR;
                
-               if( _etypeForced != null )                      
+               if( _etypeForced != null )
                {
                        _etype = _etypeForced;
                }

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ReorgOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/ReorgOp.java 
b/src/main/java/org/apache/sysml/hops/ReorgOp.java
index 2ac6389..b8b0139 100644
--- a/src/main/java/org/apache/sysml/hops/ReorgOp.java
+++ b/src/main/java/org/apache/sysml/hops/ReorgOp.java
@@ -87,7 +87,7 @@ public class ReorgOp extends Hop implements MultiThreadedHop
        }
 
        @Override
-       public void checkArity() throws HopsException {
+       public void checkArity() {
                int sz = _input.size();
                switch( op ) {
                case TRANSPOSE:
@@ -157,7 +157,6 @@ public class ReorgOp extends Hop implements MultiThreadedHop
 
        @Override
        public Lop constructLops()
-               throws HopsException, LopsException 
        {
                //return already created lops
                if( getLops() != null )
@@ -387,7 +386,6 @@ public class ReorgOp extends Hop implements MultiThreadedHop
        }
 
        private static Lop constructCPOrSparkSortLop( Hop input, Hop by, Hop 
desc, Hop ixret, ExecType et, boolean bSortIndInMem ) 
-               throws HopsException, LopsException
        {
                Hop[] hinputs = new Hop[]{input, by, desc, ixret};
                Lop[] linputs = new Lop[4];
@@ -514,13 +512,13 @@ public class ReorgOp extends Hop implements 
MultiThreadedHop
        }
        
        @Override
-       protected ExecType optFindExecType() throws HopsException {
+       protected ExecType optFindExecType() {
                
                checkAndSetForcedPlatform();
        
                ExecType REMOTE = OptimizerUtils.isSparkExecutionMode() ? 
ExecType.SPARK : ExecType.MR;
                
-               if( _etypeForced != null )                      
+               if( _etypeForced != null )
                {
                        _etype = _etypeForced;
                }

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/TernaryOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/TernaryOp.java 
b/src/main/java/org/apache/sysml/hops/TernaryOp.java
index 4dd4c40..1e7876a 100644
--- a/src/main/java/org/apache/sysml/hops/TernaryOp.java
+++ b/src/main/java/org/apache/sysml/hops/TernaryOp.java
@@ -107,7 +107,7 @@ public class TernaryOp extends Hop
        }
 
        @Override
-       public void checkArity() throws HopsException {
+       public void checkArity() {
                int sz = _input.size();
                if (_dimInputsPresent) {
                        // only CTABLE
@@ -147,8 +147,7 @@ public class TernaryOp extends Hop
        
        @Override
        public Lop constructLops() 
-               throws HopsException, LopsException 
-       {       
+       {
                //return already created lops
                if( getLops() != null )
                        return getLops();
@@ -196,12 +195,8 @@ public class TernaryOp extends Hop
 
        /**
         * Method to construct LOPs when op = CENTRAILMOMENT.
-        * 
-        * @throws HopsException if HopsException occurs
-        * @throws LopsException if LopsException occurs
         */
-       private void constructLopsCentralMoment() 
-               throws HopsException, LopsException 
+       private void constructLopsCentralMoment()
        {       
                if ( _op != OpOp3.CENTRALMOMENT )
                        throw new HopsException("Unexpected operation: " + _op 
+ ", expecting " + OpOp3.CENTRALMOMENT );
@@ -250,13 +245,8 @@ public class TernaryOp extends Hop
        
        /**
         * Method to construct LOPs when op = COVARIANCE.
-        * 
-        * @throws HopsException if HopsException occurs
-        * @throws LopsException if LopsException occurs
         */
-       private void constructLopsCovariance()
-               throws HopsException, LopsException 
-       {       
+       private void constructLopsCovariance() {
                if ( _op != OpOp3.COVARIANCE )
                        throw new HopsException("Unexpected operation: " + _op 
+ ", expecting " + OpOp3.COVARIANCE );
                
@@ -308,11 +298,8 @@ public class TernaryOp extends Hop
        
        /**
         * Method to construct LOPs when op = QUANTILE | INTERQUANTILE.
-        * 
-        * @throws HopsException if HopsException occurs
-        * @throws LopsException if LopsException occurs
         */
-       private void constructLopsQuantile() throws HopsException, 
LopsException {
+       private void constructLopsQuantile() {
                
                if ( _op != OpOp3.QUANTILE && _op != OpOp3.INTERQUANTILE )
                        throw new HopsException("Unexpected operation: " + _op 
+ ", expecting " + OpOp3.QUANTILE + " or " + OpOp3.INTERQUANTILE );
@@ -390,11 +377,8 @@ public class TernaryOp extends Hop
 
        /**
         * Method to construct LOPs when op = CTABLE.
-        * 
-        * @throws HopsException if HopsException occurs
-        * @throws LopsException if LopsException occurs
         */
-       private void constructLopsCtable() throws HopsException, LopsException {
+       private void constructLopsCtable() {
                
                if ( _op != OpOp3.CTABLE )
                        throw new HopsException("Unexpected operation: " + _op 
+ ", expecting " + OpOp3.CTABLE );
@@ -645,7 +629,6 @@ public class TernaryOp extends Hop
        }
 
        private void constructLopsTernaryDefault() 
-               throws HopsException, LopsException 
        {
                ExecType et = optFindExecType();
                if( getInput().stream().allMatch(h -> 
h.getDataType().isScalar()) )
@@ -831,8 +814,7 @@ public class TernaryOp extends Hop
 
        @Override
        protected ExecType optFindExecType() 
-               throws HopsException 
-       {       
+       {
                checkAndSetForcedPlatform();
 
                ExecType REMOTE = OptimizerUtils.isSparkExecutionMode() ? 
ExecType.SPARK : ExecType.MR;

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/UnaryOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/UnaryOp.java 
b/src/main/java/org/apache/sysml/hops/UnaryOp.java
index e16cb4c..a6a9d66 100644
--- a/src/main/java/org/apache/sysml/hops/UnaryOp.java
+++ b/src/main/java/org/apache/sysml/hops/UnaryOp.java
@@ -33,7 +33,6 @@ import org.apache.sysml.lops.Data;
 import org.apache.sysml.lops.Group;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.lops.PartialAggregate;
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.lops.PickByCount;
@@ -72,7 +71,7 @@ public class UnaryOp extends Hop implements MultiThreadedHop
        }
 
        @Override
-       public void checkArity() throws HopsException {
+       public void checkArity() {
                HopsException.check(_input.size() == 1, this, "should have 
arity 1 but has arity %d", _input.size());
        }
 
@@ -126,8 +125,7 @@ public class UnaryOp extends Hop implements MultiThreadedHop
        
        @Override
        public Lop constructLops()
-               throws HopsException, LopsException 
-       {               
+       {
                //reuse existing lop
                if( getLops() != null )
                        return getLops();
@@ -201,7 +199,6 @@ public class UnaryOp extends Hop implements MultiThreadedHop
        
 
        private Lop constructLopsMedian() 
-               throws HopsException, LopsException 
        {
                ExecType et = optFindExecType();
 
@@ -269,7 +266,6 @@ public class UnaryOp extends Hop implements MultiThreadedHop
        }
        
        private Lop constructLopsIQM() 
-               throws HopsException, LopsException
        {
 
                ExecType et = optFindExecType();
@@ -380,11 +376,8 @@ public class UnaryOp extends Hop implements 
MultiThreadedHop
         * fit into the map task memory budget) or by creating custom job types.
         * 
         * @return low-level operator
-        * @throws HopsException if HopsException occurs
-        * @throws LopsException if LopsException occurs
         */
        private Lop constructLopsMRCumulativeUnary() 
-               throws HopsException, LopsException 
        {
                Hop input = getInput().get(0);
                long rlen = input.getDim1();
@@ -460,7 +453,6 @@ public class UnaryOp extends Hop implements MultiThreadedHop
        }
 
        private Lop constructLopsSparkCumulativeUnary() 
-               throws HopsException, LopsException 
        {
                Hop input = getInput().get(0);
                long rlen = input.getDim1();
@@ -639,15 +631,14 @@ public class UnaryOp extends Hop implements 
MultiThreadedHop
        
        @Override
        protected ExecType optFindExecType() 
-               throws HopsException 
-       {               
+       {
                checkAndSetForcedPlatform();
        
                ExecType REMOTE = OptimizerUtils.isSparkExecutionMode() ? 
ExecType.SPARK : ExecType.MR;
                
-               if( _etypeForced != null )                      
+               if( _etypeForced != null )
                {
-                       _etype = _etypeForced;          
+                       _etype = _etypeForced;
                }
                else 
                {

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/codegen/SpoofCompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/codegen/SpoofCompiler.java 
b/src/main/java/org/apache/sysml/hops/codegen/SpoofCompiler.java
index 647a5c8..e4a6f49 100644
--- a/src/main/java/org/apache/sysml/hops/codegen/SpoofCompiler.java
+++ b/src/main/java/org/apache/sysml/hops/codegen/SpoofCompiler.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.hops.codegen;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -66,14 +65,12 @@ import org.apache.sysml.hops.recompile.Recompiler;
 import org.apache.sysml.hops.AggUnaryOp;
 import org.apache.sysml.hops.Hop;
 import org.apache.sysml.hops.Hop.OpOp1;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.hops.rewrite.HopRewriteUtils;
 import org.apache.sysml.hops.rewrite.ProgramRewriteStatus;
 import org.apache.sysml.hops.rewrite.ProgramRewriter;
 import org.apache.sysml.hops.rewrite.RewriteCommonSubexpressionElimination;
 import org.apache.sysml.hops.rewrite.RewriteRemoveUnnecessaryCasts;
-import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.parser.DMLProgram;
 import org.apache.sysml.parser.ForStatement;
 import org.apache.sysml.parser.ForStatementBlock;
@@ -81,7 +78,6 @@ import org.apache.sysml.parser.FunctionStatement;
 import org.apache.sysml.parser.FunctionStatementBlock;
 import org.apache.sysml.parser.IfStatement;
 import org.apache.sysml.parser.IfStatementBlock;
-import org.apache.sysml.parser.LanguageException;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatement;
 import org.apache.sysml.parser.WhileStatementBlock;
@@ -170,9 +166,7 @@ public class SpoofCompiler
                        new RewriteCommonSubexpressionElimination(true),
                        new RewriteRemoveUnnecessaryCasts());
        
-       public static void generateCode(DMLProgram dmlprog) 
-               throws LanguageException, HopsException, DMLRuntimeException
-       {
+       public static void generateCode(DMLProgram dmlprog) {
                // for each namespace, handle function statement blocks
                for (String namespaceKey : dmlprog.getNamespaces().keySet()) {
                        for (String fname : 
dmlprog.getFunctionStatementBlocks(namespaceKey).keySet()) {
@@ -188,9 +182,7 @@ public class SpoofCompiler
                }
        }
        
-       public static void generateCode(Program rtprog) 
-               throws LanguageException, HopsException, DMLRuntimeException, 
LopsException, IOException
-       {
+       public static void generateCode(Program rtprog) {
                // handle all function program blocks
                for( FunctionProgramBlock pb : 
rtprog.getFunctionProgramBlocks().values() )
                        generateCodeFromProgramBlock(pb);
@@ -200,9 +192,7 @@ public class SpoofCompiler
                        generateCodeFromProgramBlock(pb);
        }
        
-       public static void generateCodeFromStatementBlock(StatementBlock 
current)
-               throws HopsException, DMLRuntimeException
-       {
+       public static void generateCodeFromStatementBlock(StatementBlock 
current) {
                if (current instanceof FunctionStatementBlock)
                {
                        FunctionStatementBlock fsb = 
(FunctionStatementBlock)current;
@@ -246,7 +236,6 @@ public class SpoofCompiler
        }
        
        public static void generateCodeFromProgramBlock(ProgramBlock current)
-               throws HopsException, DMLRuntimeException, LopsException, 
IOException
        {
                if (current instanceof FunctionProgramBlock)
                {
@@ -295,9 +284,7 @@ public class SpoofCompiler
                }
        }
 
-       public static ArrayList<Hop> generateCodeFromHopDAGs(ArrayList<Hop> 
roots) 
-               throws HopsException, DMLRuntimeException
-       {
+       public static ArrayList<Hop> generateCodeFromHopDAGs(ArrayList<Hop> 
roots) {
                if( roots == null )
                        return roots;
 
@@ -308,17 +295,13 @@ public class SpoofCompiler
                return optimized;
        }
        
-       public static ArrayList<Instruction> 
generateCodeFromHopDAGsToInst(StatementBlock sb, ArrayList<Hop> roots) 
-               throws DMLRuntimeException, HopsException, LopsException, 
IOException 
-       {
+       public static ArrayList<Instruction> 
generateCodeFromHopDAGsToInst(StatementBlock sb, ArrayList<Hop> roots) {
                //create copy of hop dag, call codegen, and generate 
instructions
                return Recompiler.recompileHopsDag(sb, roots, 
                        new LocalVariableMap(), new RecompileStatus(true), 
false, false, 0);
        }
        
-       public static ArrayList<Instruction> generateCodeFromHopDAGsToInst(Hop 
root) 
-               throws DMLRuntimeException, HopsException, LopsException, 
IOException 
-       {
+       public static ArrayList<Instruction> generateCodeFromHopDAGsToInst(Hop 
root) {
                //create copy of hop dag, call codegen, and generate 
instructions
                return Recompiler.recompileHopsDag(root, 
                        new LocalVariableMap(), new RecompileStatus(true), 
false, false, 0);
@@ -331,9 +314,8 @@ public class SpoofCompiler
         * @param root dag root node
         * @param recompile true if invoked during dynamic recompilation
         * @return dag root node of modified dag
-        * @throws DMLRuntimeException if optimization failed
         */
-       public static Hop optimize( Hop root, boolean recompile ) throws 
DMLRuntimeException {
+       public static Hop optimize( Hop root, boolean recompile ) {
                if( root == null )
                        return root;
                return optimize(new ArrayList<>(
@@ -346,10 +328,8 @@ public class SpoofCompiler
         * @param roots dag root nodes
         * @param recompile true if invoked during dynamic recompilation
         * @return dag root nodes of modified dag 
-        * @throws DMLRuntimeException if optimization failed
         */
        public static ArrayList<Hop> optimize(ArrayList<Hop> roots, boolean 
recompile) 
-               throws DMLRuntimeException 
        {
                if( roots == null || roots.isEmpty() )
                        return roots;

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/codegen/SpoofFusedOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/codegen/SpoofFusedOp.java 
b/src/main/java/org/apache/sysml/hops/codegen/SpoofFusedOp.java
index 235aa88..07e71a9 100644
--- a/src/main/java/org/apache/sysml/hops/codegen/SpoofFusedOp.java
+++ b/src/main/java/org/apache/sysml/hops/codegen/SpoofFusedOp.java
@@ -23,12 +23,10 @@ import java.util.ArrayList;
 
 import org.apache.sysml.hops.Hop;
 import org.apache.sysml.hops.Hop.MultiThreadedHop;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.MemoTable;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.lops.SpoofFused;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
@@ -70,7 +68,7 @@ public class SpoofFusedOp extends Hop implements 
MultiThreadedHop
        }
 
        @Override
-       public void checkArity() throws HopsException {}
+       public void checkArity() {}
 
        @Override
        public void setMaxNumThreads(int k) {
@@ -105,7 +103,7 @@ public class SpoofFusedOp extends Hop implements 
MultiThreadedHop
        }
        
        @Override
-       public Lop constructLops() throws HopsException, LopsException {
+       public Lop constructLops() {
                if( getLops() != null )
                        return getLops();
                
@@ -125,7 +123,7 @@ public class SpoofFusedOp extends Hop implements 
MultiThreadedHop
        }
        
        @Override
-       protected ExecType optFindExecType() throws HopsException {
+       protected ExecType optFindExecType() {
                
                checkAndSetForcedPlatform();
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java 
b/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
index a87221f..91300e7 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
@@ -67,9 +67,7 @@ public class CostEstimationWrapper
                }
        }
        
-       public static double getTimeEstimate(Program rtprog, ExecutionContext 
ec) 
-               throws DMLRuntimeException
-       {
+       public static double getTimeEstimate(Program rtprog, ExecutionContext 
ec) {
                Timing time = new Timing(true);
                
                HashMap<String,VarStats> stats = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java 
b/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
index f09de20..37e588f 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
@@ -31,7 +31,6 @@ import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.DMLProgram;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
@@ -74,9 +73,7 @@ public abstract class CostEstimator
        protected static final VarStats _unknownStats = new 
VarStats(1,1,-1,-1,-1,false);
        protected static final VarStats _scalarStats = new 
VarStats(1,1,1,1,1,true);
        
-       public double getTimeEstimate(Program rtprog, LocalVariableMap vars, 
HashMap<String,VarStats> stats) 
-               throws DMLRuntimeException
-       {
+       public double getTimeEstimate(Program rtprog, LocalVariableMap vars, 
HashMap<String,VarStats> stats) {
                double costs = 0;
 
                //obtain stats from symboltable (e.g., during recompile)
@@ -89,9 +86,7 @@ public abstract class CostEstimator
                return costs;
        }
        
-       public double getTimeEstimate(ProgramBlock pb, LocalVariableMap vars, 
HashMap<String,VarStats> stats, boolean recursive) 
-               throws DMLRuntimeException
-       {
+       public double getTimeEstimate(ProgramBlock pb, LocalVariableMap vars, 
HashMap<String,VarStats> stats, boolean recursive) {
                //obtain stats from symboltable (e.g., during recompile)
                maintainVariableStatistics(vars, stats);
                                
@@ -99,9 +94,7 @@ public abstract class CostEstimator
                return rGetTimeEstimate(pb, stats, new HashSet<String>(), 
recursive);
        }
 
-       private double rGetTimeEstimate(ProgramBlock pb, 
HashMap<String,VarStats> stats, HashSet<String> memoFunc, boolean recursive) 
-               throws DMLRuntimeException
-       {
+       private double rGetTimeEstimate(ProgramBlock pb, 
HashMap<String,VarStats> stats, HashSet<String> memoFunc, boolean recursive) {
                double ret = 0;
                
                if (pb instanceof WhileProgramBlock)
@@ -216,9 +209,7 @@ public abstract class CostEstimator
                return ret;
        }
        
-       private static void maintainVariableStatistics( LocalVariableMap vars, 
HashMap<String, VarStats> stats ) 
-               throws DMLRuntimeException
-       {
+       private static void maintainVariableStatistics( LocalVariableMap vars, 
HashMap<String, VarStats> stats ) {
                for( String varname : vars.keySet() )
                {
                        Data dat = vars.get(varname);
@@ -308,9 +299,7 @@ public abstract class CostEstimator
                }
        }
 
-       private void maintainMRJobInstVariableStatistics( Instruction inst, 
HashMap<String, VarStats> stats ) 
-               throws DMLRuntimeException
-       {
+       private void maintainMRJobInstVariableStatistics( Instruction inst, 
HashMap<String, VarStats> stats ) {
                MRJobInstruction jobinst = (MRJobInstruction)inst;
                
                //input sizes (varname, index mapping)
@@ -631,9 +620,7 @@ public abstract class CostEstimator
                return OptimizerUtils.getNumIterations(pb, DEFAULT_NUMITER);
        }
 
-       protected abstract double getCPInstTimeEstimate( Instruction inst, 
VarStats[] vs, String[] args )
-               throws DMLRuntimeException;
+       protected abstract double getCPInstTimeEstimate( Instruction inst, 
VarStats[] vs, String[] args );
 
-       protected abstract double getMRJobInstTimeEstimate( Instruction inst, 
VarStats[] vs, String[] args )
-               throws DMLRuntimeException;
+       protected abstract double getMRJobInstTimeEstimate( Instruction inst, 
VarStats[] vs, String[] args );
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java 
b/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
index 8329493..675fdf9 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
@@ -99,8 +99,7 @@ public class CostEstimatorStaticRuntime extends CostEstimator
        
        @Override
        @SuppressWarnings("unused")
-       protected double getCPInstTimeEstimate( Instruction inst, VarStats[] 
vs, String[] args ) 
-               throws DMLRuntimeException
+       protected double getCPInstTimeEstimate( Instruction inst, VarStats[] 
vs, String[] args )
        {
                CPInstruction cpinst = (CPInstruction)inst;
                
@@ -156,7 +155,6 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
        
        @Override
        protected double getMRJobInstTimeEstimate( Instruction inst, VarStats[] 
vs, String[] args ) 
-               throws DMLRuntimeException
        {
                MRJobInstruction jinst = (MRJobInstruction) inst;
                
@@ -315,7 +313,6 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
        }               
        
        private Object[] extractMRInstStatistics( String inst, VarStats[] stats 
) 
-               throws DMLRuntimeException
        {
                Object[] ret = new Object[2]; //stats, attrs
                VarStats[] vs = new VarStats[3];
@@ -487,8 +484,7 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
                return inIx;
        }
        
-       private byte[] getMapOutputIndexes( byte[] inIx, byte[] retIx, String 
rdInst, String mapInst, String shfInst, String aggInst, String otherInst ) 
-               throws DMLRuntimeException
+       private byte[] getMapOutputIndexes( byte[] inIx, byte[] retIx, String 
rdInst, String mapInst, String shfInst, String aggInst, String otherInst )
        {
                //note: this is a simplified version of 
MRJobConfiguration.setUpOutputIndexesForMapper
                
@@ -611,9 +607,7 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
                return Math.max(1, ret);
        }
 
-       private static int getDistcacheIndex(String inst) 
-               throws DMLRuntimeException
-       {
+       private static int getDistcacheIndex(String inst) {
                ArrayList<Byte> indexes = new ArrayList<>();
                
                if( InstructionUtils.isDistributedCacheUsed(inst) ) {
@@ -747,15 +741,13 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
        // Operation Costs //
        /////////////////////
        
-       private static double getInstTimeEstimate(String opcode, VarStats[] vs, 
String[] args, ExecType et) 
-               throws DMLRuntimeException
-       {
+       private static double getInstTimeEstimate(String opcode, VarStats[] vs, 
String[] args, ExecType et) {
                boolean inMR = (et == ExecType.MR);
-               return getInstTimeEstimate(opcode, inMR,  
-                                                  vs[0]._rlen, vs[0]._clen, 
(vs[0]._nnz<0)? 1.0:(double)vs[0]._nnz/vs[0]._rlen/vs[0]._clen, 
-                                                          vs[1]._rlen, 
vs[1]._clen, (vs[1]._nnz<0)? 1.0:(double)vs[1]._nnz/vs[1]._rlen/vs[1]._clen, 
-                                                          vs[2]._rlen, 
vs[2]._clen, (vs[2]._nnz<0)? 1.0:(double)vs[2]._nnz/vs[2]._rlen/vs[2]._clen,
-                                                          args);
+               return getInstTimeEstimate(opcode, inMR,
+                       vs[0]._rlen, vs[0]._clen, (vs[0]._nnz<0)? 
1.0:(double)vs[0]._nnz/vs[0]._rlen/vs[0]._clen,
+                       vs[1]._rlen, vs[1]._clen, (vs[1]._nnz<0)? 
1.0:(double)vs[1]._nnz/vs[1]._rlen/vs[1]._clen,
+                       vs[2]._rlen, vs[2]._clen, (vs[2]._nnz<0)? 
1.0:(double)vs[2]._nnz/vs[2]._rlen/vs[2]._clen,
+                       args);
        }
        
        /**
@@ -777,9 +769,8 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
         * @param d3s ?
         * @param args ?
         * @return estimated instruction execution time
-        * @throws DMLRuntimeException if DMLRuntimeException occurs
         */
-       private static double getInstTimeEstimate( String opcode, boolean inMR, 
long d1m, long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long 
d3n, double d3s, String[] args ) throws DMLRuntimeException
+       private static double getInstTimeEstimate( String opcode, boolean inMR, 
long d1m, long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long 
d3n, double d3s, String[] args )
        {
                double nflops = getNFLOP(opcode, inMR, d1m, d1n, d1s, d2m, d2n, 
d2s, d3m, d3n, d3s, args);
                double time = nflops / DEFAULT_FLOPS;
@@ -790,8 +781,7 @@ public class CostEstimatorStaticRuntime extends 
CostEstimator
                return time;
        }
        
-       private static double getNFLOP( String optype, boolean inMR, long d1m, 
long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long d3n, 
double d3s, String[] args ) 
-               throws DMLRuntimeException
+       private static double getNFLOP( String optype, boolean inMR, long d1m, 
long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long d3n, 
double d3s, String[] args )
        {
                //operation costs in FLOP on matrix block level (for CP and MR 
instructions)
                //(excludes IO and parallelism; assumes known dims for all 
inputs, outputs )

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java 
b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
index 5105716..78cba3d 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
@@ -281,9 +281,7 @@ public class FunctionCallGraph
                }
        }
        
-       private boolean rConstructFunctionCallGraph(String fkey, StatementBlock 
sb, Stack<String> fstack, HashSet<String> lfset) 
-               throws HopsException 
-       {
+       private boolean rConstructFunctionCallGraph(String fkey, StatementBlock 
sb, Stack<String> fstack, HashSet<String> lfset) {
                boolean ret = false;
                if (sb instanceof WhileStatementBlock) {
                        WhileStatement ws = (WhileStatement)sb.getStatement(0);

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/FunctionCallSizeInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/ipa/FunctionCallSizeInfo.java 
b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallSizeInfo.java
index 337f7da..2d2f658 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/FunctionCallSizeInfo.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallSizeInfo.java
@@ -29,7 +29,6 @@ import java.util.Set;
 
 import org.apache.sysml.hops.FunctionOp;
 import org.apache.sysml.hops.Hop;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.LiteralOp;
 import org.apache.sysml.hops.rewrite.HopRewriteUtils;
 
@@ -68,11 +67,8 @@ public class FunctionCallSizeInfo
         * reachable from the main program. 
         * 
         * @param fgraph function call graph
-        * @throws HopsException 
         */
-       public FunctionCallSizeInfo(FunctionCallGraph fgraph) 
-               throws HopsException 
-       {
+       public FunctionCallSizeInfo(FunctionCallGraph fgraph) {
                this(fgraph, true);
        }
        
@@ -82,11 +78,8 @@ public class FunctionCallSizeInfo
         * 
         * @param fgraph function call graph
         * @param init initialize function candidates
-        * @throws HopsException 
         */
-       public FunctionCallSizeInfo(FunctionCallGraph fgraph, boolean init) 
-               throws HopsException 
-       {
+       public FunctionCallSizeInfo(FunctionCallGraph fgraph, boolean init) {
                _fgraph = fgraph;
                _fcand = new HashSet<>();
                _fcandUnary = new HashSet<>();
@@ -212,7 +205,6 @@ public class FunctionCallSizeInfo
        }
        
        private void constructFunctionCallSizeInfo() 
-               throws HopsException 
        {
                //step 1: determine function candidates by evaluating all 
function calls
                for( String fkey : _fgraph.getReachableFunctions() ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPass.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/ipa/IPAPass.java 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPass.java
index f3a4912..bb0c3c7 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/IPAPass.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/IPAPass.java
@@ -21,7 +21,6 @@ package org.apache.sysml.hops.ipa;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.parser.DMLProgram;
 
 /**
@@ -48,8 +47,6 @@ public abstract class IPAPass
         * @param prog dml program
         * @param fgraph function call graph
         * @param fcallSizes function call size infos
-        * @throws HopsException
         */
-       public abstract void rewriteProgram( DMLProgram prog, FunctionCallGraph 
fgraph, FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException;
+       public abstract void rewriteProgram( DMLProgram prog, FunctionCallGraph 
fgraph, FunctionCallSizeInfo fcallSizes );
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassApplyStaticHopRewrites.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassApplyStaticHopRewrites.java 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassApplyStaticHopRewrites.java
index 57bff00..9413ba5 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/IPAPassApplyStaticHopRewrites.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/IPAPassApplyStaticHopRewrites.java
@@ -40,9 +40,7 @@ public class IPAPassApplyStaticHopRewrites extends IPAPass
        }
        
        @Override
-       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
-       {
+       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) {
                try {
                        //construct rewriter w/o checkpoint injection to avoid 
redundancy
                        ProgramRewriter rewriter = new ProgramRewriter(true, 
false);

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassFlagFunctionsRecompileOnce.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassFlagFunctionsRecompileOnce.java
 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassFlagFunctionsRecompileOnce.java
index a552df1..4280830 100644
--- 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassFlagFunctionsRecompileOnce.java
+++ 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassFlagFunctionsRecompileOnce.java
@@ -50,7 +50,6 @@ public class IPAPassFlagFunctionsRecompileOnce extends IPAPass
        
        @Override
        public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
        {
                if( !ConfigurationManager.isDynamicRecompilation() )
                        return;

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassInlineFunctions.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassInlineFunctions.java 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassInlineFunctions.java
index 61bc895..51e3754 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/IPAPassInlineFunctions.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/IPAPassInlineFunctions.java
@@ -26,7 +26,6 @@ import java.util.List;
 import org.apache.sysml.hops.DataOp;
 import org.apache.sysml.hops.FunctionOp;
 import org.apache.sysml.hops.Hop;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.LiteralOp;
 import org.apache.sysml.hops.Hop.DataOpTypes;
 import org.apache.sysml.hops.recompile.Recompiler;
@@ -52,7 +51,6 @@ public class IPAPassInlineFunctions extends IPAPass
        
        @Override
        public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
        {
                //NOTE: we inline single-statement-block (i.e., last-level 
block) functions
                //that do not contain other functions, and either are small or 
called once

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassPropagateReplaceLiterals.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassPropagateReplaceLiterals.java 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassPropagateReplaceLiterals.java
index 2e4649d..4d9af5a 100644
--- 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassPropagateReplaceLiterals.java
+++ 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassPropagateReplaceLiterals.java
@@ -54,7 +54,6 @@ public class IPAPassPropagateReplaceLiterals extends IPAPass
        
        @Override
        public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
        {
                for( String fkey : fgraph.getReachableFunctions() ) {
                        FunctionOp first = fgraph.getFunctionCalls(fkey).get(0);
@@ -82,7 +81,6 @@ public class IPAPassPropagateReplaceLiterals extends IPAPass
        }
        
        private void rReplaceLiterals(StatementBlock sb, LocalVariableMap 
constants) 
-               throws HopsException 
        {
                //remove updated literals
                for( String varname : sb.variablesUpdated().getVariableNames() )
@@ -120,9 +118,7 @@ public class IPAPassPropagateReplaceLiterals extends IPAPass
                }
        }
        
-       private static void replaceLiterals(ArrayList<Hop> roots, 
LocalVariableMap constants) 
-               throws HopsException 
-       {
+       private static void replaceLiterals(ArrayList<Hop> roots, 
LocalVariableMap constants) {
                if( roots == null )
                        return;
                
@@ -137,9 +133,7 @@ public class IPAPassPropagateReplaceLiterals extends IPAPass
                }
        }
        
-       private static void replaceLiterals(Hop root, LocalVariableMap 
constants) 
-               throws HopsException 
-       {
+       private static void replaceLiterals(Hop root, LocalVariableMap 
constants) {
                if( root == null )
                        return;
                

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveConstantBinaryOps.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveConstantBinaryOps.java 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveConstantBinaryOps.java
index d79379b..df44961 100644
--- 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveConstantBinaryOps.java
+++ 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveConstantBinaryOps.java
@@ -26,7 +26,6 @@ import org.apache.sysml.hops.BinaryOp;
 import org.apache.sysml.hops.DataGenOp;
 import org.apache.sysml.hops.DataOp;
 import org.apache.sysml.hops.Hop;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.LiteralOp;
 import org.apache.sysml.hops.Hop.DataGenMethod;
 import org.apache.sysml.hops.Hop.DataOpTypes;
@@ -57,9 +56,7 @@ public class IPAPassRemoveConstantBinaryOps extends IPAPass
        }
        
        @Override
-       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
-       {
+       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) {
                //approach: scan over top-level program (guaranteed to be 
unconditional),
                //collect ones=matrix(1,...); remove b(*)ones if not outer 
operation
                HashMap<String, Hop> mOnes = new HashMap<>();
@@ -99,9 +96,7 @@ public class IPAPassRemoveConstantBinaryOps extends IPAPass
                        }
        }
        
-       private static void rRemoveConstantBinaryOp(StatementBlock sb, 
HashMap<String,Hop> mOnes) 
-               throws HopsException
-       {
+       private static void rRemoveConstantBinaryOp(StatementBlock sb, 
HashMap<String,Hop> mOnes) {
                if( sb instanceof IfStatementBlock )
                {
                        IfStatementBlock isb = (IfStatementBlock) sb;

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnnecessaryCheckpoints.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnnecessaryCheckpoints.java
 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnnecessaryCheckpoints.java
index 07d694e..498db64 100644
--- 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnnecessaryCheckpoints.java
+++ 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnnecessaryCheckpoints.java
@@ -28,7 +28,6 @@ import java.util.Set;
 import org.apache.sysml.hops.AggUnaryOp;
 import org.apache.sysml.hops.DataOp;
 import org.apache.sysml.hops.Hop;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.hops.UnaryOp;
 import org.apache.sysml.hops.Hop.DataOpTypes;
@@ -56,9 +55,7 @@ public class IPAPassRemoveUnnecessaryCheckpoints extends 
IPAPass
        }
        
        @Override
-       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
-       {
+       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) {
                //remove unnecessary checkpoint before update 
                removeCheckpointBeforeUpdate(prog);
                
@@ -69,9 +66,7 @@ public class IPAPassRemoveUnnecessaryCheckpoints extends 
IPAPass
                removeCheckpointReadWrite(prog);
        }
        
-       private static void removeCheckpointBeforeUpdate(DMLProgram dmlp) 
-               throws HopsException
-       {
+       private static void removeCheckpointBeforeUpdate(DMLProgram dmlp) {
                //approach: scan over top-level program (guaranteed to be 
unconditional),
                //collect checkpoints; determine if used before update; remove 
first checkpoint
                //on second checkpoint if update in between and not used before 
update
@@ -138,9 +133,7 @@ public class IPAPassRemoveUnnecessaryCheckpoints extends 
IPAPass
                }
        }
 
-       private static void moveCheckpointAfterUpdate(DMLProgram dmlp) 
-               throws HopsException
-       {
+       private static void moveCheckpointAfterUpdate(DMLProgram dmlp) {
                //approach: scan over top-level program (guaranteed to be 
unconditional),
                //collect checkpoints; determine if used before update; move 
first checkpoint
                //after update if not used before update (best effort move 
which often avoids
@@ -210,9 +203,7 @@ public class IPAPassRemoveUnnecessaryCheckpoints extends 
IPAPass
                }
        }
        
-       private static void removeCheckpointReadWrite(DMLProgram dmlp) 
-               throws HopsException
-       {
+       private static void removeCheckpointReadWrite(DMLProgram dmlp) {
                List<StatementBlock> sbs = dmlp.getStatementBlocks();
 
                if (sbs.size() == 1 && !(sbs.get(0) instanceof IfStatementBlock

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnusedFunctions.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnusedFunctions.java 
b/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnusedFunctions.java
index a4c112c..1420ca6 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnusedFunctions.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/IPAPassRemoveUnusedFunctions.java
@@ -44,9 +44,7 @@ public class IPAPassRemoveUnusedFunctions extends IPAPass
        }
        
        @Override
-       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
-       {
+       public void rewriteProgram( DMLProgram prog, FunctionCallGraph fgraph, 
FunctionCallSizeInfo fcallSizes ) {
                try {
                        Set<String> fnamespaces = prog.getNamespaces().keySet();
                        for( String fnspace : fnamespaces  ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/ipa/InterProceduralAnalysis.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/ipa/InterProceduralAnalysis.java 
b/src/main/java/org/apache/sysml/hops/ipa/InterProceduralAnalysis.java
index 0a182cc..553fbb6 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/InterProceduralAnalysis.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/InterProceduralAnalysis.java
@@ -48,7 +48,6 @@ import org.apache.sysml.parser.FunctionStatement;
 import org.apache.sysml.parser.FunctionStatementBlock;
 import org.apache.sysml.parser.IfStatement;
 import org.apache.sysml.parser.IfStatementBlock;
-import org.apache.sysml.parser.ParseException;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatement;
 import org.apache.sysml.parser.WhileStatementBlock;
@@ -153,9 +152,8 @@ public class InterProceduralAnalysis
        /**
         * Main interface to perform IPA over a given DML program.
         * 
-        * @throws HopsException in case of compilation errors
         */
-       public void analyzeProgram() throws HopsException {
+       public void analyzeProgram() {
                analyzeProgram(1); //single run
        }
        
@@ -163,11 +161,8 @@ public class InterProceduralAnalysis
         * Main interface to perform IPA over a given DML program.
         * 
         * @param repetitions number of IPA rounds 
-        * @throws HopsException in case of compilation errors
         */
-       public void analyzeProgram(int repetitions) 
-               throws HopsException
-       {
+       public void analyzeProgram(int repetitions) {
                //sanity check for valid number of repetitions
                if( repetitions <= 0 )
                        throw new HopsException("Invalid number of IPA 
repetitions: " + repetitions);
@@ -221,9 +216,7 @@ public class InterProceduralAnalysis
                        rmFuns.rewriteProgram(_prog, graph2, null);
        }
        
-       public Set<String> analyzeSubProgram() 
-               throws HopsException, ParseException
-       {
+       public Set<String> analyzeSubProgram() {
                DMLTranslator.resetHopsDAGVisitStatus(_sb);
                
                //get function call size infos to obtain candidates for 
statistics propagation
@@ -239,9 +232,7 @@ public class InterProceduralAnalysis
                return fcallSizes.getValidFunctions();
        }
        
-       private boolean isUnarySizePreservingFunction(FunctionStatementBlock 
fsb) 
-               throws HopsException 
-       {
+       private boolean isUnarySizePreservingFunction(FunctionStatementBlock 
fsb) {
                FunctionStatement fstmt = (FunctionStatement) 
fsb.getStatement(0);
                
                //check unary functions over matrices
@@ -282,7 +273,6 @@ public class InterProceduralAnalysis
        //////  
 
        private void propagateStatisticsAcrossBlock( StatementBlock sb, 
LocalVariableMap callVars, FunctionCallSizeInfo fcallSizes, Set<String> fnStack 
)
-               throws HopsException
        {
                if (sb instanceof FunctionStatementBlock)
                {
@@ -380,11 +370,8 @@ public class InterProceduralAnalysis
         *
         * @param roots  List of HOPs.
         * @param vars  Map of variables eligible for propagation.
-        * @throws HopsException  If a HopsException occurs.
         */
-       private static void propagateScalarsAcrossDAG(ArrayList<Hop> roots, 
LocalVariableMap vars)
-               throws HopsException
-       {
+       private static void propagateScalarsAcrossDAG(ArrayList<Hop> roots, 
LocalVariableMap vars) {
                for (Hop hop : roots) {
                        try {
                                Recompiler.rReplaceLiterals(hop, vars, true);
@@ -394,9 +381,7 @@ public class InterProceduralAnalysis
                }
        }
 
-       private static void propagateStatisticsAcrossPredicateDAG( Hop root, 
LocalVariableMap vars ) 
-               throws HopsException
-       {
+       private static void propagateStatisticsAcrossPredicateDAG( Hop root, 
LocalVariableMap vars ) {
                if( root == null )
                        return;
                
@@ -417,11 +402,8 @@ public class InterProceduralAnalysis
         *
         * @param roots  List of HOP DAG root nodes.
         * @param vars  Map of variables eligible for propagation.
-        * @throws HopsException  If a HopsException occurs.
         */
-       private static void propagateStatisticsAcrossDAG( ArrayList<Hop> roots, 
LocalVariableMap vars )
-               throws HopsException
-       {
+       private static void propagateStatisticsAcrossDAG( ArrayList<Hop> roots, 
LocalVariableMap vars ) {
                if( roots == null )
                        return;
                
@@ -452,11 +434,8 @@ public class InterProceduralAnalysis
         * @param callVars  Calling program's map of variables eligible for 
propagation.
         * @param fcallSizes function call summary
         * @param fnStack  Function stack to determine current scope.
-        * @throws HopsException  If a HopsException occurs.
         */
-       private void propagateStatisticsIntoFunctions(DMLProgram prog, 
ArrayList<Hop> roots, LocalVariableMap callVars, FunctionCallSizeInfo 
fcallSizes, Set<String> fnStack)
-                       throws HopsException
-       {
+       private void propagateStatisticsIntoFunctions(DMLProgram prog, 
ArrayList<Hop> roots, LocalVariableMap callVars, FunctionCallSizeInfo 
fcallSizes, Set<String> fnStack) {
                for( Hop root : roots )
                        propagateStatisticsIntoFunctions(prog, root, callVars, 
fcallSizes, fnStack);
        }
@@ -470,10 +449,8 @@ public class InterProceduralAnalysis
         * @param callVars  Calling program's map of variables eligible for 
propagation.
         * @param fcallSizes function call summary
         * @param fnStack  Function stack to determine current scope.
-        * @throws HopsException  If a HopsException occurs.
         */
        private void propagateStatisticsIntoFunctions(DMLProgram prog, Hop hop, 
LocalVariableMap callVars, FunctionCallSizeInfo fcallSizes, Set<String> fnStack 
) 
-               throws HopsException
        {
                if( hop.isVisited() )
                        return;
@@ -535,7 +512,6 @@ public class InterProceduralAnalysis
        }
        
        private static void populateLocalVariableMapForFunctionCall( 
FunctionStatement fstmt, FunctionOp fop, LocalVariableMap callvars, 
LocalVariableMap vars, FunctionCallSizeInfo fcallSizes ) 
-               throws HopsException
        {
                ArrayList<DataIdentifier> inputVars = fstmt.getInputParams();
                ArrayList<Hop> inputOps = fop.getInput();
@@ -592,11 +568,8 @@ public class InterProceduralAnalysis
         * @param callVars  Calling program's map of variables.
         * @param overwrite  Whether or not to overwrite variables in the
         *                      calling program's variable map.
-        * @throws HopsException  If a HopsException occurs.
         */
-       private static void extractFunctionCallReturnStatistics( 
FunctionStatement fstmt, FunctionOp fop, LocalVariableMap tmpVars, 
LocalVariableMap callVars, boolean overwrite ) 
-               throws HopsException
-       {
+       private static void extractFunctionCallReturnStatistics( 
FunctionStatement fstmt, FunctionOp fop, LocalVariableMap tmpVars, 
LocalVariableMap callVars, boolean overwrite ) {
                ArrayList<DataIdentifier> foutputOps = fstmt.getOutputParams();
                String[] outputVars = fop.getOutputVariableNames();
                String fkey = fop.getFunctionKey();
@@ -659,7 +632,6 @@ public class InterProceduralAnalysis
        }
        
        private static void extractFunctionCallUnknownReturnStatistics( 
FunctionStatement fstmt, FunctionOp fop, LocalVariableMap callVars ) 
-               throws HopsException
        {
                ArrayList<DataIdentifier> foutputOps = fstmt.getOutputParams();
                String[] outputVars = fop.getOutputVariableNames();
@@ -686,7 +658,6 @@ public class InterProceduralAnalysis
        }
        
        private static void extractFunctionCallEquivalentReturnStatistics( 
FunctionStatement fstmt, FunctionOp fop, LocalVariableMap callVars ) 
-               throws HopsException
        {
                try {
                        Hop input = fop.getInput().get(0);
@@ -700,7 +671,6 @@ public class InterProceduralAnalysis
        }
        
        private static void extractExternalFunctionCallReturnStatistics( 
ExternalFunctionStatement fstmt, FunctionOp fop, LocalVariableMap callVars ) 
-               throws HopsException
        {
                String className = 
fstmt.getOtherParams().get(ExternalFunctionStatement.CLASS_NAME);
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/recompile/LiteralReplacement.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/recompile/LiteralReplacement.java 
b/src/main/java/org/apache/sysml/hops/recompile/LiteralReplacement.java
index 6c38740..de04ed9 100644
--- a/src/main/java/org/apache/sysml/hops/recompile/LiteralReplacement.java
+++ b/src/main/java/org/apache/sysml/hops/recompile/LiteralReplacement.java
@@ -50,8 +50,7 @@ public class LiteralReplacement
        private static final long REPLACE_LITERALS_MAX_MATRIX_SIZE = 1000000; 
//10^6 cells (8MB)
        private static final boolean REPORT_LITERAL_REPLACE_OPS_STATS = true;   
        
-       protected static void rReplaceLiterals( Hop hop, LocalVariableMap vars, 
boolean scalarsOnly ) 
-               throws DMLRuntimeException
+       protected static void rReplaceLiterals( Hop hop, LocalVariableMap vars, 
boolean scalarsOnly )
        {
                if( hop.isVisited() )
                        return;
@@ -172,8 +171,7 @@ public class LiteralReplacement
                return ret;
        }
        
-       private static LiteralOp replaceLiteralValueTypeCastLiteral( Hop c, 
LocalVariableMap vars ) 
-               throws DMLRuntimeException
+       private static LiteralOp replaceLiteralValueTypeCastLiteral( Hop c, 
LocalVariableMap vars )
        {
                LiteralOp ret = null;
                
@@ -212,8 +210,7 @@ public class LiteralReplacement
                return ret;
        }
        
-       private static LiteralOp replaceLiteralDataTypeCastMatrixRead( Hop c, 
LocalVariableMap vars ) 
-               throws DMLRuntimeException
+       private static LiteralOp replaceLiteralDataTypeCastMatrixRead( Hop c, 
LocalVariableMap vars )
        {
                LiteralOp ret = null;
                
@@ -242,7 +239,6 @@ public class LiteralReplacement
        }
        
        private static LiteralOp replaceLiteralValueTypeCastRightIndexing( Hop 
c, LocalVariableMap vars ) 
-               throws DMLRuntimeException
        {
                LiteralOp ret = null;
                
@@ -284,8 +280,7 @@ public class LiteralReplacement
                return ret;
        }
 
-       private static LiteralOp replaceLiteralFullUnaryAggregate( Hop c, 
LocalVariableMap vars ) 
-               throws DMLRuntimeException
+       private static LiteralOp replaceLiteralFullUnaryAggregate( Hop c, 
LocalVariableMap vars )
        {
                LiteralOp ret = null;
                
@@ -314,8 +309,7 @@ public class LiteralReplacement
                return ret;
        }
        
-       private static LiteralOp replaceLiteralFullUnaryAggregateRightIndexing( 
Hop c, LocalVariableMap vars ) 
-               throws DMLRuntimeException
+       private static LiteralOp replaceLiteralFullUnaryAggregateRightIndexing( 
Hop c, LocalVariableMap vars )
        {
                LiteralOp ret = null;
                
@@ -374,8 +368,7 @@ public class LiteralReplacement
                                   && h.getInput().get(0) instanceof DataOp && 
vars.keySet().contains(h.getInput().get(0).getName())) );
        }
        
-       private static long getIntValueDataLiteral(Hop hop, LocalVariableMap 
vars) 
-               throws DMLRuntimeException
+       private static long getIntValueDataLiteral(Hop hop, LocalVariableMap 
vars)
        {
                long value = -1;
                
@@ -425,8 +418,7 @@ public class LiteralReplacement
                return cdir && cop;
        }
        
-       private static double replaceUnaryAggregate( AggUnaryOp auop, 
MatrixBlock mb ) 
-               throws DMLRuntimeException
+       private static double replaceUnaryAggregate( AggUnaryOp auop, 
MatrixBlock mb )
        {
                //setup stats reporting if necessary
                boolean REPORT_STATS = (DMLScript.STATISTICS && 
REPORT_LITERAL_REPLACE_OPS_STATS); 

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java 
b/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
index ca9546f..e10e006 100644
--- a/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
+++ b/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
@@ -60,7 +60,6 @@ import org.apache.sysml.lops.CSVReBlock;
 import org.apache.sysml.lops.DataGen;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.lops.ReBlock;
 import org.apache.sysml.lops.compile.Dag;
 import org.apache.sysml.parser.DMLProgram;
@@ -153,7 +152,6 @@ public class Recompiler
        
        public static ArrayList<Instruction> recompileHopsDag( StatementBlock 
sb, ArrayList<Hop> hops, 
                        LocalVariableMap vars, RecompileStatus status, boolean 
inplace, boolean replaceLit, long tid ) 
-               throws DMLRuntimeException, HopsException, LopsException
        {
                ArrayList<Instruction> newInst = null;
 
@@ -180,7 +178,6 @@ public class Recompiler
        
        public static ArrayList<Instruction> recompileHopsDag( Hop hop, 
LocalVariableMap vars, 
                        RecompileStatus status, boolean inplace, boolean 
replaceLit, long tid ) 
-               throws DMLRuntimeException, HopsException, LopsException
        {
                ArrayList<Instruction> newInst = null;
 
@@ -202,7 +199,6 @@ public class Recompiler
        }
        
        public static ArrayList<Instruction> recompileHopsDag2Forced( 
StatementBlock sb, ArrayList<Hop> hops, long tid, ExecType et )
-               throws DMLRuntimeException, HopsException, LopsException
        {
                ArrayList<Instruction> newInst = null;
                
@@ -225,7 +221,6 @@ public class Recompiler
        }
        
        public static ArrayList<Instruction> recompileHopsDag2Forced( Hop hop, 
long tid, ExecType et ) 
-               throws DMLRuntimeException, HopsException, LopsException
        {
                ArrayList<Instruction> newInst = null;
 
@@ -248,7 +243,6 @@ public class Recompiler
        }
 
        public static ArrayList<Instruction> recompileHopsDagInstructions( 
StatementBlock sb, ArrayList<Hop> hops ) 
-               throws DMLRuntimeException, HopsException, LopsException
        {
                ArrayList<Instruction> newInst = null;
 
@@ -267,7 +261,6 @@ public class Recompiler
        }
 
        public static ArrayList<Instruction> recompileHopsDagInstructions( Hop 
hop )
-               throws DMLRuntimeException, HopsException, LopsException
        {
                ArrayList<Instruction> newInst = null;
 
@@ -301,13 +294,9 @@ public class Recompiler
         * @param et given execution type
         * @param tid thread id, 0 for main or before worker creation
         * @return modified list of instructions
-        * @throws HopsException if hop compile error
-        * @throws LopsException if lop compile error
-        * @throws DMLRuntimeException if runtime error on literal replacement
         */
        private static ArrayList<Instruction> recompile(StatementBlock sb, 
ArrayList<Hop> hops, LocalVariableMap vars, RecompileStatus status,
                boolean inplace, boolean replaceLit, boolean updateStats, 
boolean forceEt, boolean pred, ExecType et, long tid ) 
-                       throws HopsException, LopsException, DMLRuntimeException
        {
                // prepare hops dag for recompile
                if( !inplace ){ 
@@ -476,13 +465,10 @@ public class Recompiler
         * and better performance for recompiling individual program blocks.  
         * 
         * @param pb program block
-        * @throws HopsException if HopsException occurs
-        * @throws LopsException if LopsException occurs
-        * @throws DMLRuntimeException if DMLRuntimeException occurs
         * @throws IOException if IOException occurs
         */
        public static void recompileProgramBlockInstructions(ProgramBlock pb) 
-               throws HopsException, LopsException, DMLRuntimeException, 
IOException
+               throws IOException
        {
                if( pb instanceof WhileProgramBlock )
                {
@@ -547,10 +533,8 @@ public class Recompiler
         * 
         * @param hops list of high-level operators
         * @return list of high-level operators
-        * @throws HopsException if HopsException occurs
         */
        public static ArrayList<Hop> deepCopyHopsDag( List<Hop> hops )
-               throws HopsException 
        {
                ArrayList<Hop> ret = new ArrayList<>(hops.size());
                
@@ -573,11 +557,8 @@ public class Recompiler
         * 
         * @param hops high-level operator
         * @return high-level operator
-        * @throws HopsException if HopsException occurs
         */
-       public static Hop deepCopyHopsDag( Hop hops )
-               throws HopsException 
-       {
+       public static Hop deepCopyHopsDag( Hop hops ) {
                Hop ret = null;
                
                try {
@@ -646,7 +627,6 @@ public class Recompiler
        
        private static void rRecompileProgramBlock( ProgramBlock pb, 
LocalVariableMap vars, 
                RecompileStatus status, long tid, ResetType resetRecompile ) 
-               throws HopsException, DMLRuntimeException, LopsException, 
IOException
        {
                if (pb instanceof WhileProgramBlock)
                {
@@ -968,7 +948,6 @@ public class Recompiler
        //helper functions for predicate recompile
        
        private static void recompileIfPredicate( IfProgramBlock ipb, 
IfStatementBlock isb, LocalVariableMap vars, RecompileStatus status, long tid, 
ResetType resetRecompile ) 
-               throws DMLRuntimeException, HopsException, LopsException, 
IOException
        {
                if( isb == null )
                        return;
@@ -986,9 +965,7 @@ public class Recompiler
                }
        }
        
-       private static void recompileWhilePredicate( WhileProgramBlock wpb, 
WhileStatementBlock wsb, LocalVariableMap vars, RecompileStatus status, long 
tid, ResetType resetRecompile ) 
-               throws DMLRuntimeException, HopsException, LopsException, 
IOException
-       {
+       private static void recompileWhilePredicate( WhileProgramBlock wpb, 
WhileStatementBlock wsb, LocalVariableMap vars, RecompileStatus status, long 
tid, ResetType resetRecompile ) {
                if( wsb == null )
                        return;
                
@@ -1005,9 +982,7 @@ public class Recompiler
                }
        }
        
-       private static void recompileForPredicates( ForProgramBlock fpb, 
ForStatementBlock fsb, LocalVariableMap vars, RecompileStatus status, long tid, 
ResetType resetRecompile ) 
-               throws DMLRuntimeException, HopsException, LopsException, 
IOException
-       {
+       private static void recompileForPredicates( ForProgramBlock fpb, 
ForStatementBlock fsb, LocalVariableMap vars, RecompileStatus status, long tid, 
ResetType resetRecompile ) {
                if( fsb != null )
                {
                        Hop fromHops = fsb.getFromHops();
@@ -1059,9 +1034,7 @@ public class Recompiler
                }
        }
        
-       private static void rRecompileProgramBlock2Forced( ProgramBlock pb, 
long tid, HashSet<String> fnStack, ExecType et ) 
-               throws HopsException, DMLRuntimeException, LopsException, 
IOException
-       {
+       private static void rRecompileProgramBlock2Forced( ProgramBlock pb, 
long tid, HashSet<String> fnStack, ExecType et ) {
                if (pb instanceof WhileProgramBlock)
                {
                        WhileProgramBlock pbTmp = (WhileProgramBlock)pb;
@@ -1326,7 +1299,6 @@ public class Recompiler
        }
        
        public static void rUpdateStatistics( Hop hop, LocalVariableMap vars ) 
-               throws DMLRuntimeException
        {
                if( hop.isVisited() )
                        return;
@@ -1463,10 +1435,8 @@ public class Recompiler
         * @param vars local variable map
         * @param scalarsOnly if true, replace only scalar variables but no 
matrix operations;
         *            if false, apply full literal replacement
-        * @throws DMLRuntimeException if DMLRuntimeException occurs
         */
-       public static void rReplaceLiterals( Hop hop, LocalVariableMap vars, 
boolean scalarsOnly ) 
-               throws DMLRuntimeException
+       public static void rReplaceLiterals( Hop hop, LocalVariableMap vars, 
boolean scalarsOnly )
        {
                //public interface 
                LiteralReplacement.rReplaceLiterals(hop, vars, scalarsOnly);
@@ -1496,11 +1466,10 @@ public class Recompiler
         * @param inputs the inputs
         * @return return true if and only if all instructions are reblock 
instructions and all
         * individual reblock oeprations fir in the current memory budget.
-        * @throws DMLRuntimeException if DMLRuntimeException occurs
         * @throws IOException if IOException occurs
         */
        public static boolean checkCPReblock(MRJobInstruction inst, 
MatrixObject[] inputs) 
-               throws DMLRuntimeException, IOException 
+               throws IOException 
        {
                boolean ret = true;
                
@@ -1622,10 +1591,8 @@ public class Recompiler
         * @param ec execution context
         * @param varin variable
         * @return true if CP reblock?
-        * @throws DMLRuntimeException if DMLRuntimeException occurs
         */
        public static boolean checkCPReblock(ExecutionContext ec, String varin) 
-               throws DMLRuntimeException
        {
                CacheableData<?> obj = ec.getCacheableData(varin);
                MatrixCharacteristics mc = ec.getMatrixCharacteristics(varin);
@@ -1682,7 +1649,6 @@ public class Recompiler
        }
        
        public static boolean checkCPDataGen( MRJobInstruction inst, String 
updatedRandInst ) 
-               throws DMLRuntimeException 
        {
                boolean ret = true;
                
@@ -1748,9 +1714,7 @@ public class Recompiler
                return ret;
        }
        
-       public static void executeInMemoryMatrixReblock(ExecutionContext ec, 
String varin, String varout) 
-               throws DMLRuntimeException
-       {
+       public static void executeInMemoryMatrixReblock(ExecutionContext ec, 
String varin, String varout) {
                MatrixObject in = ec.getMatrixObject(varin);
                MatrixObject out = ec.getMatrixObject(varout);
 
@@ -1761,11 +1725,10 @@ public class Recompiler
                //set output (incl update matrix characteristics)
                out.acquireModify( mb );
                out.release();
-               in.release();                           
+               in.release();
        }
        
        public static void executeInMemoryFrameReblock(ExecutionContext ec, 
String varin, String varout) 
-               throws DMLRuntimeException
        {
                FrameObject in = ec.getFrameObject(varin);
                FrameObject out = ec.getFrameObject(varout);
@@ -1777,11 +1740,10 @@ public class Recompiler
                //set output (incl update matrix characteristics)
                out.acquireModify( fb );
                out.release();
-               in.release();                           
+               in.release();
        }
        
        private static void tryReadMetaDataFileMatrixCharacteristics( DataOp 
dop )
-               throws DMLRuntimeException
        {
                try
                {
@@ -1808,8 +1770,7 @@ public class Recompiler
                                }
                        }
                }
-               catch(Exception ex)
-               {
+               catch(Exception ex) {
                        throw new DMLRuntimeException(ex);
                }
        }

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/rewrite/HopDagValidator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/rewrite/HopDagValidator.java 
b/src/main/java/org/apache/sysml/hops/rewrite/HopDagValidator.java
index ce4648a..64c63aa 100644
--- a/src/main/java/org/apache/sysml/hops/rewrite/HopDagValidator.java
+++ b/src/main/java/org/apache/sysml/hops/rewrite/HopDagValidator.java
@@ -47,7 +47,6 @@ public class HopDagValidator {
        private HopDagValidator() {}
        
        public static void validateHopDag(ArrayList<Hop> roots, HopRewriteRule 
rule) 
-               throws HopsException 
        {
                if( roots == null )
                        return;
@@ -67,7 +66,6 @@ public class HopDagValidator {
        }
        
        public static void validateHopDag(Hop root, HopRewriteRule rule) 
-               throws HopsException 
        {
                if( root == null )
                        return;
@@ -89,7 +87,7 @@ public class HopDagValidator {
                final Set<Long> seen = new HashSet<>();
        }
        
-       private static void rValidateHop(final Hop hop, final ValidatorState 
state) throws HopsException {
+       private static void rValidateHop(final Hop hop, final ValidatorState 
state) {
                final long id = hop.getHopID();
 
                //check visit status

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteRule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteRule.java 
b/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteRule.java
index 04d6a79..0c739cf 100644
--- a/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteRule.java
+++ b/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteRule.java
@@ -25,7 +25,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.sysml.hops.Hop;
-import org.apache.sysml.hops.HopsException;
 
 /**
  * Base class for all hop rewrites in order to enable generic
@@ -34,8 +33,6 @@ import org.apache.sysml.hops.HopsException;
  */
 public abstract class HopRewriteRule 
 {
-
-
        protected static final Log LOG = 
LogFactory.getLog(HopRewriteRule.class.getName());
                
        /**
@@ -44,10 +41,8 @@ public abstract class HopRewriteRule
         * @param roots high-level operator roots
         * @param state program rewrite status
         * @return list of high-level operators
-        * @throws HopsException if HopsException occurs
         */
-       public abstract ArrayList<Hop> rewriteHopDAGs( ArrayList<Hop> roots, 
ProgramRewriteStatus state ) 
-               throws HopsException;
+       public abstract ArrayList<Hop> rewriteHopDAGs( ArrayList<Hop> roots, 
ProgramRewriteStatus state );
        
        /**
         * Handle a predicate hop DAG with exactly one root.
@@ -55,8 +50,6 @@ public abstract class HopRewriteRule
         * @param root high-level operator root
         * @param state program rewrite status
         * @return high-level operator
-        * @throws HopsException if HopsException occurs
         */
-       public abstract Hop rewriteHopDAG( Hop root, ProgramRewriteStatus state 
) 
-               throws HopsException;
+       public abstract Hop rewriteHopDAG( Hop root, ProgramRewriteStatus state 
);
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java 
b/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java
index abb1c7d..c490bbf 100644
--- a/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java
+++ b/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java
@@ -85,9 +85,7 @@ public class HopRewriteUtils
        //////////////////////////////////
        // literal handling
 
-       public static boolean getBooleanValue( LiteralOp op )
-               throws HopsException
-       {
+       public static boolean getBooleanValue( LiteralOp op ) {
                switch( op.getValueType() )
                {
                        case DOUBLE:  return op.getDoubleValue() != 0; 
@@ -118,37 +116,22 @@ public class HopRewriteUtils
                return false;
        }
 
-       public static double getDoubleValue( LiteralOp op )
-               throws HopsException
-       {
-               switch( op.getValueType() )
-               {
+       public static double getDoubleValue( LiteralOp op ) {
+               switch( op.getValueType() ) {
                        case DOUBLE:  return op.getDoubleValue(); 
                        case INT:         return op.getLongValue();
                        case BOOLEAN: return op.getBooleanValue() ? 1 : 0;
-                       
                        default: throw new HopsException("Invalid double value: 
"+op.getValueType());
                }
        }
        
-       public static double getDoubleValueSafe( LiteralOp op )
-       {
-               try
-               {
-                       switch( op.getValueType() )
-                       {
-                               case DOUBLE:  return op.getDoubleValue(); 
-                               case INT:         return op.getLongValue();
-                               case BOOLEAN: return op.getBooleanValue() ? 1 : 
0;
-                               
-                               default: throw new HopsException("Invalid 
double value: "+op.getValueType());
-                       }
-               }
-               catch(Exception ex){
-                       //silently ignore error
+       public static double getDoubleValueSafe( LiteralOp op ) {
+               switch( op.getValueType() ) {
+                       case DOUBLE:  return op.getDoubleValue(); 
+                       case INT:         return op.getLongValue();
+                       case BOOLEAN: return op.getBooleanValue() ? 1 : 0;
+                       default: return Double.MAX_VALUE;
                }
-               
-               return Double.MAX_VALUE;
        }
        
        /**
@@ -159,40 +142,24 @@ public class HopRewriteUtils
         * Otherwise, a safer alternative is `getDoubleValue`.
         * 
         * @param op literal operator
-        * @return long value of literator op
-        * @throws HopsException if HopsException occurs
+        * @return long value of literal op
         */
-       public static long getIntValue( LiteralOp op )
-               throws HopsException
-       {
-               switch( op.getValueType() )
-               {
+       public static long getIntValue( LiteralOp op ) {
+               switch( op.getValueType() ) {
                        case DOUBLE:  return 
UtilFunctions.toLong(op.getDoubleValue()); 
                        case INT:         return op.getLongValue();
                        case BOOLEAN: return op.getBooleanValue() ? 1 : 0;
-                       
                        default: throw new HopsException("Invalid int value: 
"+op.getValueType());
                }
        }
        
-       public static long getIntValueSafe( LiteralOp op )
-       {
-               try
-               {
-                       switch( op.getValueType() )
-                       {
-                               case DOUBLE:  return 
UtilFunctions.toLong(op.getDoubleValue()); 
-                               case INT:         return op.getLongValue();
-                               case BOOLEAN: return op.getBooleanValue() ? 1 : 
0;
-                               default:
-                                       throw new RuntimeException("Invalid int 
value: "+op.getValueType());
-                       }
-               }
-               catch(Exception ex){
-                       //silently ignore error
+       public static long getIntValueSafe( LiteralOp op ) {
+               switch( op.getValueType() ) {
+                       case DOUBLE:  return 
UtilFunctions.toLong(op.getDoubleValue()); 
+                       case INT:         return op.getLongValue();
+                       case BOOLEAN: return op.getBooleanValue() ? 1 : 0;
+                       default: return Long.MAX_VALUE;
                }
-               
-               return Long.MAX_VALUE;
        }
        
        public static boolean isLiteralOfValue( Hop hop, double val ) {
@@ -320,8 +287,7 @@ public class HopRewriteUtils
        }
        
        public static Hop createDataGenOp( Hop input, double value ) 
-               throws HopsException
-       {               
+       {
                Hop rows = input.rowsKnown() ? new LiteralOp(input.getDim1()) : 
                        new UnaryOp("tmprows", DataType.SCALAR, ValueType.INT, 
OpOp1.NROW, input);
                Hop cols = input.colsKnown() ? new LiteralOp(input.getDim2()) :
@@ -356,11 +322,9 @@ public class HopRewriteUtils
         * @param scale the scale
         * @param shift the shift
         * @return data gen op
-        * @throws HopsException if HopsException occurs
         */
        public static DataGenOp copyDataGenOp( DataGenOp inputGen, double 
scale, double shift ) 
-               throws HopsException
-       {               
+       {
                HashMap<String, Integer> params = inputGen.getParamIndexMap();
                Hop rows = 
inputGen.getInput().get(params.get(DataExpression.RAND_ROWS));
                Hop cols = 
inputGen.getInput().get(params.get(DataExpression.RAND_COLS));
@@ -406,8 +370,7 @@ public class HopRewriteUtils
        }
        
        public static Hop createDataGenOp( Hop rowInput, Hop colInput, double 
value ) 
-               throws HopsException
-       {               
+       {
                Hop rows = rowInput.rowsKnown() ? new 
LiteralOp(rowInput.getDim1()) : 
                        new UnaryOp("tmprows", DataType.SCALAR, ValueType.INT, 
OpOp1.NROW, rowInput);
                Hop cols = colInput.colsKnown() ? new 
LiteralOp(colInput.getDim2()) :
@@ -436,8 +399,7 @@ public class HopRewriteUtils
        }
        
        public static Hop createDataGenOp( Hop rowInput, boolean tRowInput, Hop 
colInput, boolean tColInput, double value ) 
-               throws HopsException
-       {               
+       {
                long nrow = tRowInput ? rowInput.getDim2() : rowInput.getDim1();
                long ncol = tColInput ? colInput.getDim1() : rowInput.getDim2();
                
@@ -469,8 +431,7 @@ public class HopRewriteUtils
        }
        
        public static Hop createDataGenOpByVal( Hop rowInput, Hop colInput, 
double value ) 
-               throws HopsException
-       {               
+       {
                Hop val = new LiteralOp(value);
                
                HashMap<String, Hop> params = new HashMap<>();
@@ -495,7 +456,6 @@ public class HopRewriteUtils
        }
        
        public static Hop createDataGenOpByVal( ArrayList<LiteralOp> values, 
long rows, long cols ) 
-               throws HopsException
        {
                StringBuilder sb = new StringBuilder();
                for(LiteralOp lit : values) {
@@ -663,7 +623,7 @@ public class HopRewriteUtils
                return ix;
        }
        
-       public static NaryOp createNary(OpOpN op, Hop... inputs) throws 
HopsException {
+       public static NaryOp createNary(OpOpN op, Hop... inputs) {
                Hop mainInput = inputs[0];
                NaryOp nop = new NaryOp(mainInput.getName(), 
mainInput.getDataType(),
                        mainInput.getValueType(), op, inputs);
@@ -673,9 +633,7 @@ public class HopRewriteUtils
                return nop;
        }
        
-       public static Hop createValueHop( Hop hop, boolean row ) 
-               throws HopsException
-       {
+       public static Hop createValueHop( Hop hop, boolean row ) {
                Hop ret = null;
                if( row ){
                        ret = hop.rowsKnown() ? new LiteralOp(hop.getDim1()) : 
@@ -690,15 +648,11 @@ public class HopRewriteUtils
        }
        
 
-       public static DataGenOp createSeqDataGenOp( Hop input ) 
-               throws HopsException
-       {
+       public static DataGenOp createSeqDataGenOp( Hop input ) {
                return createSeqDataGenOp(input, true);
        }
        
-       public static DataGenOp createSeqDataGenOp( Hop input, boolean asc ) 
-               throws HopsException
-       {               
+       public static DataGenOp createSeqDataGenOp( Hop input, boolean asc ) {
                Hop to = input.rowsKnown() ? new LiteralOp(input.getDim1()) : 
                        new UnaryOp("tmprows", DataType.SCALAR, ValueType.INT, 
OpOp1.NROW, input);
                
@@ -858,7 +812,6 @@ public class HopRewriteUtils
        }
        
        public static boolean isEqualValue( LiteralOp hop1, LiteralOp hop2 ) 
-               throws HopsException
        {
                //check for string (no defined double value)
                if(    hop1.getValueType()==ValueType.STRING 
@@ -1187,15 +1140,12 @@ public class HopRewriteUtils
                return ret;
        }
 
-       public static Hop getBasic1NSequenceMax(Hop hop) 
-               throws HopsException
-       {
+       public static Hop getBasic1NSequenceMax(Hop hop) {
                if( isDataGenOp(hop, DataGenMethod.SEQ) ) {
                        DataGenOp dgop = (DataGenOp) hop;
                        return dgop.getInput()
                                .get(dgop.getParamIndex(Statement.SEQ_TO));
                }
-               
                throw new HopsException("Failed to retrieve 'to' argument from 
basic 1-N sequence.");
        }
        

http://git-wip-us.apache.org/repos/asf/systemml/blob/215a1cc6/src/main/java/org/apache/sysml/hops/rewrite/ProgramRewriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/rewrite/ProgramRewriter.java 
b/src/main/java/org/apache/sysml/hops/rewrite/ProgramRewriter.java
index 65687e3..eb7d23c 100644
--- a/src/main/java/org/apache/sysml/hops/rewrite/ProgramRewriter.java
+++ b/src/main/java/org/apache/sysml/hops/rewrite/ProgramRewriter.java
@@ -27,7 +27,6 @@ import org.apache.log4j.Logger;
 import org.apache.sysml.conf.CompilerConfig.ConfigType;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.hops.Hop;
-import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.parser.DMLProgram;
 import org.apache.sysml.parser.ForStatement;
@@ -36,7 +35,6 @@ import org.apache.sysml.parser.FunctionStatement;
 import org.apache.sysml.parser.FunctionStatementBlock;
 import org.apache.sysml.parser.IfStatement;
 import org.apache.sysml.parser.IfStatementBlock;
-import org.apache.sysml.parser.LanguageException;
 import org.apache.sysml.parser.ParForStatementBlock;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatement;
@@ -189,13 +187,11 @@ public class ProgramRewriter
                _sbRuleSet.removeIf(r -> r.getClass().equals(clazz));
        }
        
-       public ProgramRewriteStatus rewriteProgramHopDAGs(DMLProgram dmlp) 
throws LanguageException, HopsException {
+       public ProgramRewriteStatus rewriteProgramHopDAGs(DMLProgram dmlp) {
                return rewriteProgramHopDAGs(dmlp, true);
        }
        
-       public ProgramRewriteStatus rewriteProgramHopDAGs(DMLProgram dmlp, 
boolean splitDags) 
-               throws LanguageException, HopsException
-       {
+       public ProgramRewriteStatus rewriteProgramHopDAGs(DMLProgram dmlp, 
boolean splitDags) {
                ProgramRewriteStatus state = new ProgramRewriteStatus();
                
                // for each namespace, handle function statement blocks
@@ -219,9 +215,7 @@ public class ProgramRewriter
                return state;
        }
        
-       public void rRewriteStatementBlockHopDAGs(StatementBlock current, 
ProgramRewriteStatus state) 
-               throws LanguageException, HopsException
-       {
+       public void rRewriteStatementBlockHopDAGs(StatementBlock current, 
ProgramRewriteStatus state) {
                //ensure robustness for calls from outside
                if( state == null )
                        state = new ProgramRewriteStatus();
@@ -267,9 +261,7 @@ public class ProgramRewriter
                }
        }
        
-       public ArrayList<Hop> rewriteHopDAG(ArrayList<Hop> roots, 
ProgramRewriteStatus state) 
-               throws HopsException
-       {
+       public ArrayList<Hop> rewriteHopDAG(ArrayList<Hop> roots, 
ProgramRewriteStatus state) {
                for( HopRewriteRule r : _dagRuleSet ) {
                        Hop.resetVisitStatus( roots ); //reset for each rule
                        roots = r.rewriteHopDAGs(roots, state);
@@ -279,9 +271,7 @@ public class ProgramRewriter
                return roots;
        }
        
-       public Hop rewriteHopDAG(Hop root, ProgramRewriteStatus state) 
-               throws HopsException
-       {       
+       public Hop rewriteHopDAG(Hop root, ProgramRewriteStatus state) {
                if( root == null )
                        return null;
                
@@ -294,9 +284,7 @@ public class ProgramRewriter
                return root;
        }
        
-       public ArrayList<StatementBlock> 
rRewriteStatementBlocks(ArrayList<StatementBlock> sbs, ProgramRewriteStatus 
status, boolean splitDags)
-               throws HopsException
-       {
+       public ArrayList<StatementBlock> 
rRewriteStatementBlocks(ArrayList<StatementBlock> sbs, ProgramRewriteStatus 
status, boolean splitDags) {
                //ensure robustness for calls from outside
                if( status == null )
                        status = new ProgramRewriteStatus();
@@ -323,9 +311,7 @@ public class ProgramRewriter
                return sbs;
        }
        
-       public ArrayList<StatementBlock> rRewriteStatementBlock(StatementBlock 
sb, ProgramRewriteStatus status, boolean splitDags)
-               throws HopsException
-       {
+       public ArrayList<StatementBlock> rRewriteStatementBlock(StatementBlock 
sb, ProgramRewriteStatus status, boolean splitDags) {
                ArrayList<StatementBlock> ret = new ArrayList<>();
                ret.add(sb);
                

Reply via email to