Misplaced Pages

PC²

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

PC² is the Programming Contest Control System developed at California State University, Sacramento in support of Computer Programming Contest activities of the ACM , and in particular the ACM International Collegiate Programming Contest . It was used to conduct the ACM ICPC World Finals in 1990 and from 1994 through 2009. In 2010, the ACM ICPC World Finals switched to using Kattis, the KTH automated teaching tool; however, PC continues to be used for a large number of ICPC Regional Contests around the world.

#979020

34-416: Computer programming contest have rules and methods for judging submissions. The following describes in a general way a contest where PC is used. A computer programming contest is a competition where teams submit (computer program) solutions to judges. The teams are given a set of problems to solve in a limited amount of time (for example 8-13 problems in 5 hours). The judges then give pass/fail judgements to

68-447: A connect() request. Connection requests up to this limit will succeed. If the backlog value passed in exceeds the default maximum, then the maximum value is used. After opening a listen channel, the server enters an infinite loop . Inside the loop is a system call to accept() , which puts itself to sleep. The accept() system call will return a file descriptor when a client process executes connect() . Snippet to accept

102-415: A POSIX standard in 2000. The application programming interface has been ported to virtually every Unix implementation and most other operating systems. Both the server and the client must instantiate a socket object by executing the socket() system call . Its usage is: The domain parameter should be one of the following common ranges of communication : The Unix domain socket label

136-504: A listen channel, and then continuously loops . Inside the loop, the server process is put to sleep while waiting to accept a client connection. Upon accepting a client connection, the server then executes a read system call that will block wait . The client connects to the server's socket via the server's address . The client process then writes a message for the server process to read. The application's algorithm may entail multiple read/write interactions. Upon completion of

170-418: A connection: When accept() returns a positive integer, the server engages in an algorithmic dialog with the client. Stream socket input/output may execute the regular-file system calls of read() and write() . However, more control is available if a stream socket executes the socket-specific system calls of send() and recv() . Alternatively, datagram socket input/output should execute

204-404: A name to the address parameter needed to bind the socket's connection. For a Unix domain socket , the name is a / path / filename . For an Internet domain socket , the name is an IP address : Port number . In either case, the name is called an address . Two processes may communicate with each other if each obtains a socket. The server process binds its socket to an address , opens

238-438: A previous result that is known to be good, without any knowledge of the test object's internal structure. Typical black-box test design techniques include decision table testing, all-pairs testing , equivalence partitioning , boundary value analysis , cause–effect graph , error guessing , state transition testing, use case testing, user story testing, domain analysis , and syntax testing. Test coverage refers to

272-443: A walk in a dark labyrinth without a flashlight." Because they do not examine the source code, there are situations when a tester writes many test cases to check something that could have been tested by only one test case or leaves some parts of the program untested. Internet socket In client-server computing , a Unix domain socket is a Berkeley socket that allows data to be exchanged between two processes executing on

306-428: A way to request team solutions (from a PC server) run/execute the solution and enter a judgment. The PC scoreboard module computes and creates standings and statistics web pages ( HTML / XML ). PC is easy to install on Linux /Linux-like systems and MS Windows and does not require super-user (root) access to install it or use it: this makes it an attractive choice for users who may not have super-user access. PC

340-442: Is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied virtually to every level of software testing: unit , integration , system and acceptance . Black-box testing is also used as a method in penetration testing , where an ethical hacker simulates an external hacking or cyber warfare attack with no knowledge of

374-419: Is a pointer to struct sockaddr . However, the parameter passed to the function is the address of a struct sockaddr_un . struct sockaddr is a generic structure that is not used. It is defined in the formal parameter declaration for bind() . Because each range of communication has its own actual parameter , this generic structure was created as a cast placeholder. After binding to an address,

SECTION 10

#1732851752980

