Skip to content

Java class sandbox with instrumentation support for online judges.

License

Notifications You must be signed in to change notification settings

DMOJ/java-sandbox-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-sandbox-agent Build Status

Java class sandbox with instrumentation support for online judges.

It implements:

  • a much faster, unsynchronized ASCII-only System.out stream that's suitable for single-threaded online-judging scenarios
  • support for disallowing particular classes from being loaded, to force certain solutions trivialized by the standard library
  • optional unbuffering of standard output, for interactive problems without requiring users to flush manually
  • logging of exceptional exits to a state file

Usage

To run a class Submission with agent the following suffices:

$ java -client -javaagent:/code/java-sandbox-agent.jar=[option, ...] Submission

Supported fields for the option list are:

  • nobigmath — disables BigInteger and BigDecimal, raising appropriate exceptions if they are used
  • unicode — encodes System.out as UTF-8 instead of ASCII, sacrificing performance for Unicode support
  • nobuf — sets System.out as being line-buffered, for interactive problems
  • unsafe — enables sun.misc.Unsafe, which is disabled by default

About

Java class sandbox with instrumentation support for online judges.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages