-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abudction heuristic changes. Check for definiton-site counterparts of…
… use-site variables. Another special-case heuristic setting.
- Loading branch information
Showing
10 changed files
with
228 additions
and
63 deletions.
There are no files selected for viewing
Binary file not shown.
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,74 @@ | ||
external type Matrix : num * num | ||
|
||
external val matrix_make : | ||
∀n, k[0 ≤ n ∧ 0 ≤ k]. Num n → Num k → Matrix (n, k) | ||
|
||
external val matrix_get : | ||
∀n, k, i, j[0 ≤ i ∧ i + 1 ≤ n ∧ 0 ≤ j ∧ j + 1 ≤ k]. | ||
Matrix (n, k) → Num i → Num j → Float | ||
|
||
external val matrix_set : | ||
∀n, k, i, j[0 ≤ i ∧ i + 1 ≤ n ∧ 0 ≤ j ∧ j + 1 ≤ k]. | ||
Matrix (n, k) → Num i → Num j → Float → () | ||
|
||
external val matrix_dim1 : | ||
∀n, k[0 ≤ n ∧ 0 ≤ k]. Matrix (n, k) → Num n | ||
|
||
external val matrix_dim2 : | ||
∀n, k[0 ≤ n ∧ 0 ≤ k]. Matrix (n, k) → Num k | ||
|
||
datatype Array : type * num | ||
|
||
external val array_make : ∀n, a[0 ≤ n]. Num n → a → Array (a, n) | ||
|
||
external val array_get : | ||
∀n, k, a[0 ≤ k ∧ k + 1 ≤ n]. Array (a, n) → Num k → a | ||
|
||
external val array_set : | ||
∀n, k, a[0 ≤ k ∧ k + 1 ≤ n]. Array (a, n) → Num k → a → () | ||
|
||
external val array_length : ∀n, a[0 ≤ n]. Array (a, n) → Num n | ||
|
||
external val n2f : ∀n. Num n → Float | ||
|
||
external val equal : ∀a. a → a → Bool | ||
|
||
external val leq : ∀a. a → a → Bool | ||
|
||
external val less : ∀a. a → a → Bool | ||
|
||
external val minus : Float → Float → Float | ||
|
||
external val plus : Float → Float → Float | ||
|
||
external val mult : Float → Float → Float | ||
|
||
external val div : Float → Float → Float | ||
|
||
external val fabs : Float → Float | ||
|
||
external val fl0 : Float | ||
|
||
external val fl1 : Float | ||
|
||
external getRow : | ||
∀n, k, i[0 ≤ k ∧ 0 ≤ i ∧ i + 1 ≤ n]. | ||
Matrix (n, k) → Num i → Array (Float, k) | ||
|
||
external putRow : | ||
∀n, k, i, j[0 ≤ j ∧ 0 ≤ i ∧ i + 1 ≤ n ∧ j ≤ k]. | ||
Matrix (n, k) → Num i → Array (Float, j) → () | ||
|
||
external rowSwap : | ||
∀i, j, k, n[0 ≤ n ∧ 0 ≤ k ∧ k + 1 ≤ i ∧ n + 1 ≤ i ∧ | ||
0 ≤ j]. Matrix (i, j) → Num k → Num n → () | ||
|
||
external norm : | ||
∀i, k, n[0 ≤ n ∧ n + 1 ≤ i ∧ k ≤ i]. | ||
Array (Float, i) → Num k → Num n → () | ||
|
||
external rowElim : | ||
∀i, j, k, n[0 ≤ n ∧ n + 1 ≤ i ∧ k ≤ i ∧ k ≤ j]. | ||
Array (Float, j) → Array (Float, i) → Num k → Num n → () | ||
|
||
val gauss : ∀k, n[0 ≤ n ∧ n + 1 ≤ k]. Matrix (n, k) → () |
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
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
Oops, something went wrong.