mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-27 16:15:12 +03:00
Add new parameter to CrucGen monad
This commit is contained in:
parent
dbce1b1265
commit
aaa7a6cf85
@ -209,31 +209,31 @@ updateReg r upd asgn = do
|
||||
Nothing -> X.throwM (MissingRegisterInState (Some r))
|
||||
Just pair -> return (asgn & MapF.ixF (MS.crucibleIndex pair) %~ upd)
|
||||
|
||||
ppcGenFn :: forall ids s tp v ppc
|
||||
ppcGenFn :: forall ids h s tp v ppc
|
||||
. ( ppc ~ MP.AnyPPC v )
|
||||
=> MP.PPCPrimFn ppc (MC.Value ppc ids) tp
|
||||
-> MS.CrucGen ppc ids s (C.Atom s (MS.ToCrucibleType tp))
|
||||
-> MS.CrucGen ppc ids h s (C.Atom s (MS.ToCrucibleType tp))
|
||||
ppcGenFn fn = do
|
||||
let f :: MC.Value ppc ids a -> MS.CrucGen ppc ids s (A.AtomWrapper (C.Atom s) a)
|
||||
let f :: MC.Value ppc ids a -> MS.CrucGen ppc ids h s (A.AtomWrapper (C.Atom s) a)
|
||||
f x = A.AtomWrapper <$> MS.valueToCrucible x
|
||||
r <- FC.traverseFC f fn
|
||||
MS.evalArchStmt (PPCPrimFn r)
|
||||
|
||||
ppcGenStmt :: forall v ids s ppc
|
||||
ppcGenStmt :: forall v ids h s ppc
|
||||
. ( ppc ~ MP.AnyPPC v )
|
||||
=> MP.PPCStmt ppc (MC.Value ppc ids)
|
||||
-> MS.CrucGen ppc ids s ()
|
||||
-> MS.CrucGen ppc ids h s ()
|
||||
ppcGenStmt s = do
|
||||
let f :: MC.Value ppc ids a -> MS.CrucGen ppc ids s (A.AtomWrapper (C.Atom s) a)
|
||||
let f :: MC.Value ppc ids a -> MS.CrucGen ppc ids h s (A.AtomWrapper (C.Atom s) a)
|
||||
f x = A.AtomWrapper <$> MS.valueToCrucible x
|
||||
s' <- TF.traverseF f s
|
||||
void (MS.evalArchStmt (PPCPrimStmt s'))
|
||||
|
||||
ppcGenTermStmt :: forall v ids s ppc
|
||||
ppcGenTermStmt :: forall v ids h s ppc
|
||||
. ( ppc ~ MP.AnyPPC v )
|
||||
=> MP.PPCTermStmt ids
|
||||
-> MC.RegState (MP.PPCReg ppc) (MC.Value ppc ids)
|
||||
-> MS.CrucGen ppc ids s ()
|
||||
-> MS.CrucGen ppc ids h s ()
|
||||
ppcGenTermStmt ts _rs =
|
||||
void (MS.evalArchStmt (PPCPrimTerm ts))
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 6faa9330b956216c5e3dd4db475dfcc054212cca
|
||||
Subproject commit ca9173d2ca5ffdf55750d676e9e67c297b38d377
|
@ -1 +1 @@
|
||||
Subproject commit 3fc657782df431c7dbddf9aca62c09f155e31e3d
|
||||
Subproject commit 46cdd8be8238a0819d800022c0bb5e4508e0667b
|
Loading…
Reference in New Issue
Block a user