Skip to content

Commit 0379a30

Browse files
Move Veir data types to Veir/Data (#227)
This follows Lean's repository layout and implements @luisacicolini's suggestion in #178.
1 parent cb51e1f commit 0379a30

15 files changed

Lines changed: 34 additions & 34 deletions

File tree

Veir.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Veir.Dialects
1+
import Veir.Data
22

33
import Veir.IR.Basic
44
import Veir.IR.Fields

Veir/Data.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module
2+
3+
import Veir.Data.LLVM

Veir/Data/LLVM.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module
2+
3+
public import Veir.Data.LLVM.Int
4+
public import Veir.Data.LLVM.Byte

Veir/Data/LLVM/Byte.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module
2+
3+
public import Veir.Data.LLVM.Byte.Basic
4+
public import Veir.Data.LLVM.Byte.Lemmas
5+
public import Veir.Data.LLVM.Byte.Examples
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module
22

3-
public import Veir.Dialects.LLVM.Int.Basic
3+
public import Veir.Data.LLVM.Int.Basic
44

5-
namespace Veir.Dialects.LLVM
5+
namespace Veir.Data.LLVM
66

77
namespace Byte
88

Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module
22

33
import Std.Tactic.BVDecide
4-
import Veir.Dialects.LLVM.Byte.Basic
5-
import all Veir.Dialects.LLVM.Byte.Lemmas
4+
import Veir.Data.LLVM.Byte.Basic
5+
import all Veir.Data.LLVM.Byte.Lemmas
66

77

8-
namespace Veir.Dialects.LLVM.Byte
8+
namespace Veir.Data.LLVM.Byte
99

1010
example (w : Nat) (x y : Byte w) : x ||| y = y ||| x := by
1111
simp only [or_eq]
@@ -14,4 +14,4 @@ example (w : Nat) (x y : Byte w) : x ||| y = y ||| x := by
1414
example (x y : Byte 8) : x ||| y = y ||| x := by
1515
bv_decide
1616

17-
end Veir.Dialects.LLVM.Byte
17+
end Veir.Data.LLVM.Byte
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module
22

3-
import all Veir.Dialects.LLVM.Byte.Basic
3+
import all Veir.Data.LLVM.Byte.Basic
44

5-
namespace Veir.Dialects.LLVM.Byte
5+
namespace Veir.Data.LLVM.Byte
66

7-
open Veir.Dialects.LLVM.Int
7+
open Veir.Data.LLVM.Int
88

99
theorem toInt_fromInt {w : Nat} (x : Int w) (h : 0 < w) : (Byte.fromInt x).toInt = x := by
1010
simp only [Byte.toInt, fromInt]
@@ -74,4 +74,4 @@ theorem val_xor {w : Nat} (x y : Byte w) :
7474
(x ^^^ y).val = (x.val ^^^ y.val) &&& ~~~(x.poison ||| y.poison) := by
7575
simp [xor_eq]
7676

77-
end Veir.Dialects.LLVM.Byte
77+
end Veir.Data.LLVM.Byte

Veir/Data/LLVM/Int.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module
2+
3+
public import Veir.Data.LLVM.Int.Basic
4+
public import Veir.Data.LLVM.Int.Lemmas
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module
22

3-
namespace Veir.Dialects.LLVM
3+
namespace Veir.Data.LLVM
44

55
public section
66

@@ -42,4 +42,4 @@ def cast {w₁ w₂ : Nat} (x : Int w₁) (h : w₁ = w₂) : Int w₂ :=
4242

4343
end Int
4444
end
45-
end Veir.Dialects.LLVM
45+
end Veir.Data.LLVM
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module
22

3-
import all Veir.Dialects.LLVM.Int.Basic
3+
import all Veir.Data.LLVM.Int.Basic
44

5-
open Veir.Dialects.LLVM
5+
open Veir.Data.LLVM
66

7-
namespace Veir.Dialects.LLVM.Int
7+
namespace Veir.Data.LLVM.Int
88

99
/- # add -/
1010

0 commit comments

Comments
 (0)