Skip to main content Skip to local navigation

Search Results for: 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 […]

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 […]

VPL in 2023: New eClass Skin

For anyone reviewing older videos or blog pages for Virtual Programming Lab on YorkU’s eClass system, it’s important to note that the settings “gear” has moved.

Update to VPL for Java on EECS at YorkU

The VPL server in the YorkU EECS department was recently updated (2022/23). This had a small impact on existing VPL scripts. With Java, any script that uses JUnit needs to have its vpl_run.sh and vpl_evaluate.sh scripts updated. Here, I have the run script do the JUnit test directly. The evaluate script does JUnit through the […]

Ad-hoc unit testing on simAVR and VPL

In the previous post I showed you how to use VPL and simAVR together to write a basic activity that would test to see if a student could change or assign the value of a register in the simulated microcontroller using the C programming language. While it was the most straight-forward way that I could […]

Simulated Microcontrollers in VPL Exercises

In Computer Architecture classes or Embedded Systems classes, it can be really useful to allow for students to be graded on assignments that allow them to interactively explore the inner workings of a microprocessor. One way is to have the students create programs in a hardware description language like Verilog or VHDL. Another way is […]

VPL, Vectors and Java

This is an example exercise in VPL. Grade is out of 1. All the students have to do is uncomment the creation of the MathVector object. Want to reproduce this example? PreLabC.java (the template for the student to work on) solution.txt (what the student’s solution _could_ look like) MathVector.java (the class with all the methods […]

VPL & Java 17

In our first year programming class for engineering students, EECS 1021, we’re using modern features like jShell and var. Unfortunately, the OS that our VPL instance sits on came with an older version of Java, so we’ve had to modify our scripts to point to the Java 17 JDK. If you get an error like […]