package moss

  1. Overview
  2. Docs
Module type
Class type

Client for the MOSS plagiarism detection service.

  • version 0.1.1
type lang =
  1. | C
  2. | CC
  3. | Java
  4. | Ml
  5. | Pascal
  6. | Ada
  7. | Lisp
  8. | Scheme
  9. | Haskell
  10. | Fortran
  11. | Ascii
  12. | Vhdl
  13. | Perl
  14. | Matlab
  15. | Python
  16. | Mips
  17. | Prolog
  18. | Spice
  19. | VB
  20. | Csharp
  21. | Modula2
  22. | A8086
  23. | Javascript
  24. | Plsql

Source language of programs being tested.

val set_userid : string -> unit

set_userid id the the default user ID. Use the one that was sent to you when you asked for an account. The default userid is set from the environment variable MOSS_USERID or else is "0".

val get_userid : unit -> string

Return the default userid.

module File : sig ... end

Representation of "files", what is their name, how to access their content.

val submit : ?userid:string -> ?experimental:bool -> ?comment:string -> ?by_dir:bool -> ?max_rep:int -> ?n:int -> lang -> ?base:File.t list -> File.t list -> Uri.t

submit lang files submit the files and return the result from MOSS. If the data from any File.t is no longer available,

  • parameter base

    Moss normally reports all code that matches in pairs of files. When base files are supplied, program code that also appears in any base file is not counted in matches. A typical base file will include, for example, the instructor-supplied code for an assignment. You should use base files if it is convenient; base files improve results, but are not usually necessary for obtaining useful information.

  • parameter by_dir

    specifies that submissions are by directory, not by file. That is, files in a directory are taken to be part of the same program, and reported matches are organized accordingly by directory. The directory consists in the path leading to the file as given by Filename.dirname, i.e., "d/e/file1" and "d/f/file2" are considered to belong to different programs. Default: false.

  • parameter n

    determines the number of matching files to show in the results. The default is 250.

  • parameter max_rep

    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. With ~max_rep, any passage appearing in more than max_rep programs is treated as if it appeared in a base file (i.e., it is never reported). With ~max_rep:2, moss reports only passages that appear in exactly two programs. If one expects many very similar solutions (e.g., the short first assignments typical of introductory programming courses) then using ~max_rep:3 or ~max_rep:4 is a good way to eliminate all but truly unusual matches between programs while still being able to detect 3-way or 4-way plagiarism. With ~max_rep:1000000 (or any very large number), moss reports all matches, no matter how often they appear. The ~max_rep setting is most useful for large assignments where one also a base file expected to hold all legitimately shared code. The default for ~max_rep is 10.

  • parameter experimental

    sends queries to the current experimental version of the server. The experimental server has the most recent Moss features and is also usually less stable (read: may have more bugs). Default: false.

  • parameter userid

    override the default userid (see set_userid).