wip
This commit is contained in:
parent
3024cd2ca1
commit
c1ae162b58
@ -169,9 +169,9 @@ step cfg = do
|
||||
a' <- unlabel a
|
||||
b' <- unlabel b
|
||||
|
||||
v <- label (labelOf a `lub` labelOf b) $ case (a', b') of
|
||||
(V_I32 a'', V_I32 b'') -> V_I32 $ evalBinOp op a'' b''
|
||||
(V_I64 a'', V_I64 b'') -> V_I64 $ evalBinOp op a'' b''
|
||||
v <- label (labelOf a `lub` labelOf b `lub` cfg.progcn) $ case (a', b') of
|
||||
(V_I32 a'', V_I32 b'') -> V_I32 (evalBinOp op a'' b'')
|
||||
(V_I64 a'', V_I64 b'') -> V_I64 (evalBinOp op a'' b'')
|
||||
_ -> error "incompatiable binop"
|
||||
return cfg{stack = v : stack, instrs}
|
||||
|
||||
@ -179,7 +179,7 @@ step cfg = do
|
||||
a' <- unlabel a
|
||||
b' <- unlabel b
|
||||
|
||||
v <- label (labelOf a `lub` labelOf b) $ case (a', b') of
|
||||
v <- label (labelOf a `lub` labelOf b `lub` cfg.progcn) $ case (a', b') of
|
||||
(V_I32 a'', V_I32 b'') -> boolToI32 (evalRelOp op a'' b'')
|
||||
(V_I64 a'', V_I64 b'') -> boolToI32 (evalRelOp op a'' b'')
|
||||
_ -> error "incompatiable binop"
|
||||
@ -204,7 +204,7 @@ test2 = do
|
||||
let config = Config [] [] [] [] [Plain $ I32_Const 6, Taint High, Plain $ I32_Const 7, Plain $ I32_BinOp Add] Low
|
||||
stepUntilFinal config
|
||||
|
||||
test3 :: LIO Lattice2 (Config Lattice2)
|
||||
test3 :: LIO Lattice2 (Config Lattice2)
|
||||
test3 = do
|
||||
let config = Config [] [] [] [] [Plain $ I32_Const 6, Taint High, Plain $ I32_Const 7, Plain $ I32_RelOp Lt] Low
|
||||
stepUntilFinal config
|
||||
|
Loading…
x
Reference in New Issue
Block a user