herdstyle

package
v0.0.0-...-1dd1f65 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package herdstyle contains backends that c4f in a similar way to the Herd memory simulator.

Herd is a de facto standard in the area of concurrency exploration, so various tools have the same flow, which has the following characteristics:

- Is an external, third-party tool running on the local machine, largely communicated with by command-line flags;

- Accepts Litmus tests (different tools accept different architectures, possibly including C);

- Outputs observations to stdout in a loosely standard format (handled by the parser package);

- Generally run standalone, though some tools may support lifting to executables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend represents instantiated herd-style backends.

func (Backend) Class

func (h Backend) Class() backend2.Class

func (Backend) Lift

func (Backend) ParseObs

func (h Backend) ParseObs(_ context.Context, r io.Reader, o *obs.Obs) error

ParseObs parses an observation from r into o.

type BackendImpl

type BackendImpl interface {
	// LiftStandalone runs the lifter job j using x and the run information in r, expecting it to output the
	// results into w.
	LiftStandalone(ctx context.Context, j backend2.LiftJob, r service.RunInfo, x service.Runner, w io.Writer) error

	// LiftExe runs the lifter job j using x and the run information in r, expecting an executable.
	LiftExe(ctx context.Context, j backend2.LiftJob, r service.RunInfo, x service.Runner) error

	parser.Impl
}

BackendImpl describes the functionality that differs between Herdtools-style backends.

type Class

type Class struct {
	// OptCapabilities contains the capability flags for this backend not implied by being a herdstyle backend.
	OptCapabilities backend2.Capability

	// Arches describes the architectures of Litmus test this backend can deal with.
	Arches []id.ID

	service.ExtClass

	// Impl provides parts of the Backend backend setup that differ between the various tools.
	Impl BackendImpl
}

Class represents a class of herd-style backends such as Herd and Litmus.

func (Class) Instantiate

func (c Class) Instantiate(s backend2.Spec) backend2.Backend

Instantiate overrides the run info in this backend, and returns a new backend in an interface wrapper.

func (Class) Metadata

func (c Class) Metadata() backend2.Metadata

Metadata gets the metadata for this class.

func (Class) Probe

func (c Class) Probe(ctx context.Context, sr service.Runner, classId id.ID) ([]backend2.NamedSpec, error)

Probe probes for this particular kind of herdstyle backend.

Directories

Path Synopsis
Package herd contains the parts of a Herdtools backend specific to herd7.
Package herd contains the parts of a Herdtools backend specific to herd7.
Package litmus contains the parts of a Herdtools backend specific to litmus7.
Package litmus contains the parts of a Herdtools backend specific to litmus7.
Package parser contains logic for parsing Herd-style observations.
Package parser contains logic for parsing Herd-style observations.
Package rmem implements rudimentary backend support for RMEM.
Package rmem implements rudimentary backend support for RMEM.

Jump to

Keyboard shortcuts

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