7. Languages supported

This chapter shows the programming languages supported by VPL with details. For each programming language, a table with the supported features as indicated in the next table is shown.

Feaure Supported details
File extensions list of extensions The system uses it to detect what programming language to use.
Syntax highlighter Yes/No If not available system uses plain text.
Text terminal Yes/No If runnable in a textual terminal.
Gui terminal Yes/No If runnable in a graphical terminal (GUI).
Debugging Yes/No If a debugger is supported.
Similarity Yes/No If the search by similarity is supported.
Automatic evaluation Yes/No If automatic input/output evaluation is supported.
Compiler/Interpreter Tool used  
Build/launch   How the source code is processed to compile or launch the program.
Others   Other supported features.

Note

If you don’t find the programming language or feature that you search for, you still can see the Advanced features and learn how to add the programming language or feature you need to your VPL activities yourself.

7.1. Ada

New in version 1.0.0.

Ada is a structured, statically typed, imperative, and object-oriented programming language. Home page https://www.adaic.org

_images/ada_example.png

Example of code in Ada programming language

Feaure Supported details
File extensions ada, adb, ads  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging Yes gdb
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter Gnat GNAT (GNU Ada) http://www.gnu.org/software/gnat/
Build/launch   gnat make “FIRST_SOURCE_FILE”. The first file with adb extension init the making process.
Other Versions Available versions for Ada 2005 and Ada 2012. Ada 2005 is the default compiler.
_images/ada_run.png

Running a program written in Ada

_images/ada_debug.png

Debugging with Gdb a program written in Ada.

7.2. Assembler x86

New in version 3.0.0.

Asssembler for the x86 CPU architecture.

_images/asm_example.png

Example of code in Asssembler x86

Feaure Supported details
File extensions asm  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter Nasm NASM https://nasm.us/
Build/launch   nasm -f “elf$BITS” “$FILENAME”. Compiles each asm file with 32/64 bits autodetection then links all object files to generate program.
Other    
_images/asm_run.png

Running an Assambler x86 program

7.3. C

New in version 1.0.0.

C logo.

C is a general-purpose, imperative programming language that supports structured programming.

_images/c_example.png

Example of code in C programming language

Feaure Supported details
File extensions c, h  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging Yes ddd, gdb
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter gcc GNU GCC https://gcc.gnu.org/
Build/launch   gcc All_C_files -lm -lutil. Compile all c files.
Other Versions Available ANSI-C, C99 and C11. Default version is the compiler default version.
_images/c_run.png

Running a program written in C

_images/c_debug.png

Debugging with ddd a program written in C.

7.4. Clojure

New in version 3.1.2.

Clojure logo.

Logo of Clojure

Clojure is a functional programming language that runs on the Java platform.

Home page https://clojure.org.

_images/clojure_example.png

Example of code in Clojure programming language

Feaure Supported details
File extensions clj  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter clojure Clojure https://clojure.org
Build/launch   clojure first_clojure_file. Launches first clj file submitted
Other    
_images/clojure_run.png

Running a program written in Clojure

7.5. C++

New in version 1.0.0.

C++ logo.

C++ is a moderm general-purpose programming language derived from C.

_images/cpp_example.png

Example of code in C++ programming language

Feaure Supported details
File extensions cc, cpp, C, c++, hxx, H  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging Yes ddd, gdb
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter g++ GNU C++ https://gcc.gnu.org/projects/cxx-status.html
Build/launch   g++ All_C_files -lm -lutil. Compile all cpp and C files.
Other Versions Versions available C++98, C++11, C++14, C++17. Default version is the compiler default version.
_images/cpp_run.png

Running a program written in C++

_images/cpp_debug.png

Debugging with ddd a program written in C++.

7.6. C#

New in version 2.0.0.

C# logo.

C# logo

C# (C-sharp) is a moderm general-purpose programming language.

Home page https://docs.microsoft.com/en-us/dotnet/csharp/.

_images/csharp_example.png

Example of code in C# programming language

