The cl-moss Reference Manual
Table of Contents
The cl-moss Reference Manual
This is the cl-moss Reference Manual,
generated automatically by Declt version 2.4 "Will Decker"
on Wed Jun 20 11:15:33 2018 GMT+0.
1 Introduction
CL-MOSS
About
This is a Common Lisp utility for submitting code to Stanford's MOSS (Measure Of Software Similarity) software similarity detection system. It allows submitting multiple source code files in order to generate a similarity report. The MOSS system only runs on Stanford's servers - you cannot run your own instance. Hence the need for a submission script. This one is mostly a Common Lisp rewrite of a PHP script written by Philipp Helo Rehs (available here).
Supported Languages
Currently supported languages are: C, C++, Java, ML, Pascal, Ada, Lisp, Scheme, Haskell, Fortran, ASCII, VHDL, Perl, Matlab, Python, MIPS assembly, Prolog, Spice, VB, C#, Modula2, a8086 assembly, JavaScript, PLSQL and Verilog
Installation
CL-MOSS is ASDF-based. The simplest way to install it is via Quicklisp by running:
CL-USER> (ql:quickload :cl-moss)
If you have a CL-MOSS repo cloned somewhere (e.g. for hacking), you can also make Quicklisp aware of it, e.g. by creating a symlink to it in your local-projects
directory and then run:
CL-USER> (ql:quickload :cl-moss)
Example Usage
Below is a sample usage session:
CL-MOSS> (defparameter *moss* (moss-initialize "<user-id>"))
CL-MOSS> (set-language *moss* :lisp) ; string value is also fine
CL-MOSS> (add-base-file *moss* "project/example.lisp")
CL-MOSS> (add-by-wildcard *moss* "project/src/*.lisp")
CL-MOSS> (set-comment-string *moss* "Let's analyze some code similarities!")
CL-MOSS> (send *moss*)
-> "http://moss.stanford.edu/results/<submission-id>"
Last step should yield a URL where you can view the results of the analysis of your submitted files.
2 Systems
The main system appears first, followed by any subsystem dependency.
2.1 cl-moss
- Author
Wojciech S. Gac <wojciech.s.gac@gmail.com>
- License
GPLv3
- Description
Common Lisp submission mechanism for Stanford’s MOSS system
- Dependency
usocket
- Source
cl-moss.asd (file)
- Components
-
3 Files
Files are sorted by type and then listed depth-first from the systems
components trees.
3.1 Lisp
3.1.1 cl-moss.asd
- Location
cl-moss.asd
- Systems
cl-moss (system)
3.1.2 cl-moss/package.lisp
- Parent
cl-moss (system)
- Location
package.lisp
- Packages
cl-moss
3.1.3 cl-moss/util.lisp
- Dependency
package.lisp (file)
- Parent
cl-moss (system)
- Location
util.lisp
- Internal Definitions
make-keyword (function)
3.1.4 cl-moss/cl-moss.lisp
- Dependency
util.lisp (file)
- Parent
cl-moss (system)
- Location
cl-moss.lisp
- Internal Definitions
-
4 Packages
Packages are listed by definition order.
4.1 cl-moss
- Source
package.lisp (file)
- Use List
common-lisp
- Internal Definitions
-
5 Definitions
Definitions are sorted by export status, category, package, and then by
lexicographic order.
5.1 Internal definitions
5.1.1 Special variables
- Special Variable: *allowed-languages*
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
- Special Variable: *default-options*
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
- Special Variable: *server-port*
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
- Special Variable: *server-url*
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
5.1.2 Functions
- Function: get-option-value OPTION-ALIST OPTION
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
- Function: make-keyword X
-
- Package
cl-moss
- Source
util.lisp (file)
- Function: moss-initialize USER-ID &key SERVER PORT
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
- Function: upload-file SOCKET FILE LANG ID
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
5.1.3 Generic functions
- Generic Function: add-base-file MOSS FILE
-
- Package
cl-moss
- Methods
- Method: add-base-file (MOSS moss) FILE
-
- Source
cl-moss.lisp (file)
- Generic Function: add-by-wildcard MOSS PATTERN
-
- Package
cl-moss
- Methods
- Method: add-by-wildcard (MOSS moss) PATTERN
-
- Source
cl-moss.lisp (file)
- Generic Function: add-file MOSS FILE
-
- Package
cl-moss
- Methods
- Method: add-file (MOSS moss) FILE
-
- Source
cl-moss.lisp (file)
- Generic Function: moss-base-files OBJECT
-
- Generic Function: (setf moss-base-files) NEW-VALUE OBJECT
-
- Package
cl-moss
- Methods
- Method: moss-base-files (MOSS moss)
-
automatically generated reader method
- Source
cl-moss.lisp (file)
- Method: (setf moss-base-files) NEW-VALUE (MOSS moss)
-
automatically generated writer method
- Source
cl-moss.lisp (file)
- Generic Function: moss-files OBJECT
-
- Generic Function: (setf moss-files) NEW-VALUE OBJECT
-
- Package
cl-moss
- Methods
- Method: moss-files (MOSS moss)
-
automatically generated reader method
- Source
cl-moss.lisp (file)
- Method: (setf moss-files) NEW-VALUE (MOSS moss)
-
automatically generated writer method
- Source
cl-moss.lisp (file)
- Generic Function: moss-options OBJECT
-
- Generic Function: (setf moss-options) NEW-VALUE OBJECT
-
- Package
cl-moss
- Methods
- Method: moss-options (MOSS moss)
-
automatically generated reader method
- Source
cl-moss.lisp (file)
- Method: (setf moss-options) NEW-VALUE (MOSS moss)
-
automatically generated writer method
- Source
cl-moss.lisp (file)
- Generic Function: moss-port OBJECT
-
- Generic Function: (setf moss-port) NEW-VALUE OBJECT
-
- Package
cl-moss
- Methods
- Method: moss-port (MOSS moss)
-
automatically generated reader method
- Source
cl-moss.lisp (file)
- Method: (setf moss-port) NEW-VALUE (MOSS moss)
-
automatically generated writer method
- Source
cl-moss.lisp (file)
- Generic Function: moss-server OBJECT
-
- Generic Function: (setf moss-server) NEW-VALUE OBJECT
-
- Package
cl-moss
- Methods
- Method: moss-server (MOSS moss)
-
automatically generated reader method
- Source
cl-moss.lisp (file)
- Method: (setf moss-server) NEW-VALUE (MOSS moss)
-
automatically generated writer method
- Source
cl-moss.lisp (file)
- Generic Function: moss-user-id OBJECT
-
- Generic Function: (setf moss-user-id) NEW-VALUE OBJECT
-
- Package
cl-moss
- Methods
- Method: moss-user-id (MOSS moss)
-
automatically generated reader method
- Source
cl-moss.lisp (file)
- Method: (setf moss-user-id) NEW-VALUE (MOSS moss)
-
automatically generated writer method
- Source
cl-moss.lisp (file)
- Generic Function: send MOSS
-
- Package
cl-moss
- Methods
- Method: send (MOSS moss)
-
- Source
cl-moss.lisp (file)
- Generic Function: set-comment-string MOSS COMMENT
-
- Package
cl-moss
- Methods
- Method: set-comment-string (MOSS moss) COMMENT
-
- Source
cl-moss.lisp (file)
- Generic Function: set-directory-mode MOSS BOOL
-
- Package
cl-moss
- Methods
- Method: set-directory-mode (MOSS moss) BOOL
-
- Source
cl-moss.lisp (file)
- Generic Function: set-experimental-server MOSS BOOL
-
- Package
cl-moss
- Methods
- Method: set-experimental-server (MOSS moss) BOOL
-
- Source
cl-moss.lisp (file)
- Generic Function: set-ignore-limit MOSS LIMIT
-
- Package
cl-moss
- Methods
- Method: set-ignore-limit (MOSS moss) LIMIT
-
- Source
cl-moss.lisp (file)
- Generic Function: set-language MOSS LANGUAGE
-
- Package
cl-moss
- Methods
- Method: set-language (MOSS moss) LANGUAGE
-
- Source
cl-moss.lisp (file)
- Generic Function: set-result-limit MOSS LIMIT
-
- Package
cl-moss
- Methods
- Method: set-result-limit (MOSS moss) LIMIT
-
- Source
cl-moss.lisp (file)
5.1.4 Classes
- Class: moss ()
-
- Package
cl-moss
- Source
cl-moss.lisp (file)
- Direct superclasses
standard-object (class)
- Direct methods
-
- Direct slots
- Slot: options
-
- Initargs
:options
- Initform
cl-moss::*default-options*
- Readers
moss-options (generic function)
- Writers
(setf moss-options) (generic function)
- Slot: server
-
- Initargs
:server
- Initform
cl-moss::*server-url*
- Readers
moss-server (generic function)
- Writers
(setf moss-server) (generic function)
- Slot: port
-
- Initargs
:port
- Initform
cl-moss::*server-port*
- Readers
moss-port (generic function)
- Writers
(setf moss-port) (generic function)
- Slot: user-id
-
- Initargs
:user-id
- Initform
(error "user id is required")
- Readers
moss-user-id (generic function)
- Writers
(setf moss-user-id) (generic function)
- Slot: files
-
- Initargs
:files
- Readers
moss-files (generic function)
- Writers
(setf moss-files) (generic function)
- Slot: base-files
-
- Initargs
:base-files
- Readers
moss-base-files (generic function)
- Writers
(setf moss-base-files) (generic function)
Appendix A Indexes
A.1 Concepts
| Index Entry | | Section |
|
C | | |
| cl-moss.asd: | | The cl-moss<dot>asd file |
| cl-moss/cl-moss.lisp: | | The cl-moss/cl-moss<dot>lisp file |
| cl-moss/package.lisp: | | The cl-moss/package<dot>lisp file |
| cl-moss/util.lisp: | | The cl-moss/util<dot>lisp file |
|
F | | |
| File, Lisp, cl-moss.asd: | | The cl-moss<dot>asd file |
| File, Lisp, cl-moss/cl-moss.lisp: | | The cl-moss/cl-moss<dot>lisp file |
| File, Lisp, cl-moss/package.lisp: | | The cl-moss/package<dot>lisp file |
| File, Lisp, cl-moss/util.lisp: | | The cl-moss/util<dot>lisp file |
|
L | | |
| Lisp File, cl-moss.asd: | | The cl-moss<dot>asd file |
| Lisp File, cl-moss/cl-moss.lisp: | | The cl-moss/cl-moss<dot>lisp file |
| Lisp File, cl-moss/package.lisp: | | The cl-moss/package<dot>lisp file |
| Lisp File, cl-moss/util.lisp: | | The cl-moss/util<dot>lisp file |
|
A.2 Functions
| Index Entry | | Section |
|
( | | |
| (setf moss-base-files) : | | Internal generic functions |
| (setf moss-base-files) : | | Internal generic functions |
| (setf moss-files) : | | Internal generic functions |
| (setf moss-files) : | | Internal generic functions |
| (setf moss-options) : | | Internal generic functions |
| (setf moss-options) : | | Internal generic functions |
| (setf moss-port) : | | Internal generic functions |
| (setf moss-port) : | | Internal generic functions |
| (setf moss-server) : | | Internal generic functions |
| (setf moss-server) : | | Internal generic functions |
| (setf moss-user-id) : | | Internal generic functions |
| (setf moss-user-id) : | | Internal generic functions |
|
A | | |
| add-base-file : | | Internal generic functions |
| add-base-file : | | Internal generic functions |
| add-by-wildcard : | | Internal generic functions |
| add-by-wildcard : | | Internal generic functions |
| add-file : | | Internal generic functions |
| add-file : | | Internal generic functions |
|
F | | |
| Function, get-option-value : | | Internal functions |
| Function, make-keyword : | | Internal functions |
| Function, moss-initialize : | | Internal functions |
| Function, upload-file : | | Internal functions |
|
G | | |
| Generic Function, (setf moss-base-files) : | | Internal generic functions |
| Generic Function, (setf moss-files) : | | Internal generic functions |
| Generic Function, (setf moss-options) : | | Internal generic functions |
| Generic Function, (setf moss-port) : | | Internal generic functions |
| Generic Function, (setf moss-server) : | | Internal generic functions |
| Generic Function, (setf moss-user-id) : | | Internal generic functions |
| Generic Function, add-base-file : | | Internal generic functions |
| Generic Function, add-by-wildcard : | | Internal generic functions |
| Generic Function, add-file : | | Internal generic functions |
| Generic Function, moss-base-files : | | Internal generic functions |
| Generic Function, moss-files : | | Internal generic functions |
| Generic Function, moss-options : | | Internal generic functions |
| Generic Function, moss-port : | | Internal generic functions |
| Generic Function, moss-server : | | Internal generic functions |
| Generic Function, moss-user-id : | | Internal generic functions |
| Generic Function, send : | | Internal generic functions |
| Generic Function, set-comment-string : | | Internal generic functions |
| Generic Function, set-directory-mode : | | Internal generic functions |
| Generic Function, set-experimental-server : | | Internal generic functions |
| Generic Function, set-ignore-limit : | | Internal generic functions |
| Generic Function, set-language : | | Internal generic functions |
| Generic Function, set-result-limit : | | Internal generic functions |
| get-option-value : | | Internal functions |
|
M | | |
| make-keyword : | | Internal functions |
| Method, (setf moss-base-files) : | | Internal generic functions |
| Method, (setf moss-files) : | | Internal generic functions |
| Method, (setf moss-options) : | | Internal generic functions |
| Method, (setf moss-port) : | | Internal generic functions |
| Method, (setf moss-server) : | | Internal generic functions |
| Method, (setf moss-user-id) : | | Internal generic functions |
| Method, add-base-file : | | Internal generic functions |
| Method, add-by-wildcard : | | Internal generic functions |
| Method, add-file : | | Internal generic functions |
| Method, moss-base-files : | | Internal generic functions |
| Method, moss-files : | | Internal generic functions |
| Method, moss-options : | | Internal generic functions |
| Method, moss-port : | | Internal generic functions |
| Method, moss-server : | | Internal generic functions |
| Method, moss-user-id : | | Internal generic functions |
| Method, send : | | Internal generic functions |
| Method, set-comment-string : | | Internal generic functions |
| Method, set-directory-mode : | | Internal generic functions |
| Method, set-experimental-server : | | Internal generic functions |
| Method, set-ignore-limit : | | Internal generic functions |
| Method, set-language : | | Internal generic functions |
| Method, set-result-limit : | | Internal generic functions |
| moss-base-files : | | Internal generic functions |
| moss-base-files : | | Internal generic functions |
| moss-files : | | Internal generic functions |
| moss-files : | | Internal generic functions |
| moss-initialize : | | Internal functions |
| moss-options : | | Internal generic functions |
| moss-options : | | Internal generic functions |
| moss-port : | | Internal generic functions |
| moss-port : | | Internal generic functions |
| moss-server : | | Internal generic functions |
| moss-server : | | Internal generic functions |
| moss-user-id : | | Internal generic functions |
| moss-user-id : | | Internal generic functions |
|
S | | |
| send : | | Internal generic functions |
| send : | | Internal generic functions |
| set-comment-string : | | Internal generic functions |
| set-comment-string : | | Internal generic functions |
| set-directory-mode : | | Internal generic functions |
| set-directory-mode : | | Internal generic functions |
| set-experimental-server : | | Internal generic functions |
| set-experimental-server : | | Internal generic functions |
| set-ignore-limit : | | Internal generic functions |
| set-ignore-limit : | | Internal generic functions |
| set-language : | | Internal generic functions |
| set-language : | | Internal generic functions |
| set-result-limit : | | Internal generic functions |
| set-result-limit : | | Internal generic functions |
|
U | | |
| upload-file : | | Internal functions |
|
A.3 Variables
| Index Entry | | Section |
|
* | | |
| *allowed-languages* : | | Internal special variables |
| *default-options* : | | Internal special variables |
| *server-port* : | | Internal special variables |
| *server-url* : | | Internal special variables |
|
B | | |
| base-files : | | Internal classes |
|
F | | |
| files : | | Internal classes |
|
O | | |
| options : | | Internal classes |
|
P | | |
| port : | | Internal classes |
|
S | | |
| server : | | Internal classes |
| Slot, base-files : | | Internal classes |
| Slot, files : | | Internal classes |
| Slot, options : | | Internal classes |
| Slot, port : | | Internal classes |
| Slot, server : | | Internal classes |
| Slot, user-id : | | Internal classes |
| Special Variable, *allowed-languages* : | | Internal special variables |
| Special Variable, *default-options* : | | Internal special variables |
| Special Variable, *server-port* : | | Internal special variables |
| Special Variable, *server-url* : | | Internal special variables |
|
U | | |
| user-id : | | Internal classes |
|
A.4 Data types