3460:480/580 Software Engineering Spring 2015

Section 001 15389/15390

Tuesday and Thursday 12:15 - 1:30 pm Kolbe Hall (KO) 214

Schedule/Calendar

Instructor

Dr. Michael L. Collard (Schedule)
collard@uakron.edu

News Atom Feed link

Project 3: TDD # Posted: Thursday, Mar 19

Due Thursday, Apr 2

The following assignment is due Thursday, Apr 2.

Note: The Subversion repository is not posted yet. I will remove this note once it is.

srcML is an XML format for source code. It wraps the text parts of your code with XML elements, and makes it easy to identify lexical and syntactic of code. It has its own C/C++/Java/C# parser, and handles code fragments (partial code) and code that will not compile. It is fast, efficient, and robust, thus making it scalable to very large systems, i.e., the entire Linux kernel. It is used by many software engineering researchers and by industry. Since it was created, the srcML project has received a total of $1 million in grant (NSF, Industry) funding.

The CLI program srcml allows the conversion of source code to the srcML format. In that program the function request_srcml() is unfinished. The problem is determining the language (programming language) and the value of the attribute filename. The rules for determining these are:

  • The local_filename is the name of the file on the disk. For a source-code archive (e.g., file.tar.gz, file.zip, etc.) the entry_filename is used instead.
  • For a non source code archive, e.g., file.cpp, the entry_filename would have the value “data”, and the local_filename should be used.
  • The filename can be explicitly given as an option (option_filename), and this trumps all other possible filenames
  • The language can be based on the file extension, e.g., C++ is mapped to .cpp and .hpp. The provided function get_language_from_filename() already does this mapping.
  • The language can be explicitly given as an option (option_language) and this trumps all other language settings.
  • When the input is from stdin (i.e., standard input, e.g., std::cin), then the local_filename will have the value “-”. In that case, the option_filename and entry_filename will have to be used. Note that if the entry_filename is not valid (i.e, has the value “data”) for a non source code archive, then the option_filename must be used. If the option_filename has the value "", then the resulting filename is blank, and the language is based on the option_language.

Non-Functional Requirements: Error Handling

  • If the filename extension is used to determine the language, and there is no mapping for that language, output the error message “Extension not supported”
  • When the input is from stdin (i.e., std::cin) and a language cannot be determined, output the error message “Using stdin requires a declared language”
  • All error messages are written to standard error (i.e., std::cerr), and the function should return the boolean value false

Rules

  • The code you have to complete is in the function request_srcml() and in the test program request_srcml_t.cpp.
  • You are not allowed to create any new functions, or use anything besides the given code. You can alter the Makefile
  • The code can be found in your folder in the repository. The repository for the class is at https://dev.cs.uakron.edu/svn/cs480S15. First, find your folder in a browser, then copy the URL and use that to checkout with svn
  • You are to follow a Test Driven Development (TDD) approach. Each commit must contain an understandable commit message

SE TDD Example # Posted: Tuesday, Mar 10

Posted in solitary Subversion repository

Posted in solitary Subversion repository. Available from the link of this news item.

Archive

Information