@@ -57,12 +57,12 @@ class Communication(TaskType):
5757
5858 The task type will run *manager*, an admin-provided executable, and one or
5959 more instances of the user solution, optionally compiled together with a
60- language-specific stub .
60+ language-specific grader .
6161
6262 During the evaluation, the manager and each of the user processes
6363 communicate via FIFOs. The manager will read the input, send it (possibly
6464 with some modifications) to the user process(es). The user processes, either
65- via functions provided by the stub or by themselves, will communicate with
65+ via functions provided by the grader or by themselves, will communicate with
6666 the manager. Finally, the manager will decide outcome and text, and print
6767 them on stdout and stderr.
6868
@@ -82,9 +82,9 @@ class Communication(TaskType):
8282 """
8383 # Filename of the manager (the stand-alone, admin-provided program).
8484 MANAGER_FILENAME = "manager"
85- # Basename of the stub , used in the stub filename and as the main class in
86- # languages that require us to specify it.
87- STUB_BASENAME = "stub "
85+ # Basename of the grader , used in the grader filename and as the main class
86+ # in languages that require us to specify it.
87+ GRADER_BASENAME = "grader "
8888 # Filename of the input in the manager sandbox. The content will be
8989 # redirected to stdin, and managers should read from there.
9090 INPUT_FILENAME = "input.txt"
@@ -94,7 +94,7 @@ class Communication(TaskType):
9494
9595 # Constants used in the parameter definition.
9696 COMPILATION_ALONE = "alone"
97- COMPILATION_STUB = "stub "
97+ COMPILATION_GRADER = "grader "
9898 USER_IO_STD = "std_io"
9999 USER_IO_FIFOS = "fifo_io"
100100
@@ -110,7 +110,7 @@ class Communication(TaskType):
110110 "compilation" ,
111111 "" ,
112112 {COMPILATION_ALONE : "Submissions are self-sufficient" ,
113- COMPILATION_STUB : "Submissions are compiled with a stub " })
113+ COMPILATION_GRADER : "Submissions are compiled with a grader " })
114114
115115 _USER_IO = ParameterTypeChoice (
116116 "User I/O" ,
@@ -137,14 +137,14 @@ def __init__(self, parameters):
137137 def get_compilation_commands (self , submission_format ):
138138 """See TaskType.get_compilation_commands."""
139139 codenames_to_compile = []
140- if self ._uses_stub ():
141- codenames_to_compile .append (self .STUB_BASENAME + ".%l" )
140+ if self ._uses_grader ():
141+ codenames_to_compile .append (self .GRADER_BASENAME + ".%l" )
142142 codenames_to_compile .extend (submission_format )
143143 res = dict ()
144144 for language in LANGUAGES :
145145 source_ext = language .source_extension
146146 executable_filename = self ._executable_filename (submission_format ,
147- language )
147+ language )
148148 res [language .name ] = language .get_compilation_commands (
149149 [codename .replace (".%l" , source_ext )
150150 for codename in codenames_to_compile ],
@@ -153,17 +153,17 @@ def get_compilation_commands(self, submission_format):
153153
154154 def get_user_managers (self ):
155155 """See TaskType.get_user_managers."""
156- if self ._uses_stub ():
157- return [self .STUB_BASENAME + ".%l" ]
156+ if self ._uses_grader ():
157+ return [self .GRADER_BASENAME + ".%l" ]
158158 else :
159159 return []
160160
161161 def get_auto_managers (self ):
162162 """See TaskType.get_auto_managers."""
163163 return [self .MANAGER_FILENAME ]
164164
165- def _uses_stub (self ) -> bool :
166- return self .compilation == self .COMPILATION_STUB
165+ def _uses_grader (self ) -> bool :
166+ return self .compilation == self .COMPILATION_GRADER
167167
168168 def _uses_fifos (self ) -> bool :
169169 return self .io == self .USER_IO_FIFOS
@@ -180,7 +180,7 @@ def _executable_filename(codenames: Iterable[str], language: Language) -> str:
180180
181181 """
182182 name = "_" .join (sorted (codename .replace (".%l" , "" )
183- for codename in codenames ))
183+ for codename in codenames ))
184184 return name + language .executable_extension
185185
186186 def compile (self , job : CompilationJob , file_cacher : FileCacher ):
@@ -195,14 +195,14 @@ def compile(self, job: CompilationJob, file_cacher: FileCacher):
195195 # compilation command.
196196 filenames_to_compile = []
197197 filenames_and_digests_to_get = {}
198- # The stub , that must have been provided (copy and add to compilation).
199- if self ._uses_stub ():
200- stub_filename = self .STUB_BASENAME + source_ext
201- if not check_manager_present (job , stub_filename ):
198+ # The grader , that must have been provided (copy and add to compilation).
199+ if self ._uses_grader ():
200+ grader_filename = self .GRADER_BASENAME + source_ext
201+ if not check_manager_present (job , grader_filename ):
202202 return
203- filenames_to_compile .append (stub_filename )
204- filenames_and_digests_to_get [stub_filename ] = \
205- job .managers [stub_filename ].digest
203+ filenames_to_compile .append (grader_filename )
204+ filenames_and_digests_to_get [grader_filename ] = \
205+ job .managers [grader_filename ].digest
206206 # User's submitted file(s) (copy and add to compilation).
207207 for codename , file_ in job .files .items ():
208208 filename = codename .replace (".%l" , source_ext )
@@ -335,9 +335,9 @@ def evaluate(self, job: EvaluationJob, file_cacher: FileCacher):
335335 # but it's only bool if wait=True, which it isn't here.
336336 manager = typing .cast (subprocess .Popen , manager_ )
337337
338- # Start the user submissions compiled with the stub .
338+ # Start the user submissions compiled with the grader .
339339 language = get_language (job .language )
340- main = self .STUB_BASENAME if self ._uses_stub () \
340+ main = self .GRADER_BASENAME if self ._uses_grader () \
341341 else os .path .splitext (executable_filename )[0 ]
342342 processes : list [subprocess .Popen ] = [None for i in indices ]
343343 for i in indices :
0 commit comments