graph

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SchemaVersion = "1"

Variables

This section is empty.

Functions

func RenderJSON

func RenderJSON(graph GraphIR) ([]byte, error)

Types

type BuildInput

type BuildInput struct {
	RVVersion  string
	InputPath  string
	Design     *ir.DesignIR
	Report     report.VerificationReport
	ContractIR *contracts.ContractIR
}

type Edge

type Edge struct {
	ID         string   `json:"id"`
	Source     string   `json:"source"`
	Target     string   `json:"target"`
	Net        string   `json:"net"`
	Type       string   `json:"type"`
	Domain     string   `json:"domain"`
	Interface  string   `json:"interface"`
	VoltageV   *float64 `json:"voltage_v,omitempty"`
	Violations int      `json:"violations"`
	Warnings   int      `json:"warnings"`
	FindingIDs []string `json:"finding_ids"`
}

type Finding

type Finding struct {
	ID             string              `json:"id"`
	RuleID         string              `json:"rule_id"`
	ContractID     string              `json:"contract_id"`
	ContractSource string              `json:"contract_source"`
	Severity       string              `json:"severity"`
	Message        string              `json:"message"`
	ComponentRef   string              `json:"component_ref"`
	Net            string              `json:"net"`
	Pin            string              `json:"pin"`
	Expected       *contracts.Evidence `json:"expected,omitempty"`
	Observed       *contracts.Evidence `json:"observed,omitempty"`
	DesignFixable  bool                `json:"design_fixable"`
	Requirement    string              `json:"requirement"`
	Fix            string              `json:"fix"`
	WhyThisMatters string              `json:"why_this_matters,omitempty"`
	Provenance     string              `json:"provenance"`
}
type FindingLink struct {
	NodeIDs      []string `json:"node_ids"`
	EdgeIDs      []string `json:"edge_ids"`
	RailNames    []string `json:"rail_names"`
	InterfaceIDs []string `json:"interface_ids,omitempty"`
}

type GraphIR

type GraphIR struct {
	GraphVersion  string                 `json:"graph_version"`
	RVVersion     string                 `json:"rv_version"`
	InputPath     string                 `json:"input_path"`
	Summary       Summary                `json:"summary"`
	Nodes         []Node                 `json:"nodes"`
	Edges         []Edge                 `json:"edges"`
	Rails         []Rail                 `json:"rails"`
	Interfaces    []Interface            `json:"interfaces"`
	Findings      []Finding              `json:"findings"`
	FindingsIndex map[string]FindingLink `json:"findings_index"`
}

func Build

func Build(input BuildInput) GraphIR

type Interface

type Interface struct {
	ID           string            `json:"id"`
	Type         string            `json:"type"`
	Nets         []string          `json:"nets"`
	Participants []string          `json:"participants"`
	Pullups      []InterfacePullup `json:"pullups"`
	Violations   int               `json:"violations"`
	Warnings     int               `json:"warnings"`
	FindingIDs   []string          `json:"finding_ids"`
}

type InterfacePullup

type InterfacePullup struct {
	Ref            string  `json:"ref"`
	Net            string  `json:"net"`
	ResistanceOhms float64 `json:"resistance_ohms"`
	ToNet          string  `json:"to_net"`
}

type Node

type Node struct {
	ID               string       `json:"id"`
	Ref              string       `json:"ref"`
	Label            string       `json:"label"`
	Type             string       `json:"type"`
	ContractCoverage string       `json:"contract_coverage"`
	Violations       int          `json:"violations"`
	Warnings         int          `json:"warnings"`
	FindingIDs       []string     `json:"finding_ids"`
	Nets             []string     `json:"nets"`
	Metadata         NodeMetadata `json:"metadata"`
}

type NodeMetadata

type NodeMetadata struct {
	Value        string `json:"value"`
	Footprint    string `json:"footprint"`
	MPN          string `json:"mpn"`
	Manufacturer string `json:"manufacturer"`
}

type Rail

type Rail struct {
	Name       string   `json:"name"`
	VoltageV   *float64 `json:"voltage_v,omitempty"`
	SourceRef  string   `json:"source_ref"`
	Consumers  []string `json:"consumers"`
	Violations int      `json:"violations"`
	Warnings   int      `json:"warnings"`
	FindingIDs []string `json:"finding_ids"`
}

type Summary

type Summary struct {
	Violations             int  `json:"violations"`
	Warnings               int  `json:"warnings"`
	Infos                  int  `json:"infos"`
	Findings               int  `json:"findings"`
	HasFailures            bool `json:"has_failures"`
	UserContractsLoaded    int  `json:"user_contracts_loaded"`
	BuiltInContractsLoaded int  `json:"built_in_contracts_loaded"`
	ActiveUserRequirements int  `json:"active_user_requirements"`
}

Jump to

Keyboard shortcuts

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