Documentation
¶
Overview ¶
Package jpf is the Java Pathfinder verification system's implementation of an Impendulo tool. See http://babelfish.arc.nasa.gov/trac/jpf/ for more information.
Index ¶
- Constants
- func Allowed(key string) bool
- func JPFBytes(config map[string][]string) (ret []byte, err error)
- type ChoiceGenerator
- type Class
- type Config
- type Error
- type Frame
- type Instruction
- type Report
- type Result
- func (r *Result) ChartVals() []*result.ChartVal
- func (r *Result) GetFileId() bson.ObjectId
- func (r *Result) GetId() bson.ObjectId
- func (r *Result) GetName() string
- func (r *Result) GetTestId() bson.ObjectId
- func (r *Result) GetType() string
- func (r *Result) Lines() []*result.Line
- func (r *Result) OnGridFS() bool
- func (r *Result) Reporter() result.Reporter
- func (r *Result) SetReport(report result.Reporter)
- func (r *Result) String() string
- func (r *Result) Success() bool
- func (r *Result) Template() string
- type Statistics
- type Thread
- type Tool
- type Transition
Constants ¶
const (
NAME = "JPF"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChoiceGenerator ¶
ChoiceGenerator is what is used to explore the state space. Here we can see what choice was made to reach a certain state. See gov.nasa.jpf.vm.ChoiceGenerator
type Class ¶
Class represents properties of a Java class, specifically its name and package.
func GetClasses ¶
GetClasses retrieves an array of classes matching a specific type and writes them to a provided output file for future use.
type Config ¶
type Config struct { Id bson.ObjectId `bson:"_id"` ProjectId bson.ObjectId `bson:"projectid"` Time int64 `bson:"time"` Target *tool.Target `bson:"target"` //Contains configured JPF properties Data []byte `bson:"data"` }
Config represents a JPF configuration. This means that it contains configured JPF properties specific to running a certain project.
type Error ¶
type Error struct { Property string `xml:"property"` Details string `xml:"details"` Threads []*Thread `xml:"threads>thread"` }
Error represents a JPF Error. It contains the property which was violated as well as a more detailed error message. See gov.nasa.jpf.Error
type Frame ¶
type Frame struct { Id string `xml:"frameid,attr"` Line int `xml:"line,attr"` Details string `xml:",innerxml"` }
Frame represents a thread's stack frame See gov.nasa.jpf.vm.StackFrame
type Instruction ¶
Instruction corresponds to an executed JPF bytecode instruction. See gov.nasa.jpf.vm.Step and gov.nasa.jpf.vm.Instruction
type Report ¶
type Report struct { Id bson.ObjectId Version string `xml:"jpf-version"` Stats *Statistics `xml:"statistics"` Errors []*Error `xml:"errors>error"` Total int `xml:"errors>total"` //The execution trace is recorded here. //See gov.nasa.jpf.vm.Path Trace []*Transition `xml:"trace>transition"` }
Report is the top level structure extracted from the XML generated by JPF. It provides statistics, errors, Threads (the state when an error occurred) and a Trace of how an error came about.
func (*Report) ErrorCount ¶
Errors provided the number of errors found by JPF.
type Result ¶
type Result struct { Id bson.ObjectId `bson:"_id"` FileId bson.ObjectId `bson:"fileid"` Name string `bson:"name"` Report *Report `bson:"report"` GridFS bool `bson:"gridfs"` Type string `bson:"type"` }
func NewResult ¶
NewResult creates a new JPF result. The data []byte is in XML format and therefore allows us to generate a JPF report from it.
func (*Result) OnGridFS ¶
OnGridFS determines whether r structure is partially stored on the GridFS.
type Statistics ¶
type Statistics struct { Time int64 `xml:"elapsed-time"` NewStates int `xml:"new-states"` VisitedStates int `xml:"visited-states"` BacktrackedStates int `xml:"backtracked-states"` EndStates int `xml:"end-states"` Memory int `xml:"max-memory"` }
Statistics is a simple structure which holds captured information relating to JPF's execution. See gov.nasa.jpf.report.Statistics
type Thread ¶
type Thread struct { Id int `xml:"id,attr"` Name string `xml:"name,attr"` //This thread's state: NEW, RUNNING, BLOCKED, UNBLOCKED, WAITING, TIMEOUT_WAITING, //NOTIFIED, INTERRUPTED, TIMEDOUT, TERMINATED, SLEEPING Status string `xml:"status,attr"` Frames []*Frame `xml:"frame"` RequestLocks []string `xml:"lock-request object,attr"` //Lock objects this thread owns OwnedLocks []string `xml:"lock-owned object,attr"` }
Thread represents a live thread at the time when an error occurred. See gov.nasa.jpf.vm.ThreadInfo
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool is an implementation of tool.T which runs a JPF on a Java source file. It makes use of runner.JPFRunner to configure and run JPF on a file and runner.ImpenduloPublisher to output the results as XML.
func New ¶
New creates a new JPF instance for a given submission. jpfDir is where the Java JPF runner files should be stored for this JPF instance. jpfConfig is the JPF configuration associated with the submission's project.
type Transition ¶
type Transition struct { Id int `xml:"frameid,attr"` ThreadId int `xml:"thread,attr"` CG *ChoiceGenerator `xml:"cg"` Insns []*Instruction `xml:"insn"` }
Transition is used to store an execution path. See gov.nasa.jpf.vm.Transition