everything to VectorDatatype

This commit is contained in:
Rowan Torbitzky-Lane 2025-01-28 23:11:23 -06:00
parent 60f71bef07
commit 74d95c26aa
6 changed files with 114 additions and 109 deletions

View File

@ -308,3 +308,8 @@ instructionVectorSetNth state@(State {_int = i1 : is}) primAccessor vectorAccess
_ -> state
instructionVectorSetNth state _ _ = state
instructionVectorReplace :: Eq a => State -> Lens' State [a] -> Lens' State [[a]] -> State
instructionVectorReplace state primAccessor vectorAccessor =
case (uncons (view vectorAccessor state), uncons (view primAccessor state)) of
(Just (v1, vs), Just (p1, p2 : ps)) -> state & vectorAccessor .~ (replace v1 [p1] [p2] Nothing : vs) & primAccessor .~ ps
_ -> state

View File

@ -114,8 +114,7 @@ instructionStringReplaceNChar state@(State {_string = s1 : ss, _char = c1 : c2 :
instructionStringReplaceNChar state = state
instructionStringReplaceAllChar :: State -> State
instructionStringReplaceAllChar state@(State {_string = s1 : ss, _char = c1 : c2 : cs}) = state{_string = replace s1 [c1] [c2] Nothing : ss, _char = cs}
instructionStringReplaceAllChar state = state
instructionStringReplaceAllChar state = instructionVectorReplace state char string
instructionStringRemoveFirstChar :: State -> State
instructionStringRemoveFirstChar state@(State {_string = s1 : ss, _char = c1 : cs}) = state {_string = replace s1 [c1] "" (Just 1) : ss, _char = cs}

View File

@ -3,53 +3,53 @@ module Instructions.VectorIntInstructions where
import Instructions.GenericInstructions
import State
instructionIntVectorConcat :: State -> State
instructionIntVectorConcat state = instructionConcat state intVector
instructionVectorIntConcat :: State -> State
instructionVectorIntConcat state = instructionConcat state vectorInt
instructionIntVectorConj :: State -> State
instructionIntVectorConj state = instructionConj state int intVector
instructionVectorIntConj :: State -> State
instructionVectorIntConj state = instructionConj state int vectorInt
instructionIntVectorTakeN :: State -> State
instructionIntVectorTakeN state = instructionTakeN state intVector
instructionVectorIntTakeN :: State -> State
instructionVectorIntTakeN state = instructionTakeN state vectorInt
instructionIntVectorSubVector :: State -> State
instructionIntVectorSubVector state = instructionSubVector state intVector
instructionVectorIntSubVector :: State -> State
instructionVectorIntSubVector state = instructionSubVector state vectorInt
instructionIntVectorFirst :: State -> State
instructionIntVectorFirst state = instructionVectorFirst state int intVector
instructionVectorIntFirst :: State -> State
instructionVectorIntFirst state = instructionVectorFirst state int vectorInt
instructionIntVectorLast :: State -> State
instructionIntVectorLast state = instructionVectorLast state int intVector
instructionVectorIntLast :: State -> State
instructionVectorIntLast state = instructionVectorLast state int vectorInt
instructionIntVectorNth :: State -> State
instructionIntVectorNth state = instructionVectorNth state int intVector
instructionVectorIntNth :: State -> State
instructionVectorIntNth state = instructionVectorNth state int vectorInt
instructionIntVectorRest :: State -> State
instructionIntVectorRest state = instructionRest state intVector
instructionVectorIntRest :: State -> State
instructionVectorIntRest state = instructionRest state vectorInt
instructionIntVectorButLast :: State -> State
instructionIntVectorButLast state = instructionButLast state intVector
instructionVectorIntButLast :: State -> State
instructionVectorIntButLast state = instructionButLast state vectorInt
instructionIntVectorLength :: State -> State
instructionIntVectorLength state = instructionLength state intVector
instructionVectorIntLength :: State -> State
instructionVectorIntLength state = instructionLength state vectorInt
instructionIntVectorReverse :: State -> State
instructionIntVectorReverse state = instructionReverse state intVector
instructionVectorIntReverse :: State -> State
instructionVectorIntReverse state = instructionReverse state vectorInt
instructionIntVectorPushAll :: State -> State
instructionIntVectorPushAll state = instructionPushAll state int intVector
instructionVectorIntPushAll :: State -> State
instructionVectorIntPushAll state = instructionPushAll state int vectorInt
instructionIntVectorMakeEmpty :: State -> State
instructionIntVectorMakeEmpty state = instructionVectorMakeEmpty state intVector
instructionVectorIntMakeEmpty :: State -> State
instructionVectorIntMakeEmpty state = instructionVectorMakeEmpty state vectorInt
instructionIntVectorIsEmpty :: State -> State
instructionIntVectorIsEmpty state = instructionVectorIsEmpty state intVector
instructionVectorIntIsEmpty :: State -> State
instructionVectorIntIsEmpty state = instructionVectorIsEmpty state vectorInt
instructionIntVectorIndexOf :: State -> State
instructionIntVectorIndexOf state = instructionVectorIndexOf state int intVector
instructionVectorIntIndexOf :: State -> State
instructionVectorIntIndexOf state = instructionVectorIndexOf state int vectorInt
instructionIntVectorOccurrencesOf :: State -> State
instructionIntVectorOccurrencesOf state = instructionVectorOccurrencesOf state int intVector
instructionVectorIntOccurrencesOf :: State -> State
instructionVectorIntOccurrencesOf state = instructionVectorOccurrencesOf state int vectorInt
instructionIntVectorSetNth :: State -> State
instructionIntVectorSetNth state = instructionVectorSetNth state int intVector
instructionVectorIntSetNth :: State -> State
instructionVectorIntSetNth state = instructionVectorSetNth state int vectorInt

View File

@ -23,11 +23,11 @@ instructionParameterLoad state@(State {_parameter = (p : _)}) = case p of
(GeneBool val) -> state & bool .~ val : view bool state
(GeneString val) -> state & string .~ val : view string state
(GeneChar val) -> state & char .~ val : view char state
(GeneIntVector val) -> state & intVector .~ val : view intVector state
(GeneFloatVector val) -> state & floatVector .~ val : view floatVector state
(GeneBoolVector val) -> state & boolVector .~ val : view boolVector state
(GeneStringVector val) -> state & stringVector .~ val : view stringVector state
(GeneCharVector val) -> state & charVector .~ val : view charVector state
(GeneVectorInt val) -> state & vectorInt .~ val : view vectorInt state
(GeneVectorFloat val) -> state & vectorFloat .~ val : view vectorFloat state
(GeneVectorBool val) -> state & vectorBool .~ val : view vectorBool state
(GeneVectorString val) -> state & vectorString .~ val : view vectorString state
(GeneVectorChar val) -> state & vectorChar .~ val : view vectorChar state
(StateFunc _) -> undefined
(PlaceInput _) -> undefined
Close -> undefined
@ -57,11 +57,11 @@ interpretExec state@(State {_exec = (e : es)}) =
(GeneBool val) -> interpretExec (state & exec .~ es & bool .~ val : view bool state)
(GeneString val) -> interpretExec (state & exec .~ es & string .~ val : view string state)
(GeneChar val) -> interpretExec (state & exec .~ es & char .~ val : view char state)
(GeneIntVector val) -> interpretExec (state & exec .~ es & intVector .~ val : view intVector state)
(GeneFloatVector val) -> interpretExec (state & exec .~ es & floatVector .~ val : view floatVector state)
(GeneBoolVector val) -> interpretExec (state & exec .~ es & boolVector .~ val : view boolVector state)
(GeneStringVector val) -> interpretExec (state & exec .~ es & stringVector .~ val : view stringVector state)
(GeneCharVector val) -> interpretExec (state & exec .~ es & charVector .~ val : view charVector state)
(GeneVectorInt val) -> interpretExec (state & exec .~ es & vectorInt .~ val : view vectorInt state)
(GeneVectorFloat val) -> interpretExec (state & exec .~ es & vectorFloat .~ val : view vectorFloat state)
(GeneVectorBool val) -> interpretExec (state & exec .~ es & vectorBool .~ val : view vectorBool state)
(GeneVectorString val) -> interpretExec (state & exec .~ es & vectorString .~ val : view vectorString state)
(GeneVectorChar val) -> interpretExec (state & exec .~ es & vectorChar .~ val : view vectorChar state)
(StateFunc func) -> interpretExec $ func state {_exec = es}
(Block block) -> interpretExec (state {_exec = block ++ es})
(PlaceInput val) -> interpretExec (state {_exec = (view input state Map.! val) : es})

View File

@ -15,11 +15,11 @@ data Gene
| GeneBool Bool
| GeneString String
| GeneChar Char
| GeneIntVector [Int]
| GeneFloatVector [Float]
| GeneBoolVector [Bool]
| GeneStringVector [String]
| GeneCharVector [Char]
| GeneVectorInt [Int]
| GeneVectorFloat [Float]
| GeneVectorBool [Bool]
| GeneVectorString [String]
| GeneVectorChar [Char]
| StateFunc (State -> State)
| PlaceInput String
| Close
@ -32,11 +32,11 @@ instance Eq Gene where
GeneString x == GeneString y = x == y
GeneChar x == GeneChar y = x == y
PlaceInput x == PlaceInput y = x == y
GeneIntVector xs == GeneIntVector ys = xs == ys
GeneFloatVector xs == GeneFloatVector ys = xs == ys
GeneBoolVector xs == GeneBoolVector ys = xs == ys
GeneStringVector xs == GeneStringVector ys = xs == ys
GeneCharVector xs == GeneCharVector ys = xs == ys
GeneVectorInt xs == GeneVectorInt ys = xs == ys
GeneVectorFloat xs == GeneVectorFloat ys = xs == ys
GeneVectorBool xs == GeneVectorBool ys = xs == ys
GeneVectorString xs == GeneVectorString ys = xs == ys
GeneVectorChar xs == GeneVectorChar ys = xs == ys
Close == Close = True
StateFunc _ == StateFunc _ = True -- This line is probably not the best thing to do
Block x == Block y = x == y
@ -50,11 +50,11 @@ instance Show Gene where
show (GeneChar x) = "Char: " <> show x
show (StateFunc _) = "Func: unnamed"
show (PlaceInput x) = "In: " <> x
show (GeneIntVector xs) = "Int Vec: " <> show xs
show (GeneFloatVector xs) = "Float Vec: " <> show xs
show (GeneBoolVector xs) = "Bool Vec: " <> show xs
show (GeneStringVector xs) = "String Vec: " <> show xs
show (GeneCharVector xs) = "Char Vec: " <> show xs
show (GeneVectorInt xs) = "Int Vec: " <> show xs
show (GeneVectorFloat xs) = "Float Vec: " <> show xs
show (GeneVectorBool xs) = "Bool Vec: " <> show xs
show (GeneVectorString xs) = "String Vec: " <> show xs
show (GeneVectorChar xs) = "Char Vec: " <> show xs
show Close = "Close"
show (Block xs) = "Block: " <> show xs
@ -66,11 +66,11 @@ data State = State
_bool :: [Bool],
_string :: [String],
_char :: [Char],
_intVector :: [[Int]],
_floatVector :: [[Float]],
_boolVector :: [[Bool]],
_stringVector :: [[String]],
_charVector :: [[Char]],
_vectorInt :: [[Int]],
_vectorFloat :: [[Float]],
_vectorBool :: [[Bool]],
_vectorString :: [[String]],
_vectorChar :: [[Char]],
_parameter :: [Gene],
_input :: Map.Map String Gene
}
@ -89,11 +89,11 @@ emptyState =
_string = [],
_char = [],
_parameter = [],
_intVector = [],
_floatVector = [],
_boolVector = [],
_stringVector = [],
_charVector = [],
_vectorInt = [],
_vectorFloat = [],
_vectorBool = [],
_vectorString = [],
_vectorChar = [],
_input = Map.empty
}
@ -108,10 +108,10 @@ exampleState =
_string = ["abc", "123"],
_char = ['d', 'e', 'f'],
_parameter = [],
_intVector = [[1, 2], [5, 6, 8]],
_floatVector = [[1.234, 9.21], [5.42, 6.221, 8.5493]],
_boolVector = [[True, False], [False, False, True]],
_stringVector = [["this is a sentence", "this is also a sentence"], ["s0", "s1", "s2"]],
_charVector = [['z', 'x'], ['r', 'a', 't', 'l']],
_vectorInt = [[1, 2], [5, 6, 8]],
_vectorFloat = [[1.234, 9.21], [5.42, 6.221, 8.5493]],
_vectorBool = [[True, False], [False, False, True]],
_vectorString = [["this is a sentence", "this is also a sentence"], ["s0", "s1", "s2"]],
_vectorChar = [['z', 'x'], ['r', 'a', 't', 'l']],
_input = Map.empty
}

View File

@ -44,10 +44,10 @@ charTestFunc name goal genome startState =
let state = loadProgram genome startState
in assert (goal == _char (interpretExec state)) putStrLn (name <> " passed test.")
intVectorTestFunc :: String -> [[Int]] -> [Gene] -> State -> IO ()
intVectorTestFunc name goal genome startState =
vectorIntTestFunc :: String -> [[Int]] -> [Gene] -> State -> IO ()
vectorIntTestFunc name goal genome startState =
let state = loadProgram genome startState
in assert (goal == _intVector (interpretExec state)) putStrLn (name <> " passed test.")
in assert (goal == _vectorInt (interpretExec state)) putStrLn (name <> " passed test.")
main :: IO ()
main = do
@ -111,7 +111,7 @@ main = do
codeTestFunc "instructionCodeFirst" [GeneInt 5] [StateFunc instructionCodeFromExec, Block [GeneInt 5, StateFunc instructionIntSub], StateFunc instructionCodeFirst] emptyState
codeTestFunc "instructionCodeLast" [GeneBool True] [StateFunc instructionCodeFromExec, Block [GeneInt 5, StateFunc instructionIntSub, GeneBool True], StateFunc instructionCodeLast] emptyState
codeTestFunc "instructionCodeTail" [Block [GeneFloat 3.2, GeneBool True, GeneInt 3]] [StateFunc instructionCodeFromExec, Block [StateFunc instructionFloatAdd, GeneFloat 3.2, GeneBool True, GeneInt 3], StateFunc instructionCodeTail] emptyState
codeTestFunc "instructionCodeInit" [Block [GeneIntVector [1], GeneFloat 3.2, GeneBool True]] [StateFunc instructionCodeFromExec, Block [GeneIntVector [1], GeneFloat 3.2, GeneBool True, GeneInt 3], StateFunc instructionCodeInit] emptyState
codeTestFunc "instructionCodeInit" [Block [GeneVectorInt [1], GeneFloat 3.2, GeneBool True]] [StateFunc instructionCodeFromExec, Block [GeneVectorInt [1], GeneFloat 3.2, GeneBool True, GeneInt 3], StateFunc instructionCodeInit] emptyState
codeTestFunc "instructionCodeWrap" [Block [GeneInt 3]] [StateFunc instructionCodeFromExec, GeneInt 3, StateFunc instructionCodeWrap] emptyState
codeTestFunc "instructionCodeList" [Block [GeneFloat 5.43, GeneInt 3]] [StateFunc instructionCodeFromExec, GeneInt 3, StateFunc instructionCodeFromExec, GeneFloat 5.43, StateFunc instructionCodeList] emptyState
codeTestFunc "instructionCodeCombine2Blocks" [Block [GeneInt 3, GeneInt 4, GeneInt 1, GeneInt 2]] [StateFunc instructionCodeFromExec, Block [GeneInt 1, GeneInt 2], StateFunc instructionCodeFromExec, Block [GeneInt 3, GeneInt 4], StateFunc instructionCodeCombine] emptyState
@ -129,9 +129,9 @@ main = do
intTestFunc "instructionCodeIfTrue" [6] [GeneBool True, StateFunc instructionCodeFromExec, GeneInt 3, StateFunc instructionCodeFromExec, GeneInt 6, StateFunc instructionCodeIf] emptyState
intTestFunc "instructionCodeIfFalse" [3] [GeneBool False, StateFunc instructionCodeFromExec, GeneInt 3, StateFunc instructionCodeFromExec, GeneInt 6, StateFunc instructionCodeIf] emptyState
intTestFunc "instructionCodeWhen" [6, 3, 6] [GeneInt 6, GeneInt 3, GeneInt 4, GeneInt 2, GeneBool True, StateFunc instructionCodeFromExec, StateFunc instructionIntAdd, StateFunc instructionCodeWhen] emptyState
boolTestFunc "instructionCodeMemberTrue" [True] [StateFunc instructionCodeFromExec, GeneInt 2, StateFunc instructionCodeFromExec, Block [GeneFloat 3.6, GeneInt 2, GeneIntVector [8, 9]], StateFunc instructionCodeMember] emptyState
boolTestFunc "instructionCodeMemberFalse" [False] [StateFunc instructionCodeFromExec, GeneInt 7, StateFunc instructionCodeFromExec, Block [GeneFloat 3.6, GeneInt 2, GeneIntVector [8, 9]], StateFunc instructionCodeMember] emptyState
boolTestFunc "instructionCodeMember2Blocks" [False] [StateFunc instructionCodeFromExec, Block [GeneInt 7, GeneInt 0], StateFunc instructionCodeFromExec, Block [GeneFloat 3.6, GeneInt 2, GeneIntVector [8, 9]], StateFunc instructionCodeMember] emptyState
boolTestFunc "instructionCodeMemberTrue" [True] [StateFunc instructionCodeFromExec, GeneInt 2, StateFunc instructionCodeFromExec, Block [GeneFloat 3.6, GeneInt 2, GeneVectorInt [8, 9]], StateFunc instructionCodeMember] emptyState
boolTestFunc "instructionCodeMemberFalse" [False] [StateFunc instructionCodeFromExec, GeneInt 7, StateFunc instructionCodeFromExec, Block [GeneFloat 3.6, GeneInt 2, GeneVectorInt [8, 9]], StateFunc instructionCodeMember] emptyState
boolTestFunc "instructionCodeMember2Blocks" [False] [StateFunc instructionCodeFromExec, Block [GeneInt 7, GeneInt 0], StateFunc instructionCodeFromExec, Block [GeneFloat 3.6, GeneInt 2, GeneVectorInt [8, 9]], StateFunc instructionCodeMember] emptyState
codeTestFunc "instructionCodeNInBounds" [GeneInt 0] [StateFunc instructionCodeFromExec, Block [GeneInt 0, GeneInt 1, GeneInt 2, GeneInt 3, GeneInt 4, GeneInt 5], GeneInt 0, StateFunc instructionCodeN] emptyState
codeTestFunc "instructionCodeNInBoundsEnd" [GeneInt 5] [StateFunc instructionCodeFromExec, Block [GeneInt 0, GeneInt 1, GeneInt 2, GeneInt 3, GeneInt 4, GeneInt 5], GeneInt 5, StateFunc instructionCodeN] emptyState
codeTestFunc "instructionCodeNModded" [GeneInt 3] [StateFunc instructionCodeFromExec, Block [GeneInt 0, GeneInt 1, GeneInt 2, GeneInt 3, GeneInt 4, GeneInt 5], GeneInt 9, StateFunc instructionCodeN] emptyState
@ -257,29 +257,30 @@ main = do
boolTestFunc "instructionCharIsDigitFalse" [False] [GeneChar 'a', StateFunc instructionCharIsDigit] emptyState
-- vector int instructions
intVectorTestFunc "instructionIntVectorConcat" [[4, 5, 6, 1, 2, 3]] [GeneIntVector [1, 2, 3], GeneIntVector [4, 5, 6], StateFunc instructionIntVectorConcat] emptyState
intVectorTestFunc "instructionIntVectorConj" [[99, 1, 2, 3]] [GeneIntVector [1, 2, 3], GeneInt 99, StateFunc instructionIntVectorConj] emptyState
intVectorTestFunc "instructionIntTakeN" [[1, 2], [6, 7, 8]] [GeneIntVector [6, 7, 8], GeneIntVector [1, 2, 3], GeneInt 2, StateFunc instructionIntVectorTakeN] emptyState
intVectorTestFunc "instructionIntVectorSubVector" [[1, 2, 3]] [GeneIntVector [0, 1, 2, 3, 4, 5], GeneInt 3, GeneInt 1, StateFunc instructionIntVectorSubVector] emptyState
intTestFunc "instructionIntVectorFirst" [1] [GeneIntVector [1,2,3,4,5], StateFunc instructionIntVectorFirst] emptyState
intTestFunc "instructionIntVectorLast" [5] [GeneIntVector [1,2,3,4,5], StateFunc instructionIntVectorLast] emptyState
intTestFunc "instructionIntVectorNthInBounds" [2] [GeneIntVector [1,2,3,4,5], GeneInt 1, StateFunc instructionIntVectorNth] emptyState
intTestFunc "instructionIntVectorNthOverflow" [2] [GeneIntVector [1,2,3,4,5], GeneInt 6, StateFunc instructionIntVectorNth] emptyState
intVectorTestFunc "instructionIntVectorRestFull" [[2,3,4,5]] [GeneIntVector [1,2,3,4,5], StateFunc instructionIntVectorRest] emptyState
intVectorTestFunc "instructionIntVectorRestEmpty" [[]] [GeneIntVector [], StateFunc instructionIntVectorRest] emptyState
intVectorTestFunc "instructionIntVectorButLastFull" [[1,2,3,4]] [GeneIntVector [1,2,3,4,5], StateFunc instructionIntVectorButLast] emptyState
intVectorTestFunc "instructionIntVectorButLastEmpty" [[]] [GeneIntVector [], StateFunc instructionIntVectorButLast] emptyState
intTestFunc "instructionIntVectorLength3" [3] [GeneIntVector [1,2,3], StateFunc instructionIntVectorLength] emptyState
intTestFunc "instructionIntVectorLength0" [0] [GeneIntVector [], StateFunc instructionIntVectorLength] emptyState
intVectorTestFunc "instructionIntVectorReverse" [[4,3,2,1]] [GeneIntVector [1,2,3,4], StateFunc instructionIntVectorReverse] emptyState
intTestFunc "instructionIntVectorPushAllFull" [1,2,3,4,99] [GeneIntVector [1,2,3,4], GeneInt 99, StateFunc instructionIntVectorPushAll] emptyState
intTestFunc "instructionIntVectorPushAllEmpty" [99] [GeneIntVector [], GeneInt 99, StateFunc instructionIntVectorPushAll] emptyState
intVectorTestFunc "instructionIntVectorMakeEmpty" [[]] [StateFunc instructionIntVectorMakeEmpty] emptyState
boolTestFunc "instructionIntVectorIsEmptyTrue" [True] [GeneIntVector [], StateFunc instructionIntVectorIsEmpty] emptyState
boolTestFunc "instructionIntVectorIsEmptyFalse" [False] [GeneIntVector [1,2,3,4], StateFunc instructionIntVectorIsEmpty] emptyState
intTestFunc "instructionIntVectorIndexOf1" [1] [GeneIntVector [1,2,3,4,5], GeneInt 2, StateFunc instructionIntVectorIndexOf] emptyState
intTestFunc "instructionIntVectorIndexOfFail" [-1] [GeneIntVector [], GeneInt 2, StateFunc instructionIntVectorIndexOf] emptyState
intTestFunc "instructionIntVectorOccurrencesOf2" [2] [GeneIntVector [1,2,3,4,2,6,7], GeneInt 2, StateFunc instructionIntVectorOccurrencesOf] emptyState
intTestFunc "instructionIntVectorOccurrencesOf0" [0] [GeneIntVector [1,2,3,4,2,6,7], GeneInt 0, StateFunc instructionIntVectorOccurrencesOf] emptyState
intVectorTestFunc "instructionIntVectorSetNth3" [[0,1,2,99,4,5]] [GeneIntVector [0,1,2,3,4,5], GeneInt 99, GeneInt 3, StateFunc instructionIntVectorSetNth] emptyState
intVectorTestFunc "instructionIntVectorSetNth9" [[0,1,2,99,4,5]] [GeneIntVector [0,1,2,3,4,5], GeneInt 99, GeneInt 9, StateFunc instructionIntVectorSetNth] emptyState
vectorIntTestFunc "instructionVectorIntConcat" [[4, 5, 6, 1, 2, 3]] [GeneVectorInt [1, 2, 3], GeneVectorInt [4, 5, 6], StateFunc instructionVectorIntConcat] emptyState
vectorIntTestFunc "instructionVectorIntConj" [[99, 1, 2, 3]] [GeneVectorInt [1, 2, 3], GeneInt 99, StateFunc instructionVectorIntConj] emptyState
vectorIntTestFunc "instructionIntTakeN" [[1, 2], [6, 7, 8]] [GeneVectorInt [6, 7, 8], GeneVectorInt [1, 2, 3], GeneInt 2, StateFunc instructionVectorIntTakeN] emptyState
vectorIntTestFunc "instructionVectorIntSubVector" [[1, 2, 3]] [GeneVectorInt [0, 1, 2, 3, 4, 5], GeneInt 3, GeneInt 1, StateFunc instructionVectorIntSubVector] emptyState
intTestFunc "instructionVectorIntFirst" [1] [GeneVectorInt [1,2,3,4,5], StateFunc instructionVectorIntFirst] emptyState
intTestFunc "instructionVectorIntLast" [5] [GeneVectorInt [1,2,3,4,5], StateFunc instructionVectorIntLast] emptyState
intTestFunc "instructionVectorIntNthInBounds" [2] [GeneVectorInt [1,2,3,4,5], GeneInt 1, StateFunc instructionVectorIntNth] emptyState
intTestFunc "instructionVectorIntNthOverflow" [2] [GeneVectorInt [1,2,3,4,5], GeneInt 6, StateFunc instructionVectorIntNth] emptyState
vectorIntTestFunc "instructionVectorIntRestFull" [[2,3,4,5]] [GeneVectorInt [1,2,3,4,5], StateFunc instructionVectorIntRest] emptyState
vectorIntTestFunc "instructionVectorIntRestEmpty" [[]] [GeneVectorInt [], StateFunc instructionVectorIntRest] emptyState
vectorIntTestFunc "instructionVectorIntButLastFull" [[1,2,3,4]] [GeneVectorInt [1,2,3,4,5], StateFunc instructionVectorIntButLast] emptyState
vectorIntTestFunc "instructionVectorIntButLastEmpty" [[]] [GeneVectorInt [], StateFunc instructionVectorIntButLast] emptyState
intTestFunc "instructionVectorIntLength3" [3] [GeneVectorInt [1,2,3], StateFunc instructionVectorIntLength] emptyState
intTestFunc "instructionVectorIntLength0" [0] [GeneVectorInt [], StateFunc instructionVectorIntLength] emptyState
vectorIntTestFunc "instructionVectorIntReverse" [[4,3,2,1]] [GeneVectorInt [1,2,3,4], StateFunc instructionVectorIntReverse] emptyState
intTestFunc "instructionVectorIntPushAllFull" [1,2,3,4,99] [GeneVectorInt [1,2,3,4], GeneInt 99, StateFunc instructionVectorIntPushAll] emptyState
intTestFunc "instructionVectorIntPushAllEmpty" [99] [GeneVectorInt [], GeneInt 99, StateFunc instructionVectorIntPushAll] emptyState
vectorIntTestFunc "instructionVectorIntMakeEmpty" [[]] [StateFunc instructionVectorIntMakeEmpty] emptyState
boolTestFunc "instructionVectorIntIsEmptyTrue" [True] [GeneVectorInt [], StateFunc instructionVectorIntIsEmpty] emptyState
boolTestFunc "instructionVectorIntIsEmptyFalse" [False] [GeneVectorInt [1,2,3,4], StateFunc instructionVectorIntIsEmpty] emptyState
intTestFunc "instructionVectorIntIndexOf1" [1] [GeneVectorInt [1,2,3,4,5], GeneInt 2, StateFunc instructionVectorIntIndexOf] emptyState
intTestFunc "instructionVectorIntIndexOfFail" [-1] [GeneVectorInt [], GeneInt 2, StateFunc instructionVectorIntIndexOf] emptyState
intTestFunc "instructionVectorIntOccurrencesOf2" [2] [GeneVectorInt [1,2,3,4,2,6,7], GeneInt 2, StateFunc instructionVectorIntOccurrencesOf] emptyState
intTestFunc "instructionVectorIntOccurrencesOf0" [0] [GeneVectorInt [1,2,3,4,2,6,7], GeneInt 0, StateFunc instructionVectorIntOccurrencesOf] emptyState
vectorIntTestFunc "instructionVectorIntSetNth3" [[0,1,2,99,4,5]] [GeneVectorInt [0,1,2,3,4,5], GeneInt 99, GeneInt 3, StateFunc instructionVectorIntSetNth] emptyState
vectorIntTestFunc "instructionVectorIntSetNth9" [[0,1,2,99,4,5]] [GeneVectorInt [0,1,2,3,4,5], GeneInt 99, GeneInt 9, StateFunc instructionVectorIntSetNth] emptyState
-- vectorIntTestFunc "instructionVectorInt"