Monday, November 16, 2009

iTutor Improvements (continued)

After the last 2 weeks, the remaining iTutor goals are as follows:
  1. iTutor needs to check whether it can find equivalent public methods in the student solution, if not, it can flag error.
  2. When the methods under test accept non-primitive types, a deep copy of the argument should be made. If not, the method under test of teacher solution may modify the argument before passing it to student solution. Similar techniques need to developed for comparing non-primitive return types.
  3. A problem arises where methods can be overloaded, leading to multiple possibilities when instantiating each solution. iTutor shall generate numerous test drivers, each of which focuses on one constructor.
  4. The logging feature now sends the data to files. The data could be formatted in a fashion where it is easier to comprehend.
For the next two weeks, I shall address the above points, as well as improving on other features as required by the addition of the above.

Microsoft Help with Pex

So the past two weeks have been very productive on how Pex works. So I met with Nikolai from Microsoft Pex group and he helped me with my problem that I was having with my complex object. He also told me that I would run into alot of problems because I use a lot of float point arithmetic within my program and Pex has problems with floats. Unfortunately, video games do generally use floating points for movement of objects and placement of objects so this is something that I cannot avoid.

I worked on trying to make Pex and Scurvy.Test work together a little bit more but with no sucess. I also had a meeting with Xusheng of our research group and he gave me alot of help on my game and that same MapEngine method. He had given me a way to try to make Pex understand the code better and search better paths by constraining the variables used in the factory methods.

Beginning my first paper

The past two weeks I've gathered my current information in order to find a topic for me to discuss for the SIGSCE student research project. I met with Justin Gorham for some help with Pex on how to use it with my game since he worked with Pex over the summer with the government. I also had help from Bellanov Apilli to learn how to use LaTeX. I had alot of problems just setting it up but got it working later on.

My topic of the paper was on how to deal with complex objects within a game using Pex. I have an example of this which I discussed in an earlier post (the MapEngine) that I will use as my example in the paper.

Continuation of Studies in OOP

My most recent research has been conducted with Charles regarding Object Oriented Programming. Primarily, I've been solidifying my knowledge in Object Oriented Programming, particularly in C# by consistently differentiating between the various aspects which compose a simple program.

Our most recent meetings had me perform several assignments of deciphering coding created by Charles, and explain the capabilities of each class. Inversely, I was given the instructions to create the coding for some assignments based on classes that Charles had defined.

The most prominent (and longest) example involved me creating the portion of a video game which assigned the values of location and velocity to two player characters.

I believe I had taken pictures of this example, but I am having difficulty locating it. When I find it I will upload it into this post, as it was particularly lengthy and will be trouble replicating. I will also ensure that my following posts will contain visual references to better visualize my experiences.


Take Care.

Monday, November 2, 2009

iTutor Improvements

The feedback compiled from the iTutor demo is as follows:
  1. iTutor accepts three classes as inputs: Teacher solution, Student solution, and an interface common to them. The users of iTutor can be relieved by removing the interface as input. This interface can automatically be inferred from the public methods of Teacher solution. Also, before processing these solutions, iTutor needs to check whether it can find equivalent public methods in the student solution, if not, it can flag error.
  2. iTutor currently renames the solutions to Student and Teacher. This can be easy if there is a single class. But situation can be difficult if there are many classes. Bellanov needs to investigate and develop features to address this issue.
  3. Currently, the length of method-call sequences in tests has been limited to three. This can be made configurable.
  4. Add "assertions" to all case statements, this would help in automatically generating test cases with variable number of sequences (as assertions exist right after the method-call invocations)
  5. Make the index used in the switch statement as symbolic and remove it as a parameter for the driver method
  6. Remove arguments passed to method calls as parameters from the driver method.
  7. When the methods under test accept non-primitive types, a deep copy of the argument should be made. If not, the method under test of teacher solution may modify the argument before passing it to student solution. Similar techniques need to developed for comparing non-primitive return types.
  8. A problem arises where methods can be overloaded, leading to multiple possibilities when instantiating each solution. iTutor shall generate numerous test drivers, each of which focuses on one constructor.
  9. The logging feature that currently uses print line statements shall be implemented to send that information to a file, which can be accessed and analyzed later.
For the next week, I shall address as much of the following as possible. I predict that I will be able to cover and address points 1, 3, and 5. First and foremost, I am developing a test suite to properly test all of iTutor's present functionality to ensure correct behaviors. After I am convinced that the tool is in proper shape, I shall move on to address the points above.

Thursday, October 29, 2009

Going forward

After having a meeting with the graduate students, and Dr. Xie. I need to write better PUTs since my skills on that area is lacking. I need to start out at unit testing and then from there do a PUT because without knowing how to write a correct PUT, I may never find anything of interest on how to test game applications using the XNA framework. I also need to get my research game Tears on graduate student computers so that I may get further feedback from them and continue to teach Khiry Object Oriented Programming. Above anything else, I need to find XNA specific research areas, so far I have been unproductive in finding anything of interest that is specific to the XNA framework, so that is my goal going forward.

Scurvy.Test and XNA

(August 2nd - August 15th)

Another part of the summer I worked with a Test Framework called Scurvy. It's an open source framework that lets you do unit tests specifically for the XNA framework. I was able to test that a loading function worked. The thing is that loading with XNA is different from different measures of loading because you have to use the XNA Content Pipeline. Well you don't necessarily have to use it but it would be in your best interest if you do to keep production of your game fast and easy and reliable. Here is a simple example:


Now it doesn't seem like much with this test but you will be able to get the correct result with this framework. I've tried other frameworks, including Pex, and .NET unit testing tools and they cannot get this simple test to work. I believe that with a little more digging around with Pex and Scurvy, I can find something that could be interesting with testing game applications using the XNA framework.