Feaure Supported details
File extensions cs  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal Yes  
Debugging Yes gdb
Similarity Yes Partially
Automatic evaluation Yes  
Compiler/Interpreter csc, mcs, and mono Mono https://www.mono-project.com/
Build/launch   Compile all cs files. Uses compiler csc or mcs, first found. Interpreter mono.
Other NUnit Autodetect NUnit in compilation. If using NUint launch nunit-console.
_images/csharp_run.png

Running a program written in C#

_images/csharp_run_gui.png

Running a program with GUI written in C#

_images/csharp_debug.png

Debugging with gdb a program written in C#

7.7. D

New in version 3.1.2.

D logo

D logo [1]

D is a general-purpose programming language.

Home page https://dlang.org/.

_images/d_example.png

Example of code in D programming language

Feaure Supported details
File extensions d  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter gdc GNU GCC D https://gcc.gnu.org/
Build/launch   Compile all d files.
Other    
_images/d_run.png

Running a program written in D

7.8. Erlang

New in version 3.3.0.

Erlang logo.

Erlang logo

Erlang is a general-purpose, concurrent, and functional programming language.

Home page https://www.erlang.org/.

_images/erl_example.png

Example of code in Erlang programming language

Feaure Supported details
File extensions erl  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter escript/erlang Erlang https://www.erlang.org/
Build/launch   Runs first souecre file “.erl”. Starts the erl interpreter.
Other    
_images/d_run.png

Running a program written in Erlang

7.9. Fortran

New in version 2.0.0.

Fortran logo.

Fortran (formerly FORTRAN) is a general-purpose, compiled imperative programming language.

_images/fortran_example.png

Example of code in Fortran programming language

Feaure Supported details
File extensions f, f77, f90, for  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter gfortran GNU GCC Fortran https://gcc.gnu.org/fortran/
Build/launch   Compile all fortran files.
Other    
_images/fortran_run.png

Running a program written in Fortran

7.10. Go

New in version 3.1.2.

Go logo.

Go is a statically typed, compiled programming language.

Home page https://golang.org/.

_images/go_example.png

Example of code in Go programming language

Feaure Supported details
File extensions go  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter go Go https://golang.org/
Build/launch   go build “FIRST_SOURCE_FILE”. First go file init compilation process.
Other    
_images/go_run.png

Running a program written in Go

7.11. Groovy

New in version 3.4.0.

Apache Groovy is a object-oriented programming language derived from Java.

Home page https://groovy-lang.org/.

_images/groovy_example.png

Example of code in Groovy programming language

Feaure Supported details
File extensions groovy  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter groovyc and groovy Groovy https://groovy-lang.org/
Build/launch   Compiles all groovy files. Launch first main function found in source files submitted.
Other    
_images/groovy_run.png

Running a program written in Groovy

7.12. Haskell

New in version 3.0.0.

Haskell logo.

Haskell logo

Haskell is a general-purpose functional programming language.

Home page https://www.haskell.org/.

_images/haskell_example.png

Example of code in Haskell programming language

Feaure Supported details
File extensions hs  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter ghc or hugs GHC https://www.haskell.org/ghc/ hugs 98 https://www.haskell.org/hugs/
Build/launch   Compiles/interpretes first haskell source file submitted.
Other    
_images/haskell_run.png

Running a program written in Haskell

7.13. HTML

New in version 3.0.0.

HTML 5 logo.

HTML5 logo [2]

The HyperText Markup Language (HTML) is the standard language to write documents to be displayed in a web browser.

_images/html_example.png

Example of code in HTML

Feaure Supported details
File extensions html or htm  
Syntax highlighter Yes  
Text terminal No  
Gui terminal Yes  
Debugging No  
Similarity No  
Automatic evaluation No  
Compiler/Interpreter x-www-browser or firefox Firefox https://www.mozilla.org/en-US/firefox/
Build/launch   Interpretes first HTML file submitted.
Other TypeScript Transcompiles all ts files to js using tsc.
Other SCSS Transcompiles all scss files to css using sass.
_images/html_run.png

Running a browser with code written in HTML

7.14. Java

New in version 1.0.0.

Java is a moderm object-oriented programming language.

Home page https://www.oracle.com/java/.

_images/java_example.png

Example of code in Java programming language

