Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matlab unit tests fail #32

Open
stanleybak opened this issue May 20, 2016 · 8 comments
Open

matlab unit tests fail #32

stanleybak opened this issue May 20, 2016 · 8 comments

Comments

@stanleybak
Copy link
Contributor

I finally got a computer with matlab on it so I could run the unit tests. It's R2016a, not sure if that matters.

When I run the unit tests, several instances of matlab open (four). Also, there are errors. Here's the console output:

    [junit] Running com.verivital.hyst.junit.PassTests
    [junit] Testsuite: com.verivital.hyst.junit.PassTests
    [junit] tests/unit/models/order_reduction/
    [junit] Method did not return properly because of an internal MATLAB exception
    [junit] matlabcontrol.MatlabInvocationException: Method did not return properly because of an internal MATLAB exception
    [junit]     at matlabcontrol.MatlabInvocationException$Reason.asException(MatlabInvocationException.java:62)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:459)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit]     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
    [junit]     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
    [junit]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    [junit]     at matlabcontrol.$Proxy10.eval(Unknown Source)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:257)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:253)
    [junit]     at matlabcontrol.RemoteMatlabProxy.invoke(RemoteMatlabProxy.java:182)
    [junit]     at matlabcontrol.RemoteMatlabProxy.eval(RemoteMatlabProxy.java:252)
    [junit]     at com.verivital.hyst.passes.complex.OrderReductionPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runVanillaPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runTransformationPass(Unknown Source)
    [junit]     at com.verivital.hyst.junit.PassTests.testOrderReductionpass(Unknown Source)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:606)
    [junit]     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    [junit]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    [junit]     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    [junit]     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    [junit]     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    [junit]     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:127)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:26)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
    [junit] Caused by: com.mathworks.jmi.MatlabException: Undefined function 'syms' for input arguments of type 'char'.
    [junit]     at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
    [junit]     at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
    [junit]     at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
    [junit]     at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1778)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:420)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit] tests/unit/models/order_reduction/
    [junit] matlabcontrol.MatlabInvocationException: Method did not return properly because of an internal MATLAB exception
    [junit]     at matlabcontrol.MatlabInvocationException$Reason.asException(MatlabInvocationException.java:62)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:459)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit]     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
    [junit]     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
    [junit]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    [junit]     at matlabcontrol.$Proxy10.eval(Unknown Source)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:257)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:253)
    [junit]     at matlabcontrol.RemoteMatlabProxy.invoke(RemoteMatlabProxy.java:182)
    [junit]     at matlabcontrol.RemoteMatlabProxy.eval(RemoteMatlabProxy.java:252)
    [junit]     at com.verivital.hyst.passes.complex.OrderReductionPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runVanillaPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runTransformationPass(Unknown Source)
    [junit]     at com.verivital.hyst.junit.PassTests.testOrderReductionpass(Unknown Source)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:606)
    [junit]     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    [junit]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    [junit]     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    [junit]     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    [junit]     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    [junit]     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:127)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:26)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
    [junit] Caused by: com.mathworks.jmi.MatlabException: Undefined function 'syms' for input arguments of type 'char'.
    [junit]     at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
    [junit]     at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
    [junit]     at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
    [junit]     at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1778)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:420)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit] Method did not return properly because of an internal MATLAB exception
    [junit] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 31.468 sec
    [junit] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 31.468 sec
    [junit] ------------- Standard Output ---------------
    [junit] tests/unit/models/order_reduction/
    [junit] Method did not return properly because of an internal MATLAB exception
    [junit] tests/unit/models/order_reduction/
    [junit] Method did not return properly because of an internal MATLAB exception
    [junit] ------------- ---------------- ---------------
    [junit] ------------- Standard Error -----------------
    [junit] matlabcontrol.MatlabInvocationException: Method did not return properly because of an internal MATLAB exception
    [junit]     at matlabcontrol.MatlabInvocationException$Reason.asException(MatlabInvocationException.java:62)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:459)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit]     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
    [junit]     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
    [junit]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    [junit]     at matlabcontrol.$Proxy10.eval(Unknown Source)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:257)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:253)
    [junit]     at matlabcontrol.RemoteMatlabProxy.invoke(RemoteMatlabProxy.java:182)
    [junit]     at matlabcontrol.RemoteMatlabProxy.eval(RemoteMatlabProxy.java:252)
    [junit]     at com.verivital.hyst.passes.complex.OrderReductionPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runVanillaPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runTransformationPass(Unknown Source)
    [junit]     at com.verivital.hyst.junit.PassTests.testOrderReductionpass(Unknown Source)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:606)
    [junit]     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    [junit]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    [junit]     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    [junit]     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    [junit]     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    [junit]     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:127)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:26)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
    [junit] Caused by: com.mathworks.jmi.MatlabException: Undefined function 'syms' for input arguments of type 'char'.
    [junit]     at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
    [junit]     at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
    [junit]     at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
    [junit]     at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1778)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:420)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit] matlabcontrol.MatlabInvocationException: Method did not return properly because of an internal MATLAB exception
    [junit]     at matlabcontrol.MatlabInvocationException$Reason.asException(MatlabInvocationException.java:62)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:459)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit]     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
    [junit]     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
    [junit]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    [junit]     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    [junit]     at matlabcontrol.$Proxy10.eval(Unknown Source)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:257)
    [junit]     at matlabcontrol.RemoteMatlabProxy$4.invoke(RemoteMatlabProxy.java:253)
    [junit]     at matlabcontrol.RemoteMatlabProxy.invoke(RemoteMatlabProxy.java:182)
    [junit]     at matlabcontrol.RemoteMatlabProxy.eval(RemoteMatlabProxy.java:252)
    [junit]     at com.verivital.hyst.passes.complex.OrderReductionPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runVanillaPass(Unknown Source)
    [junit]     at com.verivital.hyst.passes.TransformationPass.runTransformationPass(Unknown Source)
    [junit]     at com.verivital.hyst.junit.PassTests.testOrderReductionpass(Unknown Source)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:606)
    [junit]     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    [junit]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    [junit]     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    [junit]     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    [junit]     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    [junit]     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:127)
    [junit]     at org.junit.runners.Suite.runChild(Suite.java:26)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    [junit]     at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
    [junit] Caused by: com.mathworks.jmi.MatlabException: Undefined function 'syms' for input arguments of type 'char'.
    [junit]     at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
    [junit]     at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
    [junit]     at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
    [junit]     at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1778)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.returningFeval(JMIWrapper.java:420)
    [junit]     at matlabcontrol.JMIWrapper$MatlabThreadOperations.eval(JMIWrapper.java:394)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:154)
    [junit]     at matlabcontrol.JMIWrapper$4.call(JMIWrapper.java:150)
    [junit]     at matlabcontrol.JMIWrapper$9.run(JMIWrapper.java:307)
    [junit]     at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
    [junit] ------------- ---------------- ---------------
    [junit] 
    [junit] Testcase: testSubConstantsPll[0] took 0.428 sec
    [junit] Testcase: testOrderReductionpass[0] took 20.251 sec
    [junit]     FAILED
    [junit] expected:<[x1, x2, x3, [y1, time]]> but was:<[x1, x2, x3, [x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, t, y]]>
    [junit] junit.framework.AssertionFailedError: expected:<[x1, x2, x3, [y1, time]]> but was:<[x1, x2, x3, [x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, t, y]]>
    [junit]     at com.verivital.hyst.junit.PassTests.testOrderReductionpass(Unknown Source)
    [junit] 
    [junit] Testcase: testSimplifyExpressions[0] took 0.002 sec
    [junit] Testcase: testSubConstantsPll[1] took 0.067 sec
    [junit] Testcase: testOrderReductionpass[1] took 10.7 sec
    [junit]     FAILED
    [junit] expected:<[x1, x2, x3, [y1, time]]> but was:<[x1, x2, x3, [x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, t, y]]>
    [junit] junit.framework.AssertionFailedError: expected:<[x1, x2, x3, [y1, time]]> but was:<[x1, x2, x3, [x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, t, y]]>
    [junit]     at com.verivital.hyst.junit.PassTests.testOrderReductionpass(Unknown Source)
    [junit] 
    [junit] Testcase: testSimplifyExpressions[1] took 0.001 sec

