findState :: SExpr -> Maybe (String, String)
findState sexpr = case sexpr of
  SList (SSymbol "API::SET-SENTENCE" : SSymbol nodeStr :
         SList (SSymbol "API::ASENTENCE" : SSymbol senStr :
                SSymbol "API::OBLIGATION" : SSymbol "API::PROVED" : _) : _)
    | isPrefixOf "API::" nodeStr && isPrefixOf "API::" senStr
    -> Just (drop 5 nodeStr, drop 5 senStr)
  _ -> Nothing
findState :: SExpr -> Maybe (String, String)
findState sexpr = case sexpr of
  SList (SSymbol "API::SET-SENTENCE" : SSymbol nodeStr :
         SList (SSymbol "API::ASENTENCE" : SSymbol senStr :
                SSymbol "API::OBLIGATION" : SSymbol "API::PROVED" : _) : _)
    | isPrefixOf "API::" nodeStr && isPrefixOf "API::" senStr
    -> Just (drop 5 nodeStr, drop 5 senStr)
  _ -> Nothing
findState sexpr = case sexpr of
  SList (SSymbol "API::SET-SENTENCE" : SSymbol nodeStr :
         SList (SSymbol "API::ASENTENCE" : SSymbol senStr :
                SSymbol "API::OBLIGATION" : SSymbol "API::PROVED" : _) : _)
    | isPrefixOf "API::" nodeStr && isPrefixOf "API::" senStr
    -> Just (drop 5 nodeStr, drop 5 senStr)
  _ -> Nothing