processors

package
v0.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAll

func GetAll() map[string]Processor

func Register

func Register(name string, proc Processor)

register a processor to system

Types

type CheckerHcmp

type CheckerHcmp struct {
}

Compares two signed huge (big) integers. Validates that both integers (in the output and in the answer) are well-formatted.

func (CheckerHcmp) Label

func (r CheckerHcmp) Label() (inputlabel []string, outputlabel []string)

func (CheckerHcmp) Run

func (r CheckerHcmp) Run(input []string, output []string) *processor.Result

type CheckerTestlib

type CheckerTestlib struct {
}

Execute testlib checker

func (CheckerTestlib) Label

func (r CheckerTestlib) Label() (inputlabel []string, outputlabel []string)

func (CheckerTestlib) Run

func (r CheckerTestlib) Run(input []string, output []string) *Result

type Compiler

type Compiler struct {
}

Compile source file in all language. For input files, "source" represents source file, "script" represents bash script to compile, where $1 gives source file path and $2 gives output file path

func (Compiler) Label

func (r Compiler) Label() (inputlabel []string, outputlabel []string)

func (Compiler) Run

func (r Compiler) Run(input []string, output []string) *Result

type CompilerAuto

type CompilerAuto struct {
}

Compile source file in all language. Time limitation: 1min.

func (CompilerAuto) Label

func (r CompilerAuto) Label() (inputlabel []string, outputlabel []string)

func (CompilerAuto) Run

func (r CompilerAuto) Run(input []string, output []string) *Result

type CompilerTestlib

type CompilerTestlib struct {
}

Compile codeforces testlib source file using g++. For input files, "source" represents source file.

func (CompilerTestlib) Label

func (r CompilerTestlib) Label() (inputlabel []string, outputlabel []string)

func (CompilerTestlib) Run

func (r CompilerTestlib) Run(input []string, output []string) *Result

type GeneratorTestlib

type GeneratorTestlib struct {
}

Execute testlib generator. Arguments in "arguments" are seperated by space.

func (GeneratorTestlib) Label

func (r GeneratorTestlib) Label() (inputlabel []string, outputlabel []string)

func (GeneratorTestlib) Run

func (r GeneratorTestlib) Run(input []string, output []string) *Result

type Inputmaker

type Inputmaker struct {
}

Inputmaker make input according to "option": "raw" means "source" provides input content, "generator" means execute "generator" with arguments in "source", separated by space.

func (Inputmaker) Label

func (r Inputmaker) Label() (inputlabel []string, outputlabel []string)

func (Inputmaker) Run

func (r Inputmaker) Run(input []string, output []string) *Result

type Processor

type Processor = processor.Processor

func Get

func Get(name string) Processor

type Result

type Result = processor.Result

func RtErrRes added in v0.0.32

func RtErrRes(err error) *Result

func SysErrRes added in v0.0.32

func SysErrRes(err error) *Result

type RunConf added in v0.0.32

type RunConf struct {
	RealTime, CpuTime, VirMem, RealMem, StkMem, Output, Fileno uint   // limitation
	Inf, Ouf                                                   string // input file name, output file name (not data)
	Interpreter                                                string
}

runner config

func (*RunConf) Deserialize added in v0.0.32

func (r *RunConf) Deserialize(data []byte) error

func (*RunConf) IsFileIO added in v0.0.32

func (r *RunConf) IsFileIO() bool

func (*RunConf) Serialize added in v0.0.32

func (r *RunConf) Serialize() (res []byte)

type Runner added in v0.0.32

type Runner struct {
}

Run a program automatically.

func (Runner) Label added in v0.0.32

func (r Runner) Label() (inputlabel []string, outputlabel []string)

func (Runner) Run added in v0.0.32

func (r Runner) Run(input []string, output []string) *Result

type RunnerFileio

type RunnerFileio struct {
}

Run a program reading from file and print to file and stderr. File "config" contains two lines, the first of which acts the same as "limit" of RunnerStdio while the second contains two strings denoting input file and output file.

func (RunnerFileio) Label

func (r RunnerFileio) Label() (inputlabel []string, outputlabel []string)

func (RunnerFileio) Run

func (r RunnerFileio) Run(input []string, output []string) *Result

type RunnerStdio

type RunnerStdio struct {
}

Run a program reading from stdin and print to stdout and stderr. For "limit", it contains a series of number seperated by space, denoting real time (ms), cpu time (ms), virtual memory (byte), real memory (byte), stack memory (byte), output limit (byte), fileno limitation respectively.

func (RunnerStdio) Label

func (r RunnerStdio) Label() (inputlabel []string, outputlabel []string)

func (RunnerStdio) Run

func (r RunnerStdio) Run(input []string, output []string) *Result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL