Difference between revisions of "System.yaml"

From PC2wiki
Jump to: navigation, search
m (Languages section: added key table)
m (Example: add pc2 example)
Line 31: Line 31:
 
|}
 
|}
  
==Example==
+
== CLICS Example==
 
  #
 
  #
 
  # File:    system.yaml
 
  # File:    system.yaml
Line 72: Line 72:
 
     compiler-args: -m py_compile {files}
 
     compiler-args: -m py_compile {files}
 
     runner: /usr/bin/python3
 
     runner: /usr/bin/python3
 +
 +
== PC^2 Example
 +
 +
languages:
 +
 +
  - name: 'Java'
 +
    active: true
 +
    compilerCmd: 'javac {:mainfile}'
 +
    exemask: '{:basename}.class'
 +
    execCmd: 'java {:basename}'
 +
    runner: 'java'
 +
    runner-args: '{:basename}'
 +
    interpretedfalse
 +
    use-judge-cmd: true
 +
    judge-exec-cmd: 'java {:basename}'

Revision as of 17:12, 27 June 2017

The system.yaml file contains language definitions, clar categories, etc.

Key and Names

system.yaml keys
Key Description
default-clars Sequence of pre-defined clarification answers. The first will be pre-selected
clar-categories Sequence of categories for clarifications.

Languages section

language keys
Key Description Example
name Language Name Java
compiler Compiler name /usr/bin/javac
compiler-args Compiler arguments -encoding UTF-8 -sourcepath . -d . {files}
runner Executable runner /usr/bin/java
runner-args Execution arguments -XX:+UseSerialGC -Xss64m -Xms1920m -Xmx1920m

CLICS Example

#
# File:     system.yaml
# Purpose:  System settings
#

event-feed-port:   4713

default-clars:
  - No comment, read problem statement.

clar-categories:
  - Unassigned
  - Judges
  - SysOps
  - Operations

languages:
 - name: Java
   compiler: /usr/bin/javac
   compiler-args: -encoding UTF-8 -sourcepath . -d . {files}
   runner: /usr/bin/java
   runner-args: -XX:+UseSerialGC -Xss64m -Xms1920m -Xmx1920m

 - name: C++
   compiler: /usr/bin/g++
   compiler-args: -g -O2 -std=gnu++14 -static {files}

 - name: C
   compiler: /usr/bin/gcc
   compiler-args: -g -O2 -std=gnu11 -static {files} -lm

 - name: Python 2
   compiler: /usr/bin/python2
   compiler-args: -m py_compile {files}
   runner: /usr/bin/pypy

 - name: Python 3
   compiler: /usr/bin/python3
   compiler-args: -m py_compile {files}
   runner: /usr/bin/python3

== PC^2 Example

languages:

 - name: 'Java'
   active: true
   compilerCmd: 'javac {:mainfile}'
   exemask: '{:basename}.class'
   execCmd: 'java {:basename}'
   runner: 'java'
   runner-args: '{:basename}'
   interpretedfalse
   use-judge-cmd: true
   judge-exec-cmd: 'java {:basename}'