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

Slides:



Advertisements
Similar presentations
ITR3 lecture 7: more introduction to UNIX Thomas Krichel
Advertisements

Test process essentials Riitta Viitamäki,
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Contest format 5 hours, around 8-12 problems One computer running (likely)Linux, plus printer 3 people on one machine No cell phones, calculators, USB.
Program Development Tools The GNU (GNU’s Not Unix) Toolchain The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and.
CSE4251 The Unix Programming Environment
Chapter One The Essence of UNIX.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Unix Systems Administration 1Y. K. Chang Reasons for UNIX’s success 4 Written in high level language –easy to read, understand, change, and move to other.
CS 497C – Introduction to UNIX Lecture 36: - Customizing the Environment Chin-Chih Chang
Revisions If you received the grade: “R” If you received the grade: “R” You must do a revision to receive a grade for lab 2. You must do a revision to.
CS 497C – Introduction to UNIX Lecture 3: Inside UNIX Chin-Chih Chang
EPFL ACM ICPC Qualifiers Program Committee I&C, EPFL.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Linux Commands LINUX COMMANDS.
Prototype & Design Computer Inputs. How to Prototype & Design Computer Inputs Step 1: Review Input Requirements Step 2: Select the GUI Controls Step 3:
Scripting on Linux Origins of scripting languages Learning scripting languages A simple example of a shell script A script with a loop and debugging Processing.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX – Shell Programming The activities of.
Linux Shells Dr. Michael L. Collard 1.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
Advanced File Processing
1 AutoBash: Improving Configuration Management with Operating System Causality Analysis Ya-Yunn Su, Mona Attariyan, and Jason Flinn University of Michigan.
8 Shell Programming Mauro Jaskelioff. Introduction Environment variables –How to use and assign them –Your PATH variable Introduction to shell programming.
Chapter 6: Shell Programming
Operating systém GNU Linux. History First computers –WW II The Bomb (Alan Turing) Colosus (Thomas Flowers)
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
GNU Compiler Collection (GCC) and GNU C compiler (gcc) tools used to compile programs in Linux.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Essential Shell Programming by Prof. Shylaja S S Head of the Dept. Dept. of Information Science & Engineering, P.E.S Institute of Technology, Bangalore
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
LINUX programming 1. INDEX UNIT-III PPT SLIDES Srl. No. Module as per Session planner Lecture No. PPT Slide No. 1.Problem solving approaches in Unix,Using.
Module 6 – Redirections, Pipes and Power Tools.. STDin 0 STDout 1 STDerr 2 Redirections.
Chapter 2: Linux & POSIX “She sells bash shells by the C shore”
WEEK 6 Jeongmin Lee 1. Goal  Having experience with Regular Expressions  Develop a program that checks user input that is course number of CS dept.
UNIX/LINUX SHELLS.  “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Searching and Sorting. Why Use Data Files? There are many cases where the input to the program may come from a data file.Using data files in your programs.
Unix – Linux CS3353 Ssystem Administration. OS The Operating System – Acts as the interface to all software, hardware, and users of a computer. – Requires.
Agenda Introduction to Shell Scripts Purpose of Shell Scripts
Chapter Six Introduction to Shell Script Programming.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Programming Errors. Errors of different types Syntax errors – easiest to fix, found by compiler or interpreter Semantic errors – logic errors, found by.
CSCI 330 UNIX and Network Programming Unit III Shell, Part 1.
Introduction to UNIX CS465. What is UNIX? (1) UNIX is an Operating System (OS). An operating system is a control program that allocates the computer's.
Unix Advanced Shells Chapter 10. Unix Shells u Command Line Interpreter –once logged in, login gives control to a shell –it prompts for input, then parses,
1 Lecture 7 Introduction to Shell Scripts COP 3353 Introduction to UNIX.
Bash Jerome Lewis Kelly Benson Andrew Kimble. Overview  Shell Language (UNIX based)  Paradigms – Command, Scripting  Has ability to read straight from.
DAY 20: ACCESS CHAPTERS 5, 6, 7 Larry Reaves October 28,
1 Project 12: Cars from File. This is an extension of Project 11, Car Class You may use the posted solution for Project 11 as a starting point for this.
Implementation of a simple shell, xssh
Development Environment
SUSE Linux Enterprise Desktop Administration
Implementation of a simple shell, xssh (Section 1 version)
Entry Ticket: Algorithms and Program Construction
Implementation of a simple shell, xssh
UNIX System Overview.
John Carelli, Instructor Kutztown University
Shell Commands Using BASH Copyright © 2017 Curt Hill.
Guide To UNIX Using Linux Third Edition
Atelier Progress Report
Understanding Linux and the BASH shell v
Linux Shell Script Programming
Week 1 – Lesson 2: Creating Shell Scripts, Linux Commands
Linux Commands LINUX COMMANDS.
Introduction to Operating Systems
Essential Shell Programming
Presentation transcript:

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.

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

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)

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

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)

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"

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

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"