Very Strange Comparison works on local but fails on uploading

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Very Strange Comparison works on local but fails on uploading

finaspirant
I have updated the VMTranslator etc for project 8. When I run the java to generate asm file and run it on emulator the comparison file for output works perfect. However, when I submit the same on Coursera platform for Project 8 the comparison always fails.

Not sure how to solve it as it is working perfectly locally.
Reply | Threaded
Open this post in threaded view
|

Re: Very Strange Comparison works on local but fails on uploading

WBahn
Administrator
The problem is most likely that the tests do not (cannot) test for every possibility. So you happen to be passing the tests that the test files from the website use but not the ones that the test code on the Coursera platform use.

I've never interacted with the Coursera course, so I don't know anything about them or about what kind of feedback you get.

You really aren't giving us much to go on. You make it sound like the Coursera only provides overall pass/fail feedback and gives no other information. Is that truly the case?
Reply | Threaded
Open this post in threaded view
|

Re: Very Strange Comparison works on local but fails on uploading

finaspirant
*(-15) - Problems while executing the translated BasicLoop.asm program - Comparison failure at line 2
*(-15) - Problems while executing the translated FibonacciSeries.asm program - Comparison failure at line 2
*(-15) - Problems while executing the translated NestedCall.asm program - Comparison failure at line 2
*(-15) - Problems while executing the translated SimpleFunction.asm program - Comparison failure at line 2
LOG:
Archive: /shared/submission/project8.zip
 inflating: project/Parser.java
 inflating: project/CodeWriter.java
 inflating: project/lang.txt
 inflating: project/VMTranslator.java
checking /shared/submission/project8.zip
javac *.java
chmod +x VMTranslator
File created : /grader/tests/p8/project/BasicLoop/BasicLoop.asm

BasicLoop/BasicLoop.out
| RAM[0] |RAM[256]|
| 321 | 53 |
BasicLoop/BasicLoop.cmp
| RAM[0] |RAM[256]|
| 257 | 6 |
File created : /grader/tests/p8/project/FibonacciElement/FibonacciElement.asm
File created : /grader/tests/p8/project/FibonacciSeries/FibonacciSeries.asm
FibonacciSeries/FibonacciSeries.out
|RAM[3000]|RAM[3001]|RAM[3002]|RAM[3003]|RAM[3004]|RAM[3005]|
| 0 | 0 | 0 | 0 | 0 | 0 |
FibonacciSeries/FibonacciSeries.cmp
|RAM[3000]|RAM[3001]|RAM[3002]|RAM[3003]|RAM[3004]|RAM[3005]|
| 0 | 1 | 1 | 2 | 3 | 5 |
File created : /grader/tests/p8/project/NestedCall/NestedCall.asm
NestedCall/NestedCall.out
| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] | RAM[5] | RAM[6] |
| 261 | 261 | 256 | 4000 | 5000 | 246 | -1 |
NestedCall/NestedCall.cmp
| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] | RAM[5] | RAM[6] |
| 261 | 261 | 256 | 4000 | 5000 | 135 | 246 |
File created : /grader/tests/p8/project/SimpleFunction/SimpleFunction.asm
SimpleFunction/SimpleFunction.out
| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] |RAM[310]|
| 289 | 285 | 280 | 3000 | 4000 | 1234 |
SimpleFunction/SimpleFunction.cmp
| RAM[0] | RAM[1] | RAM[2] | RAM[3] | RAM[4] |RAM[310]|
| 311 | 305 | 300 | 3010 | 4010 | 1196 |
File created : /grader/tests/p8/project/StaticsTest/StaticsTest.asm
Reply | Threaded
Open this post in threaded view
|

Re: Very Strange Comparison works on local but fails on uploading

WBahn
Administrator
I'm assuming that the tests being used are the same ones that are provided in the files from the website. That may or may not be a good assumption.

Let's look at the pieces:

finaspirant wrote
*(-15) - Problems while executing the translated BasicLoop.asm program - Comparison failure at line 2
So let's look at what it output on line 2.

BasicLoop/BasicLoop.out
| RAM[0] |RAM[256]|
| 321 | 53 |
Let's see what it was looking for:
BasicLoop/BasicLoop.cmp
| RAM[0] |RAM[256]|
| 257 | 6 |
That's the same output that the website files were looking for, so it appears to be the same test.