Execution files

Introduction

Here you set the files that are needed to prepare the execution, debug or assessment of a submission. This includes scripting files, program test files and data files.

Default script to run or debug

If you don't set script files for run or debug submissions, the system will resolve the language you use (based on file name extensions) and use a predefined script. The following table show the languages supported, the filename extension used, the scripts available and compiler/interpreter/debugger used by the script.

-
Language File name
extension
run debug Compiler/
interpreter
Comment
Adaada, adb, adsXXgnat (Ada 2005)/gdbUse first file as main
CcXXgcc C99/gdbCompile all source files
C++cpp, CXXg++/gdbCompile all source files
C#csXXgmcs+mono/mdbCompile all soruce files
Fortranf, f77XXgfortran/gdbCompile all source files
HaskellhsXhugsRun first file
JavajavaXXjavac+java/jdbCompile all source files.
Locate main file
Matlab/OctavemX-matlab, octaveRun first file.
Use vpl_replot after drawing.
Pascalpas, pXXfpc or gpc/gdbCompile firtst file (fpc) or all source files (gpc)
Perlperl, prlXXperlRun first file.
PHPphpX-php5Run first file.
Prologpl, proX-swiplRun first file.
PythonpyXXpythonRun first file.
RubyrbXXrubyRun first file.
Schemescm, sX-mzschemeRun first file.
Shell scriptshX-bashRun first file.
SQLsqlX-sqlite3Run all source files.
First execution files
VHDLvhd, vhdlX-ghdlCompile all source files, the first must have the Main method.

Automatic evaluation

The VPL 1.4 incorporates a feature to facilitate the evaluation of student's submissions. This feature allows to run the student program and check its output for a given input. To set up the evaluation cases you must populate the file "vpl_evaluate.cases".

The file "vpl_evaluate.cases" has the following format:

  • "case = Description of case": Optional. Set an start of test case definition.
  • "input = text": can use several lines. Ends with other instruction.
  • "output = text": can use several lines. Ends with other instruction. A case can have differents correct output. There are three types of output: numbers, text and exact test:
    • number: defined as sequence of numbers (integers and floats). Only numbers in the output are checked, other text are ignored. Floats are checked with tolerance
    • text: defined as text without double quote. Only words are checked and the rest of chars are ignored, the comparation is case-insensitive
    • exact text: defined as text into double quote. The exact match is used to test the output.
  • "grade reduction = [value|percentage%]" : By default an error reduces student's grade (starts with maxgrade) by (grade_range/number of cases) but with this instruction you can change the reduction value or percentage.

General use

A new file can be added by writing its name in the box "Add file" and then clicking on the button "Add file".

An existing file can be uploaded by means of the "Upload file".

All the added or uploaded files can be edited, and all of them, except the three scripting files mentioned below, can be renamed or deleted.

Manual run, execute or evaluation

Three scripting files to prepare each of the actions may be set. These files have predefined names: vpl_run.sh (execution), vpl_debug.sh (debug) and vpl_evaluate.sh (assessment).

The execution of any of those scripting files should generate a file named vpl_execution. This file must be a binary executable or a script beginning with "#!/bin/sh ". The non-generation of this file impedes to run the selected action.

If the activity that you are configuring is "based on" other activity, the files of the base activity are added automatically. The contents of the vpl_run.sh, vpl_debug.sh and vpl_evaluate.sh files are concatenated from the deepest level of "based on" to the current.

Finally, the file vpl_environment.sh is automatically added. This scripting file contain information about the submission. The information come as environment variables:

  • LANG: used language.
  • LC_ALL: same value as LANG.
  • VPL_MAXTIME: maximum execution time in seconds.
  • VPL_FILEBASEURL: URL to access the files of the course.
  • VPL_SUBFILE#: each name of the files submitted by the student. # Ranges from 0 to number of submitted files.
  • VPL_SUBFILES: list of all submitted files.
  • VPL_VARIATION + id: where id is the variation order starting with 0 and the value is the value of the variation.
If the action requested is evaluation, then the following vars are added too.
  • VPL_MAXTIME: max time of execution in seconds.
  • VPL_MAXMEMORY: max memmory usable
  • VPL_MAXFILESIZE: max file size in byte that can be create.
  • VPL_MAXPROCESSES: max number of procceses that can be run simultaneous.
  • VPL_FILEBASEURL: URL to the course files.
  • VPL_GRADEMIN: Min grade for this activity
  • VPL_GRADEMAX: Max grade for this activity

Assessment result

Evaluation output is processed to extract, if possible, comments and a proposed grade for the assessment. Comments can be set in two ways: with a line comment defined by a line beginning with 'Comment :=>>' or with block comments starting with a line containing only '<|--' and ending with a line containing only '--|>'. The grade is taken from the last line that begins with 'Grade :=>>'.

หน้าแรกของไฟล์ช่วยเหลือทั้งหมด

ติดต่อผู้ดูแลระบบ  IP-PHONE  3920 ,1912   Tel.074-317146 หรือ  E-mail  lms@rmutsv.ac.th