Documentation
¶
Index ¶
- Constants
- func EnabledRuleIDs() []string
- func Float64(v float64) *float64
- func UnknownPowerCriticalRefs(design *ir.DesignIR, contractIR *ContractIR) []string
- type AppliedRequirement
- type BuiltinPartsSource
- type CheckCoverage
- type ChipSelect
- type Citation
- type ComponentContract
- type ConnectionProposal
- type ContractIR
- func (c *ContractIR) EnsureComponent(ref string) ComponentContract
- func (c *ContractIR) Merge(other *ContractIR)
- func (c *ContractIR) Net(net string) (NetContract, bool)
- func (c *ContractIR) Pin(ref string, pin string) (PinContract, bool)
- func (c *ContractIR) PutAppliedRequirement(req AppliedRequirement)
- func (c *ContractIR) PutComponent(component ComponentContract)
- func (c *ContractIR) PutNet(net string, contract NetContract)
- func (c *ContractIR) PutPin(ref string, pin string, contract PinContract)
- type ContractScope
- type ContractSource
- type ContractSourceKind
- type ContractType
- type CoverageSummary
- type Direction
- type DraftDocument
- type Evidence
- type FieldContractSource
- type Finding
- type I2CBusNets
- type InterfaceParticipant
- type MatchResult
- type MissingContractData
- type NetContract
- type PartMatch
- type PinContract
- type PinFunction
- type PinFunctionAnalysis
- type PinFunctionKind
- type PinRole
- type PowerConsumer
- type PowerSource
- type ProvedCoverage
- type Provenance
- type RefusedFinding
- type Requirement
- type SystemContract
- type UncheckedItem
- type UserYAMLSource
Constants ¶
const ( RuleInterfaceComponentMissing = "interface_component_missing" RuleInterfaceNetMissing = "interface_net_missing" RuleInterfaceNotConnected = "interface_not_connected" RuleInterfacePinMismatch = "interface_pin_mismatch" RuleInterfacePinConflict = "interface_pin_conflict" // A terminated bus has fewer two-pin parts of the required resistance than count. RuleTerminationCountLow = "termination_count_low" // A terminated bus has more two-pin parts of the required resistance than count. RuleTerminationCountHigh = "termination_count_high" RuleSPICSShared = "spi_cs_shared" // Declared consumer current is above the declared source max current. RulePowerBudgetExceeded = "power_budget_exceeded" // Declared load is within the source limit, and remaining margin is below the contract minimum. RulePowerMarginLow = "power_margin_low" // A dedicated SDA pin is on a net named SCL or I2C_SCL, or a dedicated SCL pin is on SDA or I2C_SDA. RulePinFunctionMismatch = "pin_function_mismatch" // Dedicated SDA and SCL of one part land on the same net. RulePinBusShort = "pin_bus_short" )
Interface findings. A missing part or net is reported alone; not-connected is only emitted once both the component and the net exist. Optional pin bindings compare a contract token with the netlist pin name or pin number.
Variables ¶
This section is empty.
Functions ¶
func EnabledRuleIDs ¶ added in v0.3.1
func EnabledRuleIDs() []string
EnabledRuleIDs returns the deterministic contract evaluator rule set.
func Float64 ¶
Float64 makes pointer-valued numeric fields readable in struct literals. Go does not allow taking the address of a literal such as &3.3.
func UnknownPowerCriticalRefs ¶ added in v0.3.1
func UnknownPowerCriticalRefs(design *ir.DesignIR, contractIR *ContractIR) []string
Types ¶
type AppliedRequirement ¶ added in v0.3.1
type AppliedRequirement struct {
Requirement
ComponentRef string `json:"component_ref"`
ComponentMPN string `json:"component_mpn,omitempty"`
Source string `json:"source"`
Provenance Provenance `json:"provenance"`
}
AppliedRequirement is a Requirement bound to a concrete DesignIR component.
type BuiltinPartsSource ¶ added in v0.3.1
type BuiltinPartsSource struct {
// contains filtered or unexported fields
}
BuiltinPartsSource exposes the curated v0.3.1 built-in contracts as one ContractSource. Built-in contracts are intentionally minimal. This is NOT a general-purpose parts database.
func NewBuiltinPartsSource ¶ added in v0.3.1
func NewBuiltinPartsSource() BuiltinPartsSource
func (BuiltinPartsSource) Enrich ¶ added in v0.3.1
func (s BuiltinPartsSource) Enrich(design *ir.DesignIR) (*ContractIR, error)
func (BuiltinPartsSource) Name ¶ added in v0.3.1
func (s BuiltinPartsSource) Name() string
type CheckCoverage ¶ added in v0.18.0
type CheckCoverage struct {
Proved ProvedCoverage `json:"proved"`
Refused []RefusedFinding `json:"refused"`
NotChecked []UncheckedItem `json:"not_checked"`
}
CheckCoverage separates checks that passed, findings that failed, and pins that were not checked.
type ChipSelect ¶ added in v0.10.0
ChipSelect binds one slave to the net that must be its chip-select. That net is not one of the shared connected.nets. The master may also sit on it.
type Citation ¶ added in v0.18.0
type Citation struct {
Datasheet string `json:"datasheet"`
Revision string `json:"revision"`
Table string `json:"table,omitempty"`
Section string `json:"section,omitempty"`
}
Citation names the datasheet location a pin function was copied from. A function without a title, revision, and table or section is ignored.
type ComponentContract ¶
type ComponentContract struct {
Ref string `json:"ref"`
MPN string `json:"mpn,omitempty"`
Pins map[string]PinContract `json:"pins,omitempty"`
VoltageMax *float64 `json:"voltage_max,omitempty"`
Source string `json:"source,omitempty"`
// PinFunctions are copied from a matched built-in contract. A missing citation is not stored.
PinFunctions []PinFunction `json:"pin_functions,omitempty"`
}
ComponentContract stores component-level limits and per-pin contracts.
type ConnectionProposal ¶ added in v0.19.0
ConnectionProposal is a reviewable join list. It is built from built-in pin functions and netlist connectivity. It is not a scan result, and the rule engine does not evaluate it.
func ProposeConnections ¶ added in v0.19.0
func ProposeConnections(design *ir.DesignIR) ConnectionProposal
ProposeConnections builds a reviewable join list from built-in pin functions and netlist connectivity. Dedicated SDA and SCL pins can decide a join. A gpio_candidate cannot. The function does not call the rule engine.
type ContractIR ¶
type ContractIR struct {
Components map[string]ComponentContract `json:"components"`
Nets map[string]NetContract `json:"nets"`
PartMatches []PartMatch `json:"part_matches,omitempty"`
AppliedRequirements []AppliedRequirement `json:"applied_requirements,omitempty"`
MissingContractData []MissingContractData `json:"missing_contract_data,omitempty"`
}
ContractIR is the complete contract view attached to a DesignIR. It can be assembled from several independent sources before rules run.
func NewContractIR ¶
func NewContractIR() *ContractIR
NewContractIR creates an initialized contract container.
func (*ContractIR) EnsureComponent ¶
func (c *ContractIR) EnsureComponent(ref string) ComponentContract
EnsureComponent returns a mutable component contract entry, creating it when needed. Call PutComponent after changing the returned value.
func (*ContractIR) Merge ¶
func (c *ContractIR) Merge(other *ContractIR)
Merge combines another ContractIR into this one. Existing data wins so source order can express precedence without losing later missing-data warnings.
func (*ContractIR) Net ¶
func (c *ContractIR) Net(net string) (NetContract, bool)
Net looks up a contract for a normalized DesignIR net name.
func (*ContractIR) Pin ¶
func (c *ContractIR) Pin(ref string, pin string) (PinContract, bool)
Pin looks up a pin contract by component reference and pin name/number.
func (*ContractIR) PutAppliedRequirement ¶ added in v0.3.1
func (c *ContractIR) PutAppliedRequirement(req AppliedRequirement)
PutAppliedRequirement records a concrete requirement after source matching.
func (*ContractIR) PutComponent ¶
func (c *ContractIR) PutComponent(component ComponentContract)
PutComponent writes a component contract back into the ContractIR.
func (*ContractIR) PutNet ¶
func (c *ContractIR) PutNet(net string, contract NetContract)
PutNet attaches or merges a net contract.
func (*ContractIR) PutPin ¶
func (c *ContractIR) PutPin(ref string, pin string, contract PinContract)
PutPin attaches or merges a pin contract for ref/pin.
type ContractScope ¶ added in v0.3.1
type ContractScope struct {
ComponentRef string `json:"component_ref,omitempty"`
ComponentType string `json:"component_type,omitempty"`
BusType string `json:"bus_type,omitempty"`
BusID string `json:"bus_id,omitempty"`
Nets *I2CBusNets `json:"nets,omitempty"`
MPN string `json:"mpn,omitempty"`
Pins []string `json:"pins,omitempty"`
Net string `json:"net,omitempty"`
Rail string `json:"rail,omitempty"`
Role PinRole `json:"role,omitempty"`
}
ContractScope says where a requirement applies after a part is matched.
type ContractSource ¶ added in v0.3.1
type ContractSource interface {
Name() string
Enrich(design *ir.DesignIR) (*ContractIR, error)
}
ContractSource is one independent source of deterministic contract data. Source order expresses precedence; earlier sources win during ContractIR.Merge.
type ContractSourceKind ¶ added in v0.4.0
type ContractSourceKind string
ContractSourceKind is the report-facing provenance enum for contract-backed findings. Source keeps the existing internal source name for compatibility.
const ( ContractSourceBuiltIn ContractSourceKind = "built_in" ContractSourceUserYAML ContractSourceKind = "user_yaml" ContractSourceMetaYAML ContractSourceKind = "meta_yaml" ContractSourceInferred ContractSourceKind = "inferred" )
func ReportContractSource ¶ added in v0.4.0
func ReportContractSource(source string) ContractSourceKind
ReportContractSource maps internal source names to the v0.4 report enum.
type ContractType ¶ added in v0.3.1
type ContractType string
ContractType identifies the deterministic built-in contract rule family.
const ( ContractSupplyAbsMax ContractType = "supply_abs_max" ContractSupplyRecommendedRange ContractType = "supply_recommended_range" ContractGPIOAbsMax ContractType = "gpio_abs_max" ContractMotorDriverVMRange ContractType = "motor_driver_vm_range" ContractRegulatorOutputCurrent ContractType = "regulator_output_current" ContractCommonGround ContractType = "common_ground" ContractPullupOhms ContractType = "pullup_ohms" ContractVoltageCompatible ContractType = "voltage_compatible" ContractCurrentBudget ContractType = "current_budget" ContractNoI2CAddressConflict ContractType = "no_i2c_address_conflict" // ContractConnected is the YAML require.connected check. Findings use the // RuleInterface* IDs below, not this type name. ContractConnected ContractType = "connected" // ContractTerminated counts two-pin parts of a required resistance across // two nets. Findings use the termination rule IDs below, not this type name. ContractTerminated ContractType = "terminated" // ContractPowerBudget compares declared source and consumer currents. // Findings use the power-budget rule IDs below, not this type name. // Currents come from the contract. Part fields and nets are not read. ContractPowerBudget ContractType = "power_budget" )
type CoverageSummary ¶
type CoverageSummary struct {
ComponentsTotal int `json:"components_total"`
ComponentsWithContracts int `json:"components_with_contracts"`
PinsTotal int `json:"pins_total"`
PinsWithContracts int `json:"pins_with_contracts"`
NetsTotal int `json:"nets_total"`
NetsWithContracts int `json:"nets_with_contracts"`
PartsMatched int `json:"parts_matched"`
ContractsApplied int `json:"contracts_applied"`
CoveragePercentage float64 `json:"coverage_percentage"`
UnknownPowerCriticalRefs []string `json:"unknown_power_critical_refs,omitempty"`
EnabledContractRules []string `json:"enabled_contract_rules,omitempty"`
MissingWarnings []string `json:"missing_warnings,omitempty"`
}
CoverageSummary is report-facing coverage data for contract completeness.
func SummarizeCoverage ¶
func SummarizeCoverage(design *ir.DesignIR, contractIR *ContractIR) CoverageSummary
SummarizeCoverage compares DesignIR connectivity with available contracts.
type DraftDocument ¶ added in v0.16.0
DraftDocument is a contracts YAML draft built from net names. It is not a verification result.
func DraftFromDesign ¶ added in v0.16.0
func DraftFromDesign(design *ir.DesignIR) DraftDocument
DraftFromDesign builds a contracts draft from net names and pin connectivity. Part values, pin names, datasheets, and built-in parts are not read. The result is not evaluated.
type Evidence ¶ added in v0.8.0
type Evidence struct {
Text string `json:"text,omitempty"`
Min *float64 `json:"min,omitempty"`
Max *float64 `json:"max,omitempty"`
Unit string `json:"unit,omitempty"`
}
Evidence is an optional expected or observed value on a finding. Text carries tokens such as pin names or "missing". Min, Max, and Unit carry numeric comparisons. Rules that do not set it leave the field nil so JSON omits it.
type FieldContractSource ¶ added in v0.3.1
type FieldContractSource struct{}
FieldContractSource adapts explicit schematic/BOM fields into contracts. Supported fields are intentionally namespaced or plain deterministic keys, never scraped free text.
func (FieldContractSource) Enrich ¶ added in v0.3.1
func (s FieldContractSource) Enrich(design *ir.DesignIR) (*ContractIR, error)
func (FieldContractSource) Name ¶ added in v0.3.1
func (FieldContractSource) Name() string
type Finding ¶ added in v0.3.1
type Finding struct {
RuleID string `json:"rule_id"`
Severity string `json:"severity"`
Message string `json:"message"`
ComponentRef string `json:"component_ref,omitempty"`
Net string `json:"net,omitempty"`
Pin string `json:"pin,omitempty"`
Expected *Evidence `json:"expected,omitempty"`
Observed *Evidence `json:"observed,omitempty"`
BusID string `json:"bus_id,omitempty"`
BusType string `json:"bus_type,omitempty"`
BusNets *I2CBusNets `json:"bus_nets,omitempty"`
EffectivePullupOhms *float64 `json:"effective_pullup_ohms,omitempty"`
MinPullupOhms *float64 `json:"min_pullup_ohms,omitempty"`
MaxPullupOhms *float64 `json:"max_pullup_ohms,omitempty"`
PullupResistors []string `json:"pullup_resistors,omitempty"`
Source string `json:"source,omitempty"`
ContractID string `json:"contract_id,omitempty"`
ContractSource ContractSourceKind `json:"contract_source,omitempty"`
ContractFile string `json:"contract_file,omitempty"`
Requirement string `json:"requirement,omitempty"`
Provenance Provenance `json:"provenance,omitempty"`
Fix string `json:"fix,omitempty"`
WhyThisMatters string `json:"why_this_matters,omitempty"`
Citations []Citation `json:"citations,omitempty"`
}
Finding is a contract-evaluator finding before it is adapted into report JSON.
type I2CBusNets ¶ added in v0.4.0
I2CBusNets names the two signal nets that define one explicit I2C bus.
type InterfaceParticipant ¶ added in v0.8.0
type InterfaceParticipant struct {
Ref string `json:"ref"`
Role string `json:"role"`
Pins map[string]string `json:"pins,omitempty"`
}
InterfaceParticipant is one component that must sit on every net of a connected interface. Role is a master/slave label stored from the contract. It is not looked up on the MCU. Pins optionally names the pin that must land on each connected net. Keys are net names from the contract. Values are pin names or pin numbers. An empty map checks connectivity only.
type MatchResult ¶ added in v0.3.1
type MatchResult struct {
Matched bool
Ambiguous bool
Query string
Kind string
Contract SystemContract
Candidates []string
}
MatchResult describes a deterministic part-to-contract match. Ambiguous results deliberately have Matched=false so callers cannot accidentally apply a contract guessed from more than one candidate.
func MatchPart ¶ added in v0.3.1
func MatchPart(part ir.Part, catalog []SystemContract) MatchResult
MatchPart matches a DesignIR part to a SystemContract by exact MPN or alias. It rejects ambiguity and does not do fuzzy substring search.
type MissingContractData ¶
type MissingContractData struct {
Kind string `json:"kind"`
Ref string `json:"ref,omitempty"`
Pin string `json:"pin,omitempty"`
Net string `json:"net,omitempty"`
Message string `json:"message"`
}
MissingContractData records known analysis gaps. These become warnings so the report is transparent about what was not checked.
type NetContract ¶
type NetContract struct {
Net string `json:"net"`
VoltageMin *float64 `json:"voltage_min,omitempty"`
VoltageNominal *float64 `json:"voltage_nominal,omitempty"`
VoltageMax *float64 `json:"voltage_max,omitempty"`
LogicFamily string `json:"logic_family,omitempty"`
Source string `json:"source,omitempty"`
}
NetContract stores facts that apply to a whole net, such as inferred or explicitly configured rail voltage.
type PartMatch ¶ added in v0.3.1
type PartMatch struct {
Ref string `json:"ref"`
MPN string `json:"mpn"`
ContractMPN string `json:"contract_mpn"`
Kind string `json:"kind"`
Source string `json:"source"`
Provenance Provenance `json:"provenance"`
}
PartMatch records a deterministic match between a DesignIR part and a SystemContract.
type PinContract ¶
type PinContract struct {
Ref string `json:"ref,omitempty"`
Pin string `json:"pin,omitempty"`
Role PinRole `json:"role"`
VoltageMin *float64 `json:"voltage_min,omitempty"`
VoltageNominal *float64 `json:"voltage_nominal,omitempty"`
VoltageMax *float64 `json:"voltage_max,omitempty"`
CurrentMax *float64 `json:"current_max,omitempty"`
LogicFamily string `json:"logic_family,omitempty"`
Direction Direction `json:"direction"`
OpenDrain *bool `json:"open_drain,omitempty"`
Source string `json:"source,omitempty"`
}
PinContract is the rule-facing electrical contract for a single component pin.
type PinFunction ¶ added in v0.18.0
type PinFunction struct {
Name string `json:"name"`
Number string `json:"number,omitempty"`
Kind PinFunctionKind `json:"kind"`
Signal string `json:"signal,omitempty"`
Citation Citation `json:"citation"`
}
PinFunction is one cited pin on a built-in part. Number is optional. A missing number is not invented. Signal is set for dedicated functions such as SDA, SCL, VIN, or VOUT.
type PinFunctionAnalysis ¶ added in v0.18.0
type PinFunctionAnalysis struct {
Findings []Finding
Proved ProvedCoverage
NotChecked []UncheckedItem
}
PinFunctionAnalysis is the pin-function result for one design.
func AnalyzePinFunctions ¶ added in v0.18.0
func AnalyzePinFunctions(design *ir.DesignIR, contractIR *ContractIR) PinFunctionAnalysis
AnalyzePinFunctions compares cited dedicated bus pins with net names. A gpio_candidate never produces a finding. A missing citation never produces a finding.
type PinFunctionKind ¶ added in v0.18.0
type PinFunctionKind string
PinFunctionKind is the datasheet role of one cited pin. gpio_candidate means the datasheet allows I2C through pinmux. It is not a dedicated SDA or SCL pin.
const ( PinFunctionPower PinFunctionKind = "power" PinFunctionGround PinFunctionKind = "ground" PinFunctionBus PinFunctionKind = "bus" PinFunctionGPIOCandidate PinFunctionKind = "gpio_candidate" )
type PinRole ¶
type PinRole string
PinRole describes what a pin electrically does in a design-neutral way. Rules use these roles instead of package-, symbol-, or EDA-specific names.
const ( RolePowerIn PinRole = "power_in" RolePowerOut PinRole = "power_out" RoleRegulatorOut PinRole = "regulator_out" RoleSource PinRole = "source" RoleGPIO PinRole = "gpio" RoleI2CSDA PinRole = "i2c_sda" RoleI2CSCL PinRole = "i2c_scl" RoleSPI PinRole = "spi" RoleUART PinRole = "uart" RoleMotorOut PinRole = "motor_out" RoleGround PinRole = "ground" RoleUnknown PinRole = "unknown" )
type PowerConsumer ¶ added in v0.11.0
PowerConsumer is one declared load on a power_budget contract. CurrentA is the contract value. It is not read from a datasheet or a part field.
type PowerSource ¶ added in v0.11.0
PowerSource is the declared current limit for one power_budget contract. MaxCurrentA is the contract value. It is not read from a datasheet or a part field.
type ProvedCoverage ¶ added in v0.18.0
ProvedCoverage counts dedicated bus-pin checks that passed. RuleIDs lists the pin-function rules that passed at least once.
type Provenance ¶ added in v0.3.1
type Provenance struct {
Source string `json:"source"`
SourceID string `json:"source_id,omitempty"`
Detail string `json:"detail,omitempty"`
}
Provenance records where a deterministic contract or finding came from.
type RefusedFinding ¶ added in v0.18.0
type RefusedFinding struct {
RuleID string `json:"rule_id"`
Severity string `json:"severity"`
ComponentRef string `json:"component_ref,omitempty"`
Net string `json:"net,omitempty"`
Pin string `json:"pin,omitempty"`
Message string `json:"message,omitempty"`
Expected *Evidence `json:"expected,omitempty"`
Observed *Evidence `json:"observed,omitempty"`
Citations []Citation `json:"citations,omitempty"`
}
RefusedFinding is an existing ERROR or WARN finding. Unchecked pins are not copied here and do not change the exit code.
type Requirement ¶ added in v0.3.1
type Requirement struct {
Type ContractType `json:"type"`
Scope ContractScope `json:"scope"`
MinVoltage *float64 `json:"min_voltage,omitempty"`
MaxVoltage *float64 `json:"max_voltage,omitempty"`
MaxCurrent *float64 `json:"max_current,omitempty"`
MinOhms *float64 `json:"min_ohms,omitempty"`
MaxOhms *float64 `json:"max_ohms,omitempty"`
MaxUtilizationPct *float64 `json:"max_utilization_pct,omitempty"`
// Nets and Participants are set for ContractConnected.
// Nets are schematic net names, not peripheral names such as SPI2.
// ChipSelects is set for an SPI connected contract that names per-slave chip-select nets.
// ResistanceOhms and TerminatorCount are set for ContractTerminated.
// Terminated nets are the two signal nets a terminator must span.
// PowerSource, PowerConsumers, and MinimumMarginPct are set for ContractPowerBudget.
// Those currents are contract values. The check does not read part fields or nets.
Nets []string `json:"nets,omitempty"`
Participants []InterfaceParticipant `json:"participants,omitempty"`
ChipSelects []ChipSelect `json:"chip_selects,omitempty"`
ResistanceOhms *float64 `json:"resistance_ohms,omitempty"`
TerminatorCount *int `json:"terminator_count,omitempty"`
PowerSource *PowerSource `json:"power_source,omitempty"`
PowerConsumers []PowerConsumer `json:"power_consumers,omitempty"`
MinimumMarginPct *float64 `json:"minimum_margin_pct,omitempty"`
Severity string `json:"severity,omitempty"`
Message string `json:"message,omitempty"`
Fix string `json:"fix,omitempty"`
ContractID string `json:"contract_id,omitempty"`
ContractSource ContractSourceKind `json:"contract_source,omitempty"`
ContractFile string `json:"contract_file,omitempty"`
Provenance Provenance `json:"provenance,omitempty"`
}
Requirement is the normalized rule input for one electrical constraint.
type SystemContract ¶ added in v0.3.1
type SystemContract struct {
ID string `json:"id,omitempty"`
MPN string `json:"mpn"`
Manufacturer string `json:"manufacturer,omitempty"`
Aliases []string `json:"aliases,omitempty"`
Description string `json:"description,omitempty"`
Scope ContractScope `json:"scope,omitempty"`
Requirements []Requirement `json:"requirements"`
GroundPins []string `json:"-"`
// PinFunctions are cited datasheet pins. They are not inferred currents.
PinFunctions []PinFunction `json:"pin_functions,omitempty"`
SourceKind ContractSourceKind `json:"source_kind,omitempty"`
ContractFile string `json:"contract_file,omitempty"`
Provenance Provenance `json:"provenance"`
}
SystemContract is a deterministic component contract. It is intentionally small: it describes known electrical requirements for one concrete MPN or alias set, not a generic searchable parts database.
func BuiltinContracts ¶ added in v0.3.1
func BuiltinContracts() []SystemContract
BuiltinContracts returns the small curated v0.3.1 catalog. Built-in contracts are intentionally minimal. This is NOT a general-purpose parts database.
func LoadYAMLFile ¶ added in v0.4.0
func LoadYAMLFile(path string) ([]SystemContract, error)
LoadYAMLFile parses and validates a v1 project contracts file.
type UncheckedItem ¶ added in v0.18.0
type UncheckedItem struct {
Ref string `json:"ref"`
Pin string `json:"pin,omitempty"`
Net string `json:"net,omitempty"`
Reason string `json:"reason"`
}
UncheckedItem is a part or pin the pin-function rules did not check.
type UserYAMLSource ¶ added in v0.4.0
type UserYAMLSource struct {
// contains filtered or unexported fields
}
UserYAMLSource adapts already validated project contracts into ContractIR.
func NewUserYAMLSource ¶ added in v0.4.0
func NewUserYAMLSource(path string, loaded []SystemContract) UserYAMLSource
NewUserYAMLSource wraps loaded YAML contracts as a ContractSource.
func (UserYAMLSource) Enrich ¶ added in v0.4.0
func (s UserYAMLSource) Enrich(_ *ir.DesignIR) (*ContractIR, error)
Enrich adds user YAML requirements to ContractIR.
func (UserYAMLSource) Name ¶ added in v0.4.0
func (s UserYAMLSource) Name() string
Name returns the stable source name used in provenance.