Feaure Supported details
File extensions java, jar jar as library files
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal Yes Autodetect the use of JFrame, JDialog, JOptionPane, or JApplet
Debugging Yes Uses jgrasp, ddd or jdb first found
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter javac and java https://www.oracle.com/java/ and https://openjdk.java.net/
Build/launch   Compiles all java and jar files found. Launches the first main function found in submitted files.
Other JUnit If using JUint launch org.junit.runner.JUnitCore for TESTCLASS found
_images/java_run.png

Running a program written in Java

_images/java_run_gui.png

Running a program with GUI written in Java

_images/java_debug.png

Debugging with JGrasp a program written in Java

7.15. JavaScript

New in version 3.1.2.

JavaScript is a high-level programming language known for running in browsers.

ECMAScript® 2021 language specification https://www.ecma-international.org/publications-and-standards/standards/ecma-262/.

_images/js_example.png

Example of code in JavaScript programming language

Feaure Supported details
File extensions js  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity Yes Partially
Automatic evaluation Yes  
Compiler/Interpreter nodejs Node.js https://nodejs.org/en/
Build/launch   Launches the first js submitted file.
Other    
_images/js_run.png

Running a program written in JavaScript

7.16. Kotlin

New in version 3.4.0.

Kotlin logo. Copyright  Kotlin Foundation.

Kotlin logo [3]

Kotlin is a moderm programming language.

Home page https://kotlinlang.org/

_images/kotlin_example.png

Example of code in Kotlin programming language

Feaure Supported details
File extensions tk  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter kotlinc Kotlin https://nodejs.org/en/
Build/launch   Compiles all kt submitted files.
Other    
_images/kotlin_run.png

Running a program written in Kotlin

7.17. Lisp

New in version 3.1.2.

Lisp (LISP) is a functional programming language created in 1958 with syntax based on parenthesis.

_images/lisp_example.png

Example of code in Lisp programming language

Feaure Supported details
File extensions lisp and lsp  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter clisp GNU CLISP https://www.gnu.org/software/clisp/
Build/launch   Launches first Lisp file in submitted files.
Other    
_images/lisp_run.png

Running a program written in Lisp

7.18. Lua

New in version 3.1.2.

Lua logo.

Lua logo [4]

Lua is high-level programming language.

Home page https://www.lua.org/.

_images/lua_example.png

Example of code in Lua programming language

Feaure Supported details
File extensions lua  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter lua Lua https://www.lua.org/
Build/launch   Launches first Lua file in submitted files.
Other    
_images/lua_run.png

Running a program written in Lua

7.19. Octave/Matlab

New in version 2.0.0.

Octave logo.

GNU Octave logo [5]

GNU Octave is a high-level programming language for numerical computations.

Octave home page https://www.gnu.org/software/octave.

MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks.

MATLAB home page https://www.mathworks.com/products/matlab.html

_images/octave_example.png

Example of code in Octave programming language

Feaure Supported details
File extensions m  
Syntax highlighter Yes  
Text terminal Yes  
Gui terminal Yes Autodetects GUI use by finding one of these functions: image, imagesc, figure, plot, contour, contourf, polar, pie, errorbar, quiver, compass, semilog, loglog, bar, hist, stairs, stem, scatter, pareto, mesh, surf, or sombrero.
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter matlab or octave

Uses first found (matlab or octave)

MATLAB https://www.mathworks.com/

Octave https://www.gnu.org/software/octave

Build/launch   Launches first m file in submitted files and keeps running the interpreter.
Other    
_images/octave_run.png

Running a program written in Octave

_images/octave_run_gui.png

Running a GUI program written in Octave

7.20. MiniZinc

New in version 3.4.0.

MiniZinc logo.

MiniZinc logo [6]

MiniZinc is a constraint modeling language.

Home page https://www.minizinc.org/.

_images/minizinc_example.png

Example of code in MiniZinc programming language

Feaure Supported details
File extensions mzn and dzn mzn for model and dzn for related data.
Syntax highlighter No  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter minizinc or mzn-fzn MiniZinc to FlatZinc converter https://www.minizinc.org/
Build/launch   Launches first mzn file in submitted files.
Other    
_images/minizinc_run.png

Running a program written in MiniZinc

7.21. MIPS

