Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Unable to use (diff-time) in formal verification as a property, contrary to documentation #1346

@thomashoneyman

Description

@thomashoneyman

Issue description

The Pact documentation notes that diff-time can be used in properties. However, if I attempt to use it in a property as in the below snippet:

(module diff-time-fv GOV
  (defcap GOV () true)
  (defconst EPOCH:time (parse-time "%s" "0"))
  (defun later-than-epoch (timestamp:time)
    @model [(property (>= (diff-time timestamp EPOCH) 0.0))]
    (>= (diff-time timestamp EPOCH) 0.0))
)
(verify "diff-time-fv")

Then I receive the following error:

:OutputFailure: diff-time.repl:5:22: could not parse (>= (diff-time timestamp EPOCH) 0.0): in (diff-time timestamp EPOCH), couldn't find property named diff-time

If I don't use diff-time in the property, I get an warning simply for using diff-time in the body of a function that has a @model:

(module diff-time-fv GOV
  (defcap GOV () true)
  (defconst EPOCH:time (parse-time "%s" "0"))
  (defun later-than-epoch (timestamp:time)
    @model [(property (> 1 0))]
    (>= (diff-time timestamp EPOCH) 0.0))
)
(verify "diff-time-fv")

This produces the following warning:

diff-time.repl:6:8:OutputWarning: Unsupported operation: diff-time: substituting 0.0

This is on Pact 4.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions