Basics of Running Moss

This page shows the basic steps for running Moss. Your course may have scripts that combine these steps.

Step 1: Put files somewhere in the course account

Put the files that Moss should check somewhere in the course account. Contact CSCF if you don't have access to the course account. Place the files in a folder that contains a folder for each student, like this:

files_to_check
 |- yc2lee
 |   |- helper.cc
 |   |- mycode.cc
 |- omnafees
 |   |- mycode.cc
 |- fhgunn
 |   |- test.cc
 |   |- main.cc

Do not include any files that you do not want Moss to check, such as automated testing results and .svn/.git folders. Moss will compare files even if the filenames are different.

Step 2: Run Moss

SSH into your course account on linux.student.cs.uwaterloo.ca.

Run Moss using the RunMoss script. Example:

yes O | /u/isg/bin/runMoss -d path/to/files_to_check '-l ascii'

Replace path/to/files_to_check with the path to the folder you made in Step 1. The yes O tells runMoss to process folders for students that aren't enrolled in your class; if you leave it out, you'll get a prompt for any folders that aren't for a student in your class.

The '-l ascii' part contains extra options for Moss. Put these extra options inside a pair of quotes. Extra options include:

  • -l language: Specifies the language. It's recommended you try the ascii language, and also try the actual language of your assignment if available. Language options include: c, cc, java, python and more in moss.pl below
  • -b path/to/basefile: Specifies a base file. Moss will try to ignore checking code that's in the basefile. You can have multiple -b for multiple basefiles.
  • -m N: The -m option sets the maximum number of times a given passage may appear before it is ignored. A passage of code that appears in many programs is probably legitimate sharing and not the result of plagiarism. For assignments with short solutions, you may want to experiment with -m 3 or -m 4. With -m 1000000 (or any very large number), moss reports all matches, no matter how often they appear.

More details on the extra options are in the file /u/cs_build/moss/moss.pl.

If you see an error like runMoss_impl: command not found then your course account doesn't have access to the Moss scripts. Please contact CSCF with your course's name to get access.

Step 3: Check Moss results

RunMoss will create a folder called html. Go in and open index.html in a web browser to view the results. Instructions on mounting course accounts is on WebHome, accessing course accounts section.

Optional: If you find the results hard to read, you can run MossMakeReadable on the index.html:

/u/isg/bin/moss_makereadable index.html 15 > readable.html

This command will create a file readable.html with some nicer formatting. The optional 15 makes it only show pairs where at least one student matches 15% or more.

Some caveats:

  • Moss is not perfect. It can't catch all cheaters, nor is every case caught actually a cheating case. Think of Moss as an aid rather than a perfect tool. Someone on your course must manually review the cases.
  • Moss was created by Standford, who gave UW CS the Moss executable at /u/cs_build/moss/moss. Nothing is sent to Standford's server when Moss is run. Moss is closed sourced, and CSCF cannot modify it or reverse engineer it, although the research paper is available.
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2021-12-16 - YiLee
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback