This commit is contained in:
Lily Tsai
2021-02-10 08:39:42 -08:00
commit 34a311648c
63 changed files with 76273 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
package porcupine
import "time"
func CheckOperations(model Model, history []Operation) bool {
res, _ := checkOperations(model, history, false, 0)
return res == Ok
}
// timeout = 0 means no timeout
// if this operation times out, then a false positive is possible
func CheckOperationsTimeout(model Model, history []Operation, timeout time.Duration) CheckResult {
res, _ := checkOperations(model, history, false, timeout)
return res
}
// timeout = 0 means no timeout
// if this operation times out, then a false positive is possible
func CheckOperationsVerbose(model Model, history []Operation, timeout time.Duration) (CheckResult, linearizationInfo) {
return checkOperations(model, history, true, timeout)
}
func CheckEvents(model Model, history []Event) bool {
res, _ := checkEvents(model, history, false, 0)
return res == Ok
}
// timeout = 0 means no timeout
// if this operation times out, then a false positive is possible
func CheckEventsTimeout(model Model, history []Event, timeout time.Duration) CheckResult {
res, _ := checkEvents(model, history, false, timeout)
return res
}
// timeout = 0 means no timeout
// if this operation times out, then a false positive is possible
func CheckEventsVerbose(model Model, history []Event, timeout time.Duration) (CheckResult, linearizationInfo) {
return checkEvents(model, history, true, timeout)
}