408-436: Is used when the domain parameter's value is AF_UNIX . The Internet domain socket label is used when the domain parameter's value is either AF_INET or AF_INET6 . The type parameter should be one of two common socket types: stream or datagram. A third socket type is available for experimental design: raw. For a Unix domain socket , data ( network packets ) are passed between two connected processes via

442-442: The close() system call: Snippet to close a connection: Snippet to illustrate the end of a dialog: Computer program for the client to instantiate and connect a socket: If connect() returns zero, the client can engage in an algorithmic dialog with the server. The client may send stream data via write( client_socket_fd ) and may receive stream data via read( client_socket_fd ) . Snippet to illustrate client I/O on

476-537: The PC development team has quickly responded to questions and help with any issues that came up. PC has been in use by the ACM Mid-Atlantic Programming Contest for several years. In earlier years, systems administrators had limited success with the program due to its distributed nature. Each of the contest sites ran a PC server which needed to initiate and accept Java RMI . Using a central datacenter in

510-458: The transport layer — either TCP or UDP. For an Internet domain socket , data are passed between two connected processes via the transport layer and the Internet Protocol (IP) of the network layer — either TCP/IP or UDP/IP. The protocol parameter should be set to zero for stream and datagram sockets. For raw sockets, the protocol parameter should be set to IPPROTO_RAW. Like

544-725: The Regional Contests are fed by sub-regional contests, all of which also use PC . The winners at each Regional Contest advance to the ACPC Championship, which also uses PC . ACPC also sponsors a variety of additional contests, including "ACPC Kickoff", "ACPC for Girls", "ACPC for Teens", and "ACPC for Seniors"; again, all of these contests also use PC . The ICPC (formerly ACM) Greater New York Regional Programming Contest in North America has been using PC for over 20 years. Greater New York has used PC many different ways over

578-654: The U.S. It remains today the single most widely used Contest Control System for ICPC Regional Contests. PC has been used by the Africa and Arabia Collegiate Programming Contest (ACPC) every year since its inception more than 25 years ago. ACPC comprises a set of Regional Contests, including the separate Saudi, Nigerian, Oman, South Africa, Togolese, Moroccan, Kuwait, Algerian, Jordanian, Palestinian, Qatar, Beninese, Egyptian, Lebanese, Ethiopian, Tunisian, Bahrain, Sudanese, Syrian, and Angolan Collegiate Programming Contests. Every one of these Regional/National Contests uses PC ; many of

612-510: The algorithm, the client executes exit() and the server executes close() . For a Unix domain socket , the socket's address is a /path/filename identifier. The server will create /path/filename on the filesystem to act as a lock file semaphore . No I/O occurs on this file when the client and server send messages to each other. Sockets first appeared in Berkeley Software Distribution 4.2 (1983). It became

646-409: The application is supposed to do. Test cases are generally derived from external descriptions of the software, including specifications, requirements and design parameters. Although the tests used are primarily functional in nature, non-functional tests may also be used. The test designer selects both valid and invalid inputs and determines the correct output, often with the help of a test oracle or

680-449: The application's code, internal structure and programming knowledge in general is not required. The tester is aware of what the software is supposed to do but is not aware of how it does it. For instance, the tester is aware that a particular input returns a certain, invariable output but is not aware of how the software produces the output in the first place. Test cases are built around specifications and requirements , i.e., what

714-500: The contest. Because of these incidents, organizers of the region are now considering moving to an alternative system, such as Kattis, which is the official system used by ACM for the ICPC World Finals. With the introduction of version 9 ( socket -based version) delays, most firewall issues with version 8 have been addressed. Black box testing Black-box testing, sometimes referred to as specification-based testing ,

SECTION 20

#1732851752980

748-449: The fall of 2005 revealed no problems. In 2014, PC crashed 3:45h into the contest, preventing teams from obtaining receipts for their submissions. Judges were unable to retrieve submissions - the contest ended without announcing a winner. It took one week to try to recover those submissions. A similar failure occurred in 2016. System administrators had decided to deploy a web add-on to PC which then failed under load. The contest start time

