-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathAction.dfy
More file actions
32 lines (26 loc) · 780 Bytes
/
Copy pathAction.dfy
File metadata and controls
32 lines (26 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// RUN: %dafny /compile:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
/*******************************************************************************
* Original: Copyright (c) 2020 Secure Foundations Lab
* SPDX-License-Identifier: MIT
*
* Modifications and Extensions: Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Action {
trait {:termination false} Action<A, R>
{
method Invoke(a: A)
returns (r: R)
requires Requires(a)
ensures Ensures(a, r)
predicate Requires(a: A)
predicate Ensures(a: A, r: R)
}
trait {:termination false} NothingToRequire<A>
{
predicate Requires(a: A){
true
}
}
}