New in version 3.4.0.

Assembler for MIPS processor. MIPS (Microprocessor without Interlocked Pipelined Stages).

_images/mips_example.png

Example of code in MIPS assembler.

Feaure Supported details
File extensions s  
Syntax highlighter yes Partially
Text terminal Yes  
Gui terminal No  
Debugging Yes xspim first file in submitted files
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter spim SPIM: A MIPS32 Simulator http://spimsimulator.sourceforge.net/
Build/launch   Launches first file in submitted files.
Other    
_images/mips_run.png

Running a program written in MIPS assembler

_images/mips_debug.png

Debugging with xspim a program written in MIPS assembler

7.22. Pascal

New in version 2.0.0.

Pascal is an imperative and procedural programming language.

_images/pascal_example.png

Example of code in Pascal programming language.

Feaure Supported details
File extensions pas and p  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging Yes gdb
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter fpc or gpc

First found (fpc or gpc)

Free Pascal Compiler http://www.freepascal.org/

GNU Pascal http://www.gnu-pascal.de/

Build/launch  

fpc compiles first pascal file in submitted files.

gpc compiles all pascal files.

Other    
_images/pascal_run.png

Running a program written in Pascal programming language

_images/pascal_debug.png

Debugging with gdb a program written in Pascal programming language

7.23. Perl

New in version 2.0.0.

Perl is general-purpose and interpreted programming languages.

_images/perl_example.png

Example of code in Perl programming language.

Feaure Supported details
File extensions perl, prl, pl and pm  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging Yes Using perl -d
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter perl Perl https://www.perl.org/
Build/launch  

perl -w FIRST_PERL_FILE

Launches first Perl file in submitted files.

Other    
_images/perl_run.png

Running a program written in Perl programming language

_images/perl_debug.png

Debugging with “perl -d” a program written in Perl programming language

7.24. PHP

New in version 2.0.0.

PHP logo. By https://www.php.net/

PHP logo [7]

PHP is a general-purpose scripting language for web development.

Home page https://www.php.net/.

_images/php_example.png

Example of code in PHP programming language.

Feaure Supported details
File extensions php  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter php PHP https://www.php.net/
Build/launch  

php -w FIRST_PHPL_FILE

Launches first PHP file in submitted files.

If file name is “index.php” launch in a web server.

Other web Using file name “index.php” the system launch a web server.
TypeScript Transcompiles all ts files to js using tsc.
SCSS Transcompiles all scss files to css using sass.
_images/php_run.png

Running a console program written in PHP programming language

_images/php_run_web.png

Running a Web program written in PHP programming language

7.25. Prolog

New in version 2.0.0.

Prolog is a logic/declarative programming language.

_images/prolog_example.png

Example of code in Prolog programming language.

Feaure Supported details
File extensions pro and pl  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter swipl SWI Prolog https://www.swi-prolog.org/
Build/launch  

swipl -q -L32M -s “$FIRST_SOURCE_FILE”

Launches first prolog file in submitted files.

Other    
_images/prolog_run.png

Running a program written in Prolog programming language

7.26. Python

New in version 2.0.0.

Python logo. By https://www.python.org/ GNU GPL2

Python is an interpreted high-level general-purpose programming language.

Home page https://www.python.org/.

_images/python_example.png

Example of code in Python programming language.

Feaure Supported details
File extensions py  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal Yes  
Debugging Yes

pudb or pdb

pubd https://pypi.org/project/pudb/

pdb https://www.python.org/

Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter python3, python o python2 By default uses first found.
Build/launch   Launches first Python file in submitted files.
Other versions Default, python3 or python2.
_images/python_run.png

Running a console program written in Python programming language

_images/python_run_gui.png

Running a GUI program written in Python programming language

_images/python_debug.png

Debugging with Pudb a program written in Python programming language

7.27. R

New in version 3.0.0.

R logo

R logo [8]

R is a programming language for statistical computing.

Home page https://www.r-project.org/.

_images/r_example.png

Example of code in R programming language.

Feaure Supported details
File extensions r and R  
Syntax highlighter yes  
Text terminal No  
Gui terminal Yes  
Debugging No  
Similarity No  
Automatic evaluation No  
Compiler/Interpreter R  
Build/launch   Launches first R file in submitted files.
Other    
_images/r_run_gui.png

