-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
132 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Out.Sail.Sail | ||
|
||
open Sail | ||
|
||
/-- Type quantifiers: x : Int, 0 ≤ x ∧ x ≤ 31 -/ | ||
def f_int (x : Nat) : Int := | ||
0 | ||
|
||
/-- Type quantifiers: x : Int, 0 ≤ x ∧ x ≤ 31 -/ | ||
def f_nat (x : Nat) : Nat := | ||
0 | ||
|
||
/-- Type quantifiers: x : Int, k_n : Int, 0 ≤ x ∧ x ≤ k_n -/ | ||
def f_negvar (x : Nat) : Int := | ||
x | ||
|
||
/-- Type quantifiers: x : Int, k_n : Int, 0 ≤ x ∧ x ≤ k_n -/ | ||
def f_nnegvar (x : Nat) : Nat := | ||
x | ||
|
||
/-- Type quantifiers: x : Int, k_n : Int, k_m : Int, k_n ≤ x ∧ x ≤ k_m -/ | ||
def f_unkn (x : Int) : Int := | ||
x | ||
|
||
def initialize_registers : Unit := | ||
() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
default Order dec | ||
$include <prelude.sail> | ||
|
||
|
||
val f_int : range(0, 31) -> range(-2, 2) | ||
function f_int(x) = { | ||
0 | ||
} | ||
|
||
val f_nat : range(0, 31) -> range(0, 2) | ||
function f_nat(x) = { | ||
0 | ||
} | ||
|
||
val f_negvar : forall 'n. range(0, 'n) -> range(- 'n, 'n) | ||
function f_negvar(x) = { | ||
x | ||
} | ||
|
||
val f_nnegvar : forall 'n. range(0, 'n) -> range(0, 'n) | ||
function f_nnegvar(x) = { | ||
x | ||
} | ||
|
||
val f_unkn : forall 'n 'm. range('n, 'm) -> range('n, 'm) | ||
function f_unkn(x) = { | ||
x | ||
} |