BUILD FAILED
/home/stan/repositories/hyst/src/build.xml:174: Test com.verivital.hyst.junit.PassTests failed

In addition, in one of the matlab windows:

path_parent =

/home/stan/repositories/hyst


path_current =

src


path_parent =

/home/stan/repositories/hyst


path_current =

src

Error using evalin
Undefined function 'syms' for input arguments of type 'char'.

>> 
@ttj
Copy link
Contributor

ttj commented May 23, 2016

I have not tested the unit tests on 2016a, only on 2014b. The multiple matlab instances starting is due to the library usage (I had this fixed before but I broke it when refactoring into the MatlabBridge). It may be due to calling the jars multiple times throughout the tests and a new instance gets spawned each time.

For the error, you are probably missing a toolbox, probably the symbolic math one.

We have the required ones in the readme / repos overview here: https://github.com/ttj/hyst#matlab-toolboxes

It seems I forgot to merge my branch back in, so I'll try to find some time to create a pull request this week (we did this when we set up the HSCC 2016 repeatability package).

We should probably think about a general way to handle these types of failing tests when dependencies are missing (maybe however you've been handling the Python ones since we're probably calling things in a similar way?).

Additionally, we should think about a test / check we can run to check on all dependencies, so users can understand what functionality is there or not.

Having all the tests pass is great, but we've got it set up now in a way that what one user sees will differ from others based on the dependencies available.