782-454: The given requirements. Black-box testing may be necessary to assure correct functionality, but it is insufficient to guard against complex or high-risk situations. An advantage of the black box technique is that no programming knowledge is required. Whatever biases the programmers may have had, the tester likely has a different set and may emphasize different areas of functionality. On the other hand, black-box testing has been said to be "like

816-476: The percentage of software requirements that are tested by black-box testing for a system or application. This is in contrast with code coverage , which examines the inner workings of a program and measures the degree to which the source code of a program is executed when a test suite is run. Measuring test coverage makes it possible to quickly detect and eliminate defects, to create a more comprehensive test suite . and to remove tests that are not relevant for

850-408: The regular-file open() system call, the socket() system call returns a file descriptor . The return value's suffix _fd stands for file descriptor . After instantiating a new socket, the server binds the socket to an address. For a Unix domain socket , the address is a /path/filename . Because the socket address may be either a /path/filename or an IP_address:Port_number ,

884-410: The same Unix or Unix-like host computer. This is similar to an Internet domain socket that allows data to be exchanged between two processes executing on different host computers. Regardless of the range of communication (same host or different host), Unix computer programs that perform socket communication are similar. The only range of communication difference is the method to convert

918-404: The server opens a listen channel to a port by executing listen() . Its usage is: Snippet to listen: For a Unix domain socket , listen() most likely will succeed and return 0 . For an Internet domain socket , if the port is in use, listen() returns -1 . The backlog parameter sets the queue size for pending connections. The server may be busy when a client executes

952-422: The socket application programming interface requires the address to first be set into a structure. For a Unix domain socket , the structure is: The _un suffix stands for unix . For an Internet domain socket , the suffix will be either _in or _in6 . The sun_ prefix stands for socket unix . Computer program to create and bind a stream Unix domain socket : The second parameter for bind()

986-414: The socket-specific system calls of sendto() and recvfrom() . For a basic stream socket, the server receives data with read( accept_socket_fd ) and sends data with write( accept_socket_fd ) . Snippet to illustrate I/O on a basic stream socket: The algorithmic dialog ends when either the algorithm concludes or read( accept_socket_fd ) returns < 1 . To close the connection, execute

1020-446: The submitted solutions. Team rankings are computed based on the solutions, when the solutions were submitted and how many attempts were made to solve the problem. The judges test in a Black box testing where the teams do not have access to the judges' test data. PC manages single or multi-site programming contests. It provides a team a way to log in, test solutions, submit solutions and view judgements from judges. PC provides judges

1054-423: The system being attacked. Specification-based testing aims to test the functionality of software according to the applicable requirements. This level of testing usually requires thorough test cases to be provided to the tester, who then can simply verify that for a given input, the output value (or behavior), either "is" or "is not" the same as the expected value specified in the test case. Specific knowledge of

PC² - Misplaced Pages Continue

1088-532: The years including single site, multi-site and the Web-based team client. The judges in the Greater New York region prefer PC over other Contest Control Systems since it gives them the greatest flexibility in judging contestant submissions. Submissions may be judged manually or using computer auto-judging. Often, the judges prefer to judge some problems manually, and PC provides this capability. In addition,

1122-407: Was delayed by 90 minutes. Teams were unable to submit problems and the contest director scrambled to find a work-around that let teams save problems with a time stamp to be considered later. In 2013, system operators failed to enter the correct team names, leaving teams without information about the standings in the contest (the scoreboard). System operators were unable to correct the team names during

1156-665: Was used for the ACM International Collegiate Programming Contest World Finals from 1994 to 2009. It has also been used in hundreds of ICPC Regional Contests around the world. It has been used continuously by the ACM Pacific Northwest Regional Contest since 1989, as well as by many other ICPC Regional Contests including the Africa and Arabia Regional Contests, numerous Regional Contests in Asia, and several Regional Contests in

#979020