Documentation ¶
Index ¶
- Constants
- func EvaluateAlgorithm(algorithm func(Microprogram, chan struct{}), uprgm Microprogram, n_samples int, ...) (count int)
- func FilterModelFromZ3(model string) (filtered string)
- func GetStandardItemLists() (ops []Op, vals []Val)
- func GetStandardItems() (ops map[Sort][]Op, vals map[Sort][]Val)
- func IndexOps(ops_list []Op) (ops map[Sort][]Op)
- func IndexVals(vals_list []Val) (vals map[Sort][]Val)
- func InvertedConstraintForMicroprogram(orig string) (inverted_form string)
- func MicroprogramConstraintToIdLiteral(constraint_raw string, idsrc *qse.IdSource) (id_literal qse.IdLiteral[string])
- func Pto[T any](x T) (p *T)
- func RandomPruferSequenceElement(n int) (elem int)
- func RunEvaluationMain()
- func SliceToPHashMapSet[T qse.Hashable](slice []T) (set qse.PHashMap[T, struct{}])
- func SliceToSet[T comparable](slice []T) (set map[T]struct{})
- func UniformAssignmentOfSMTFreeFuns(smt_free_funs []qse.SMTFreeFun[string, string], sort_values map[string]string) (model string)
- type ConnectedOrNot
- type ConstraintGenerator
- func (g ConstraintGenerator) AddVariable(sort_distr DDistr[Sort], rep int)
- func (g ConstraintGenerator) AddVariables(n int, sort_distr DDistr[Sort], p_var float64)
- func (g ConstraintGenerator) Generate(sort Sort) (expr string)
- func (g ConstraintGenerator) GenerateAtDepth(sort Sort, depth int) (expr string)
- func (g ConstraintGenerator) SMTFreeFuns() (smt_free_funs []qse.SMTFreeFun[string, string])
- func (g ConstraintGenerator) Variables() (vars []Val)
- func (g ConstraintGenerator) Verify()
- type DDistr
- type DDistrFormulation
- type Microprogram
- func (uprgm Microprogram) ExecuteGetPathCondition(model string, no_transition bool) (fails bool, pc []string)
- func (uprgm Microprogram) ExecuteGetPathConditionFrom(model string, state MicroprogramState, no_transition bool, rec_budget int, ...) (fails bool, pc []string)
- func (uprgm Microprogram) ModelSatisfiesConstraints(model string, constraints []string) (does bool)
- func (uprgm Microprogram) RunDSE() (n_bugs int)
- func (uprgm Microprogram) RunDSEContinuously(bug_signal chan uint32, emit_pcs bool, out_pcs *chan PathConditionResult, ...)
- func (uprgm Microprogram) RunSiMReQ(bug_signal chan struct{}, jit_dse bool)
- func (uprgm Microprogram) SiMReQProcessPCs(in_pcs chan PathConditionResult, bug_signal chan uint32, jit_dse bool)
- func (uprgm Microprogram) SolveForInputZ3(constraints []qse.IdLiteral[string], idsrc *qse.IdSource) (model_ptr *string)
- func (uprgm Microprogram) UniformAssignmentOfSMTFreeFuns(sort_values map[string]string) (model string)
- func (uprgm Microprogram) UnitializedAssignment() (model string)
- type MicroprogramGenerator
- type MicroprogramState
- type MicroprogramTransition
- type Op
- type PathConditionResult
- type PruferSequence
- type SiMReQConstrainedTransition
- type SimpleDDistr
- type SimpleEdgeDesc
- type SimpleMicroprogramTransitionDesc
- type SimpleQuiverAdjList
- type SimpleTree
- func (tree SimpleTree) AsMicroprogramTransitions(dst_states []MicroprogramState, constraintgen ConstraintGenerator) (transitions []MicroprogramTransition)
- func (tree SimpleTree) AsMicroprogramTransitionsWithPrefix(dst_states []MicroprogramState, constraintgen ConstraintGenerator, ...) (transitions []MicroprogramTransition)
- func (tree *SimpleTree) CleanUpNonNegativeSubtrees() (destroy bool)
- func (tree *SimpleTree) CoerceForbidDegreeOne()
- func (tree *SimpleTree) CoerceToMaxDegree(n int)
- func (tree SimpleTree) ComputeLeafCount() (n_leaves int)
- func (tree *SimpleTree) ComputeLeafReferences() (leaf_refs []*SimpleTree)
- func (tree SimpleTree) ComputeSize() (size int)
- func (tree *SimpleTree) MaxDegree() (md int)
- func (tree *SimpleTree) RewriteLeafIds()
- type Sort
- type StringSMTFreeFun
- type Val
Constants ¶
View Source
const PC_CYCLE_LIMIT = 1
View Source
const PC_REC_LIMIT = 30
View Source
const SIMREQ_JIT_DSE_MAX_ITERS = 10
View Source
const TEST_ITERATIONS = 80
View Source
const VARIABLE_PREFIX = "var_"
Variables ¶
This section is empty.
Functions ¶
func EvaluateAlgorithm ¶
func EvaluateAlgorithm( algorithm func(Microprogram, chan struct{}), uprgm Microprogram, n_samples int, timeout time.Duration, name string, ) ( count int, )
func FilterModelFromZ3 ¶
func GetStandardItemLists ¶
func RunEvaluationMain ¶
func RunEvaluationMain()
func SliceToPHashMapSet ¶
func SliceToSet ¶
func SliceToSet[T comparable](slice []T) (set map[T]struct{})
Types ¶
type ConnectedOrNot ¶
type ConnectedOrNot int
const ( Connected ConnectedOrNot = iota NotConnected )
type ConstraintGenerator ¶
type ConstraintGenerator struct { P_n_depth_mean float64 P_n_depth_stddev float64 P_ops map[Sort][]Op P_vals map[Sort][]Val NextVarId *int }
func (ConstraintGenerator) AddVariable ¶
func (g ConstraintGenerator) AddVariable(sort_distr DDistr[Sort], rep int)
func (ConstraintGenerator) AddVariables ¶
func (g ConstraintGenerator) AddVariables(n int, sort_distr DDistr[Sort], p_var float64)
func (ConstraintGenerator) Generate ¶
func (g ConstraintGenerator) Generate(sort Sort) (expr string)
func (ConstraintGenerator) GenerateAtDepth ¶
func (g ConstraintGenerator) GenerateAtDepth(sort Sort, depth int) (expr string)
func (ConstraintGenerator) SMTFreeFuns ¶
func (g ConstraintGenerator) SMTFreeFuns() (smt_free_funs []qse.SMTFreeFun[string, string])
func (ConstraintGenerator) Variables ¶
func (g ConstraintGenerator) Variables() (vars []Val)
func (ConstraintGenerator) Verify ¶
func (g ConstraintGenerator) Verify()
type DDistr ¶
type DDistr[T any] struct { // contains filtered or unexported fields }
func BakeDDistr ¶
func BakeDDistr[T any](formulation DDistrFormulation[T]) (d DDistr[T])
func (DDistr[T]) SampleUsing ¶
type DDistrFormulation ¶
type Microprogram ¶
type Microprogram struct { StateTop MicroprogramState StateFail MicroprogramState Transitions map[MicroprogramState][]MicroprogramTransition // contains filtered or unexported fields }
func GenerateEvaluationMicroprogram ¶
func GenerateEvaluationMicroprogram() (uprgm Microprogram)
func (Microprogram) ExecuteGetPathCondition ¶
func (uprgm Microprogram) ExecuteGetPathCondition( model string, no_transition bool, ) ( fails bool, pc []string, )
func (Microprogram) ExecuteGetPathConditionFrom ¶
func (uprgm Microprogram) ExecuteGetPathConditionFrom( model string, state MicroprogramState, no_transition bool, rec_budget int, seen map[MicroprogramState]int, ) ( fails bool, pc []string, )
func (Microprogram) ModelSatisfiesConstraints ¶
func (uprgm Microprogram) ModelSatisfiesConstraints(model string, constraints []string) (does bool)
func (Microprogram) RunDSE ¶
func (uprgm Microprogram) RunDSE() (n_bugs int)
func (Microprogram) RunDSEContinuously ¶
func (uprgm Microprogram) RunDSEContinuously( bug_signal chan uint32, emit_pcs bool, out_pcs *chan PathConditionResult, no_transition bool, max_iters int, top_state MicroprogramState, )
func (Microprogram) RunSiMReQ ¶
func (uprgm Microprogram) RunSiMReQ(bug_signal chan struct{}, jit_dse bool)
func (Microprogram) SiMReQProcessPCs ¶
func (uprgm Microprogram) SiMReQProcessPCs( in_pcs chan PathConditionResult, bug_signal chan uint32, jit_dse bool, )
func (Microprogram) SolveForInputZ3 ¶
func (Microprogram) UniformAssignmentOfSMTFreeFuns ¶
func (uprgm Microprogram) UniformAssignmentOfSMTFreeFuns( sort_values map[string]string, ) ( model string, )
func (Microprogram) UnitializedAssignment ¶
func (uprgm Microprogram) UnitializedAssignment() (model string)
type MicroprogramGenerator ¶
type MicroprogramGenerator struct { P_n_states int P_p_transition float64 P_n_merged_graphs int P_p_fallible float64 P_n_entry_samples int P_n_tree_nonleaf int P_constraintgen ConstraintGenerator // contains filtered or unexported fields }
func BuildEvaluationMicroprogramGenerator ¶
func BuildEvaluationMicroprogramGenerator() (uprgm_gen MicroprogramGenerator)
func BuildTestingMicroprogramGenerator ¶
func BuildTestingMicroprogramGenerator() (uprgm_gen MicroprogramGenerator)
func (*MicroprogramGenerator) AllocateStateIds ¶
func (gen *MicroprogramGenerator) AllocateStateIds(n int) (start_of_allocation MicroprogramState)
func (*MicroprogramGenerator) GetNextStateId ¶
func (gen *MicroprogramGenerator) GetNextStateId() (state MicroprogramState)
func (*MicroprogramGenerator) RandomMicroprogram ¶
func (gen *MicroprogramGenerator) RandomMicroprogram() (uprgm Microprogram)
type MicroprogramState ¶
type MicroprogramState int
func ParseMicroprogramState ¶
func ParseMicroprogramState(str string) (state MicroprogramState)
func (MicroprogramState) ShiftBy ¶
func (state MicroprogramState) ShiftBy(n int) (shifted_state MicroprogramState)
type MicroprogramTransition ¶
type MicroprogramTransition struct { StateDst MicroprogramState Constraints []string }
type PathConditionResult ¶
type PathConditionResult struct {
// contains filtered or unexported fields
}
type PruferSequence ¶
type PruferSequence struct {
// contains filtered or unexported fields
}
func BakePruferSequence ¶
func BakePruferSequence(sequence []int) (ps PruferSequence)
func RandomPruferSequence ¶
func RandomPruferSequence(n int) (ps PruferSequence)
func (PruferSequence) ToTree ¶
func (ps PruferSequence) ToTree() (tree SimpleTree)
type SiMReQConstrainedTransition ¶
type SiMReQConstrainedTransition struct {
// contains filtered or unexported fields
}
type SimpleDDistr ¶
type SimpleDDistr[T comparable] struct { Outcomes map[T]float64 }
func (SimpleDDistr[T]) GetOutcomes ¶
func (d SimpleDDistr[T]) GetOutcomes() (outcomes []T)
func (SimpleDDistr[T]) ProbOfOutcome ¶
func (d SimpleDDistr[T]) ProbOfOutcome(outcome T) (prob float64)
type SimpleEdgeDesc ¶
type SimpleEdgeDesc struct {
// contains filtered or unexported fields
}
type SimpleMicroprogramTransitionDesc ¶
type SimpleMicroprogramTransitionDesc struct {
// contains filtered or unexported fields
}
type SimpleQuiverAdjList ¶
type SimpleQuiverAdjList struct {
// contains filtered or unexported fields
}
func ErdosRenyiGraph ¶
func ErdosRenyiGraph(n int, p float64) (al SimpleQuiverAdjList)
Generates a G(n, p) Erdős-Rényi Graph.
func ErdosRenyiQuiver ¶
func ErdosRenyiQuiver(n int, p float64, r int) (al SimpleQuiverAdjList)
Generates r G(n, p) Erdős-Rényi Graphs, and merges them to form a quiver.
func ErdosRenyiQuiverGivenEdges ¶
func ErdosRenyiQuiverGivenEdges(n int, p float64, r int) (al SimpleQuiverAdjList)
See ErdosRenyiQuiver. Takes in n, p, and r
func (*SimpleQuiverAdjList) CoerceAcyclic ¶
func (q *SimpleQuiverAdjList) CoerceAcyclic( src_whitelist map[int]struct{}, dst_whitelist map[int]struct{}, )
func (SimpleQuiverAdjList) ExtractAdjListAsMap ¶
func (sqal SimpleQuiverAdjList) ExtractAdjListAsMap(n int) (al map[int][]int)
func (*SimpleQuiverAdjList) InsertEdge ¶
func (sqal *SimpleQuiverAdjList) InsertEdge(src int, dst int)
type SimpleTree ¶
type SimpleTree struct {
// contains filtered or unexported fields
}
func PruferEvenFinalRandomTree ¶
func PruferEvenFinalRandomTree(n_nonleaf int, n_leaves int) (tree SimpleTree)
func PruferRandomTree ¶
func PruferRandomTree(n int) (tree SimpleTree)
Generate a random tree as defined by a random Prüfer Sequence
func SimpleTreeFromAdjList ¶
func SimpleTreeFromAdjList(al map[int][]int, root int) (tree SimpleTree)
func (SimpleTree) AsMicroprogramTransitions ¶
func (tree SimpleTree) AsMicroprogramTransitions( dst_states []MicroprogramState, constraintgen ConstraintGenerator, ) ( transitions []MicroprogramTransition, )
func (SimpleTree) AsMicroprogramTransitionsWithPrefix ¶
func (tree SimpleTree) AsMicroprogramTransitionsWithPrefix( dst_states []MicroprogramState, constraintgen ConstraintGenerator, constraint_prefix []string, invertible_constraint_prefix []string, ) ( transitions []MicroprogramTransition, )
func (*SimpleTree) CleanUpNonNegativeSubtrees ¶
func (tree *SimpleTree) CleanUpNonNegativeSubtrees() (destroy bool)
func (*SimpleTree) CoerceForbidDegreeOne ¶
func (tree *SimpleTree) CoerceForbidDegreeOne()
func (*SimpleTree) CoerceToMaxDegree ¶
func (tree *SimpleTree) CoerceToMaxDegree(n int)
func (SimpleTree) ComputeLeafCount ¶
func (tree SimpleTree) ComputeLeafCount() (n_leaves int)
func (*SimpleTree) ComputeLeafReferences ¶
func (tree *SimpleTree) ComputeLeafReferences() (leaf_refs []*SimpleTree)
func (SimpleTree) ComputeSize ¶
func (tree SimpleTree) ComputeSize() (size int)
func (*SimpleTree) MaxDegree ¶
func (tree *SimpleTree) MaxDegree() (md int)
func (*SimpleTree) RewriteLeafIds ¶
func (tree *SimpleTree) RewriteLeafIds()
type StringSMTFreeFun ¶
type StringSMTFreeFun struct {
FreeFun qse.SMTFreeFun[string, string]
}
func (StringSMTFreeFun) DefinitionString ¶
func (sff StringSMTFreeFun) DefinitionString(rhs string) (stmt string)
Source Files ¶
- as_uprgm_trsns.go
- constraintgen.go
- constraintgen_impl.go
- discrete_distr.go
- discrete_distr_impl.go
- dse.go
- dse_impl.go
- erdos_renyi_quiver.go
- erdos_renyi_quiver_impl.go
- eval_uprgm_gen.go
- evaluation_impl.go
- filter_z3_model_impl.go
- microprogram_impl.go
- microprograms.go
- path_conditions_impl.go
- prufer_sequence.go
- prufer_sequence_impl.go
- pto.go
- quiver_coerce_acyclic.go
- random_trees_impl.go
- simple_d_distr.go
- simple_d_distr_impl.go
- simreq.go
- simreq_impl.go
- string_sff.go
- string_sff_impl.go
- test_config.go
- testing_uprgm_gen.go
- tree_coerce_impl.go
- tree_max_degree_impl.go
Click to show internal directories.
Click to hide internal directories.