CS:4980:1, Compiler Construction
Fall 2016 Subversion
The subversion repository for the compiler construction course is on the
College of Liberal Arts and Sciences Linux server cluster.
Any U of I student should be able to create an account simply by logging
in using their HawkID and the same password you use to access other
University of Iowa on-line services. See:
The preferred way to use the CLAS servers is via FastX, a web-based portal
that should give you access to a Linux desktop from any web browser.
For instructions, see:
To make a FastX connection, use:
The software development environment on the CLAS Linux systems is not fully compatable with the environment on the Raspberry PI because the compiler defaults for the two are different. Carefully written code that avoids use of machine dependent data types such as int and float will be fully portable.
In this class, most of our development will be done using the textual command-line shell. As a result, we will emphasize the command-line interface to Subversion and command-line editing tools. There are GUI-based interfaces to Subersion that should be comfortable to novices more accustomed to the desktop drag-and-drop environment, but reliance on these is likely to be a problem, particularly if you find yourself moving back and forth between Linux on the one hand and Windows and Mac systems, on the other.
If you are unfamiliar with the Unix (and Linux and Mac) command line, this
brief introduction to Unix may be helpful; it includes a list of the most
common commands you will need to use:
Most Unix (and Linux) system programmers use one of two editors vi
or emacs. Neither is particularly friendly to novices, with rather
steep learning curves, but they are very powerful and, unlike mouse-based
editors, they can be very fast because your fingers never leave the keyboard.
There are huge documents purporting to be introductory tutorials for the use
of these editors, but if you are a raw beginner, this short introduction
might be a useful place to start with vi:
We will be using Subversion, an open-source revision control system, for collaborative programming. The first thing to do is see if subversion is installed on whatever system you are using. To do this, type the svn command on the Unix or Linux command line. If it is installed, you should see something like this:
prompt$ svn Type 'svn help' for usage. prompt$
Subversion is already installed on the CLAS Linux system. Once it is installed, take that advice and see what help it offers. Some of its help is actually useful, although you may find that you have to scroll back through quite a volume of helpful text to find what you wanted.
If Subversion is not installed, for example on your own Linux box, including your Raspberry Pi, and assuming that you have superuser privileges on the Linux system where you are installing it, use this command:
prompt$ sudo apt-get install subversion
The sudo command says "run the rest of the command line as a command with superuser privileges." If superuser status has a password on your machine (some users of genuinely personal computers opt not to set passwords, preferring to use physical control of their machine as the only protection), the sudo command will ask for it before it continues.
The apt-get command gets software from the on-line repository for software maintained by the developers of your Linux system. It is used to install, update or upgrade your system. In this case, we are using it to install a package that was not previously installed.
A subversion repository for our class has been created at this URL:
Do not use that as a web address -- subversion uses the same HTTP protocols used for access to web pages, but it uses them in a very different way for uploading and downloading material. As a result, this is most definitely not the URL of a web site despite the fact that it looks like one.
After you have made sure that Subversion is installed on your machine, type this command, exactly as written except that you should substitute you HawkID for the text HAWKID here.
svn checkout --username HAWKID https://svn.divms.uiowa.edu/repos/cs4980
This will work without the --username HAWKID option if you are working on a machine where you have already set up your account using your HawkID as a user name. This is automatically true if you are connecting to Subversion from a departmental server. If you are on your own Linux system (say, a Raspberry), you have the option of setting up things so you log in using your HawkID.
On typing this command, Subversion will prompt you for your password. Use the same password you use for signing onto the CLAS Linux cluster. Usually, this is your HawkID password (but you can make it different). Once authenticated, Subversion will create a new directory in your home directory (assuming that was the current directory) called cs4980. As soon as I get things set up, that directory will contain a file called README, but we will add subdirectorys for each group, where each group's subdirectory will be the root directory for that group's project.