examples

package
v0.0.0-...-df44091 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Abs_Contract sopher.AGHyperContract[Abs_ExecutionModel] = sopher.NewAGHyperContract([]sopher.HyperAssertion[Abs_ExecutionModel]{}, []sopher.HyperAssertion[Abs_ExecutionModel]{
	sopher.NewUniversalHyperAssertion[Abs_ExecutionModel](0, 1, sopher.NewPredicateHyperAssertion(func(assignments []Abs_ExecutionModel) bool { e0 := assignments[0]; _ = e0; return e0.ret0 >= 0 })),
	sopher.NewUniversalHyperAssertion[Abs_ExecutionModel](0, 2, sopher.NewPredicateHyperAssertion(func(assignments []Abs_ExecutionModel) bool {
		e0, e1 := assignments[0], assignments[1]
		_, _ = e0, e1
		return !(e0.input >= e1.input) || (e0.ret0 >= e1.ret0)
	}))})
View Source
var Retain_Contract sopher.AGHyperContract[Retain_ExecutionModel] = sopher.NewAGHyperContract(
	[]sopher.HyperAssertion[Retain_ExecutionModel]{},
	[]sopher.HyperAssertion[Retain_ExecutionModel]{sopher.NewUniversalHyperAssertion[Retain_ExecutionModel](0, 2, sopher.NewPredicateHyperAssertion(func(assignments []Retain_ExecutionModel) bool {
		e0, e1 := assignments[0], assignments[1]
		_, _ = e0, e1
		return !(e0.highIn == e1.highIn) || (e0.lowOut == e1.lowOut)
	}))})

Functions

func Abs

func Abs(input int) int

guarantee: forall e0. e0.ret0 >= 0 guarantee: forall e0 e1. !(e0.input >= e1.input) || (e0.ret0 >= e1.ret0)

func Monotone

func Monotone(value float64) float64

assume: forall e. e.value >= 0 && e.value <= 100_000 guarantee: forall e0 e1. e0.value >= e1.value; <-> e0.ret0 >= e1.ret0

func Retain

func Retain(lowIn, highIn int) (lowOut, highOut int)

guarantee: forall e0 e1. !(e0.highIn == e1.highIn) || (e0.lowOut == e1.lowOut)

Types

type Abs_ExecutionModel

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

type Retain_ExecutionModel

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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