Assignment 8 Task 2

simon.r
Mausschubser
Mausschubser
Beiträge: 59
Registriert: 4. Okt 2010 16:13

Assignment 8 Task 2

Beitrag von simon.r » 17. Jun 2014 16:04

Hello,

somehow I am only getting a score of 18/19 passed specification tests and I have no clue what could be wrong (unless the tests somehow manually place an empty cell in the allocated space and then call the garbage collection). Has anybody else encountered this problem?

Lukas.Sommer
Windoof-User
Windoof-User
Beiträge: 29
Registriert: 12. Okt 2011 16:36

Re: Assignment 8 Task 2

Beitrag von Lukas.Sommer » 17. Jun 2014 16:06

Hi,

same problem here, I also can't quite explain to myself, what the problem is.

Greetings

Lukas Sommer

Talaron
Mausschubser
Mausschubser
Beiträge: 85
Registriert: 26. Apr 2012 11:34

Re: Assignment 8 Task 2

Beitrag von Talaron » 17. Jun 2014 17:30

Even a non-implemented version that passes 0 public tests still passed 13 private tests for me. So I'd guess that the 19 tests are just the 6 public tests combined with the 13 basic memory tests included in the lecture interpreters as assert statements:
http://www.erdweg.org/teaching/14-copl/ ... terp.scala

So, if you pass all the public tests but not all private tests, you may have somehow broken the memory implementation itself for some special case. ;)

simon.r
Mausschubser
Mausschubser
Beiträge: 59
Registriert: 4. Okt 2010 16:13

Re: Assignment 8 Task 2

Beitrag von simon.r » 17. Jun 2014 21:34

Unfortunately, that doesn't work either: The assertions seem to have been copied from another interpreter and therefore don't even work with the interpreter in the file. Somehow they assume that the Store is based on an index starting from 1 and one even supposes that interp returns a Map instead of a proper Store...
Nevertheless, my implementation does pass a fixed version of these assertions. I only changed the Store, not the interp function.

Lukas.Sommer
Windoof-User
Windoof-User
Beiträge: 29
Registriert: 12. Okt 2011 16:36

Re: Assignment 8 Task 2

Beitrag von Lukas.Sommer » 18. Jun 2014 14:08

Simon, does your solution now pass all 19 private tests? If so, what have you done to fix it?

Thanks in advance,

Greetings,

Lukas

Sem
Erstie
Erstie
Beiträge: 21
Registriert: 20. Apr 2013 11:13

Re: Assignment 8 Task 2

Beitrag von Sem » 18. Jun 2014 17:30

Same for me. 18/19. Can't understand what is wrong :(

co_
Neuling
Neuling
Beiträge: 7
Registriert: 10. Jan 2013 14:16

Re: Assignment 8 Task 2

Beitrag von co_ » 18. Jun 2014 22:07

Maybe you forgot to adapt nextFreeAddr?

simon.r
Mausschubser
Mausschubser
Beiträge: 59
Registriert: 4. Okt 2010 16:13

Re: Assignment 8 Task 2

Beitrag von simon.r » 18. Jun 2014 22:58

Nope, even if I manually set nextFreeAddr to the first free index (or maxSize-1) after compacting, one specification test fails...

Antworten

Zurück zu „Archiv“