Running a GUI program written in R programming language

7.28. Ruby

New in version 3.0.0.

Ruby logo

Ruby logo [10]

Ruby is a general-purpose interpreted programming language.

Home page https://www.ruby-lang.org/.

_images/ruby_example.png

Example of code in Ruby programming language.

Feaure Supported details
File extensions ruby and rb  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging Yes ruby -rdebug
Similarity No  
Automatic evaluation Yes  
Compiler/Interpreter ruby https://www.ruby-lang.org/
Build/launch   Launches first ruby file in submitted files.
Other    
_images/ruby_run.png

Running a program written in Ruby programming language

_images/ruby_run.png

Debugging a program written in Ruby programming language

7.29. Scala

New in version 2.0.0.

Scala logo

Scala logo [9]

Scala is a general-purpose programming language derived from Java.

Home page http://www.scala-lang.org/.

_images/scala_example.png

Example of code in Scala programming language.

Feaure Supported details
File extensions scala  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter scalac and scala http://www.scala-lang.org/
Build/launch   Launches first scala file in submitted files.
Other    
_images/scala_run.png

Running a program written in Scala programming language

_images/scala_run_gui.png

Running a GUI program written in Scala programming language

7.30. Scheme

New in version 1.0.0.

Scheme is a functional programming language derived from Lisp.

_images/scheme_example.png

Example of code in Scheme programming language.

Feaure Supported details
File extensions scm and s  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter mzscheme https://racket-lang.org/
Build/launch   Launches first Scheme file in submitted files.
Other    
_images/scheme_run.png

Running a program written in Scheme programming language

7.31. Shell

New in version 2.0.0.

VPL uses Bash as Shell script. Bash is the default shell for most Linux distributions.

_images/shell_example.png

Example of code in Shell programming language.

Feaure Supported details
File extensions sh  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity Yes  
Automatic evaluation Yes  
Compiler/Interpreter bash GNU bash
Build/launch   Launches first Shell file in submitted files.
Other    
_images/shell_run.png

Running a program written in Shell programming language

7.32. SQL

VPL uses SQLite as default relational database management system (RDBMS).

SQLite home page https://sqlite.org/.

_images/sql_example.png

Example of code in SQL programming language.

Feaure Supported details
File extensions sql  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation No  
Compiler/Interpreter sqlite3 SQLite https://sqlite.org/
Build/launch  

To populate the DBs the system runs all sql files not in the submission but in “Execution files”.

Then the system runs first SQL file in submitted files.

Other    
_images/sql_run.png

Running a program written in SQL programming language

7.33. TypeScript

Typescript logo

TypeScript is a JavaScript-compatible programming language that adds types to the language.

Home page https://www.typescriptlang.org/.

_images/typescript_example.png

Example of code in TypeScript programming language.

Feaure Supported details
File extensions ts  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation No  
Compiler/Interpreter tsc TypeScript https://www.typescriptlang.org/
Build/launch  

Transcompiles all ts files to js (JavaScript).

Then the system runs first TypeScript file (as JavaScript) in submitted files using nodejs.

Other    
_images/typescript_run.png

Running a program written in TypeScript programming language

7.34. Verilog

Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems.

_images/verilog_example.png

Example of code in Verilog description language.

Feaure Supported details
File extensions v and vh  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation No  
Compiler/Interpreter iverilog Icarus Verilog http://iverilog.icarus.com/
Build/launch   Compiles all v files.
Other    
_images/verilog_run.png

Running a program written in Verilog description language

7.35. VHDL

VHDL is a hardware description language.

_images/vhdl_example.png

Example of code in VHDL description language.

Feaure Supported details
File extensions vhdl and vhd  
Syntax highlighter yes  
Text terminal Yes  
Gui terminal No  
Debugging No  
Similarity No  
Automatic evaluation No  
Compiler/Interpreter gvhdl FreeHDL http://www.freehdl.seul.org/
Build/launch   Compiles all vhdl and vhd files.
Other    

Licences

For more details about VPL, visit the VPL home page or the VPL plugin page at Moodle.