problems

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileContext

type CompileContext interface {
	GetCompiler(ctx context.Context, name string) (compilers.Compiler, error)
	Logger() *logs.Logger
}

type Problem

type Problem interface {
	Compile(context.Context, CompileContext) error
	GetExecutables() ([]ProblemExecutable, error)
	GetTestSets() ([]ProblemTestSet, error)
	GetStatements() ([]ProblemStatement, error)
}

type ProblemExecutable

type ProblemExecutable interface {
	Name() string
	Kind() ProblemExecutableKind
	OpenBinary() (*os.File, error)
	GetCompiler(context.Context, CompileContext) (compilers.Compiler, error)
}

type ProblemExecutableKind

type ProblemExecutableKind string
const (
	TestlibChecker    ProblemExecutableKind = "testlib_checker"
	TestlibInteractor ProblemExecutableKind = "testlib_interactor"
)

type ProblemKind

type ProblemKind string
const (
	PolygonProblem  ProblemKind = "polygon"
	CompiledProblem ProblemKind = "compiled"
)

type ProblemPointsPolicy

type ProblemPointsPolicy string
const (
	EachTestPointsPolicy      ProblemPointsPolicy = "each_test"
	CompleteGroupPointsPolicy ProblemPointsPolicy = "complete_group"
)

type ProblemResource

type ProblemResource interface {
	Name() string
	Open() (*os.File, error)
	GetMD5() (string, error)
}

type ProblemStatement

type ProblemStatement interface {
	Locale() string
	GetConfig() (models.ProblemStatementConfig, error)
	GetResources() ([]ProblemResource, error)
}

type ProblemTest

type ProblemTest interface {
	OpenInput() (*os.File, error)
	OpenAnswer() (*os.File, error)
	Points() float64
	Group() string
}

type ProblemTestGroup

type ProblemTestGroup interface {
	Name() string
	PointsPolicy() ProblemPointsPolicy
}

type ProblemTestSet

type ProblemTestSet interface {
	Name() string
	TimeLimit() int64
	MemoryLimit() int64
	GetTests() ([]ProblemTest, error)
	GetGroups() ([]ProblemTestGroup, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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