-
Notifications
You must be signed in to change notification settings - Fork 0
/
Delay_2x3.smt2
50 lines (40 loc) · 1.3 KB
/
Delay_2x3.smt2
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;(define-sort ColSubset () (_ BitVec 3) ) ; #Defining the Subset type
(declare-const M11P Bool)
(declare-const M12P Bool)
(declare-const M13P Bool)
(declare-const M21P Bool)
(declare-const M22P Bool)
(declare-const M23P Bool)
(declare-const SubR1_C1 Bool)
(declare-const SubR1_C2 Bool)
(declare-const SubR1_C3 Bool)
(declare-const SubR2_C1 Bool)
(declare-const SubR2_C2 Bool)
(declare-const SubR2_C3 Bool)
; #The value of a memristor in t+1
(define-fun MemristorVal((polarity Bool)(Vr Bool)) Bool
(= polarity Vr) ; #Positive polarity memristors turn on when row in true (i.e. Vt)
)
(define-fun ColVal((m1_ Bool)(m2_ Bool)) Bool
(or m1_ m2_)
)
(assert (forall ((r1 Bool)(r2 Bool))
(and
(= r1
(and
(or (not SubR1_C1) (ColVal (MemristorVal M11P r1)(MemristorVal M21P r2)))
(or (not SubR1_C2) (ColVal (MemristorVal M12P r1)(MemristorVal M22P r2)))
(or (not SubR1_C3) (ColVal (MemristorVal M13P r1)(MemristorVal M23P r2)))
)
)
(= r2
(and
(or (not SubR2_C1) (ColVal (MemristorVal M11P r1)(MemristorVal M21P r2)))
(or (not SubR2_C2) (ColVal (MemristorVal M12P r1)(MemristorVal M22P r2)))
(or (not SubR2_C3) (ColVal (MemristorVal M13P r1)(MemristorVal M23P r2)))
)
)
)
))
(check-sat)
(get-value ( M11P SubR1_C1 M12P SubR1_C2 M13P SubR1_C3 M21P SubR2_C1 M22P SubR2_C2 M23P SubR2_C3))