Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project: automated program tester for programs submitted to an ACM-like programming contest General Idea: When a program is submitted to the contest, a.

Similar presentations


Presentation on theme: "Project: automated program tester for programs submitted to an ACM-like programming contest General Idea: When a program is submitted to the contest, a."— Presentation transcript:

1 Project: automated program tester for programs submitted to an ACM-like programming contest General Idea: When a program is submitted to the contest, a judge, etc. runs the tester for the submitted file. If the program is correct, it is accepted; if not, it is rejected.

2 What is "correct"? ► Illegal keywords ► Compiling errors ► Incorrect output Reasons for rejecting a program ► Output must match exactly with expected output

3 What the tester has to do: ► Determine file type ► Determine which problem it's testing ► Search for illegal keywords ► Compile program ► Run program with supplied input ► Write output to a file ► Compare submission's output file with correct output file ► Give a result of accepted or rejected (with reason)

4 What the tester needs: ► Way of handling each file type allowed ► Illegal keywords (for each problem) ► Correct output (for each problem) ► Assumption is that submissions will consist of only one file

5 How it works: ► Asks for submission file ► Asks for problem number ► Determines file type (using "extension" program) ► Compiles according to file type ► Searches for illegal keywords based on file type and problem number (using grep) ► Runs program with supplied input ► Writes output to a file ► Compares submission output to correct output (using diff)

6 Results: ► If the program doesn't compile: "Compiler error; rejected file“ ► If the program contains illegal keywords: "Illegal keyword; rejected file“ ► If the program gives incorrect output: "Incorrect output; rejected file“ ► If the program gives correct output: "Correct output; accepted file"

7 What the user (judge, etc.) has to do: ► Input location of submission file ► Input problem number ► Record result of test in database

8 Language used: bash ► From Wikipedia entry: ► "bash is a Unix shell written for the GNU Project. Its name is an acronym for Bourne-again shell — a pun ("Bourne again" / "born again") on the name of the Bourne shell (sh), an early, important Unix shell written by Stephen Bourne..." ► "bash is the default shell on most Linux systems"


Download ppt "Project: automated program tester for programs submitted to an ACM-like programming contest General Idea: When a program is submitted to the contest, a."

Similar presentations


Ads by Google