@stanleybak
Copy link
Contributor Author

The way it works with python is that hasPython() returns false if any of the libraries are missing. This is done by trying to open a python process and import all the required libraries. Maybe hasMatlab() could do something similar? It would also be a good place to report which toolbox is missing.

@ttj
Copy link
Contributor

ttj commented May 23, 2016

Yes, that sounds good. Eventually we may want to refactor to parameterize by libraries, versions (maybe), etc., as how does it currently work if ONE library is missing? E.g., for Matlab, the order reduction pass relies on it, as does the SpaceEx-to-Stateflow translator, but they require different libraries, so one could work while the other may be broken. Something like:

hasPython(libraryName) or have hasPython() return a list of missing libraries or something; strings would probably be fine (there are APIs using strings for the Matlab libraries, including version numbers, etc.)

@stanleybak
Copy link
Contributor Author

stanleybak commented May 23, 2016

For python, the current setup is that if any libraries are missing hasPython() returns false. This may be pessimistic, but it's easier to manage. For matlab, since the toolboxes cost money, maybe it makes more sense to have something more fine-grained, although it will be more complex code for you to write and test.

@ttj
Copy link
Contributor

ttj commented May 23, 2016

Sounds good. Does the following make sense for Python via a finer-grained additional function?

hasPython(bool detailed) returns a list of strings with the missing dependency name (could think about versions too if you're checking this)

hasPython() returns false if any dependency is missing by checking if hasPython returns a string of length >= 1

We can then do the same for Matlab.

Also, should we go ahead refactor this at this point to make a generic bridge as well? We will soon add a Mathematica interface for Andrew's work.

We could create a generic bridge interface / abstract class with things like checkDependencies, etc., and then have the specific bridges implement these. I would think this will make it easier to maintain into the future (like we did with the printers at some point after we had a couple).

@ttj
Copy link
Contributor

ttj commented May 23, 2016

Hmmm, my last comment seemed to get dropped somehow and it was unfortunately rather long.

Should we go ahead and refactor and add a generic interface / abstract class for bridges? Andrew will soon add a Mathematica bridge.

Likewise, we could do the following for finer-grained error messages, etc. for users. Have a:

hasDependency(bool detailed) that returns a list of strings with missing dependencies (and possibly versions if important)

hasDependency() returns false if the list of dependencies missing is greater than 0 length

@ttj
Copy link
Contributor

ttj commented May 23, 2016

And now it showed up....weird. Anyway, you get the idea...

@stanleybak
Copy link
Contributor Author

stanleybak commented May 23, 2016

Yes, an ExternalBridge generic class might be a good idea.

The hasDependency(bool detailed) you proposed would check for all toolboxes / libraries? Would there be a way to query for individual ones (do we want to have this ability?)?

Let's try to avoid premature generalization. I think the hasAllDependencies() or, equivalently, check() methods are necessary, which return true/false and can be used to skip unit tests where dependencies are not met.

The strategy I've taken with python is that you can't use the bridge unless you have all dependencies. If you try to, you get an AutomatonExportException with a message that describes the missing library.

The alternative is either we explicitly state whenever using the bridge which libraries are needed (may lead to errors by the coder missing some required libraries), or we try to run the code, and if it fails the error message may be hard to figure out (since, for example, it may be a matlab error).

I think the easiest to code is just don't let people use the bridge unless you have all dependencies. Maybe we could add a -force flag or something that will try to use the bridge anyway, but then we wouldn't make guarantees about having nice error messages if things fail.

If there are exotic matlab toolboxes, maybe we just have two matlab bridges at that point, one for the standard set, and one for the exotic ones? Hmm, that doesn't seem very clean either though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants