Skip to main content Skip to local navigation
Home » Category: 'VPL'

VPL

VPL & RISC-V Simulation with Kite (with random registers)

In another post, I set up a basic Virtual Programming Lab exercise for RISC-V simulations with Assembler coding and the Kite simulator. That example is vulnerable to students hard-coding the register values without actually writing the necessary code. But I wrote it in order to provide a solid first example. Here, we’re going to write […]

Spike Simulator for learning: C vs. Assembler

RISC-V processors, like ARM processors, are complex beasts, making them challenging to teach with. When teaching with them it’s important to have appropriate development tools to reflect the immediate pedagogical goals but also to provide students with a pathway for further learning and application. When I teach courses on computer architecture, like EECS 2021 at […]

VPL: testing arrays in Java with cloning

On a recent final exam I had students create a method that could interleave two halves of an array. The original exercise came from a Schaum’s Outline book. If you’re not careful, by passing values by reference you can have the student’s solution pollute the original input test value. To solve this in Java you […]

VPL: A Java Unit Test Example

The following is an example of the files needed to create a working Virtual Programming Lab exercise for Java: vpl_run.sh vpl_evaluate.sh MainClass.java StudentSolution.java TeacherReferenceSolutions.java TheTestClass.java With this you can evaluate one student submission against a single reference solution. Two methods are run: one is the student’s method and one is the teacher’s method. The output […]

Automated Grading of Python in VPL using Unit Tests

A few of my colleagues here at YorkU have expressed an interest in using Python with Virtual Programming Lab on our Moodle-based eClass Learning Management System. I don’t have a lot of Python experience, having only really used it for some data processing and toy embedded system demonstrations in the past. So I adapted the […]

Unit Testing a Question Bank

I’m working on question sets for introductory programming classes in languages like Java, C and Matlab, with a possibility of extending into other commonly-used languages (in our department) like Python and Verilog. The idea is that these questions could be deployed into a protected lab test or an open in-class “flipped homework” environment. Key to […]

Automated Student Evaluations in C (part 5)

This is the fifth in the series of postings on automated grading in C. Here, I’ve modified the VPL exercise to include four possible flowcharts that the students can implement, but the particular flowchart now get assigned to the student based on the time of day. The VPL output (both “run” and “evaluate” looks like […]

Automated Student Evaluations in C (part 4)

In this fourth post, I’m going to modify the way the unit tests in C get picked up by the VPL “run” and “evaluate” scripts so that rather than look for a particular phrase returned by the unit test (something like “The unit test expected to see 5 but the student’s function returned 1”), it’s […]

Automated Student Evaluations in C (part 3)

This is the third post in the series on evaluating student assignments in VPL with C and unit testing. We’re targeting using VPL on Moodle / eClass. Specifically, the bash scripts are based on the fantastic work of Smith College professor emeritus, Dr. Dominique ThiĆ©baut. He wrote about his VPL work here and while his […]

Automated Student Evaluations in C (part 2)

Here’s a simple VPL exercise that can grade a simple student-submitted function. The idea is that there are two bash scripts, one for rough work and one for graded evaluation and these scripts will compile the C program, consisting of a main function that calls the student function, passing two integers to it and having […]