The document describes a method for reducing generic software routines that accept alphanumeric inputs and outputs into mathematical functions. It presents a simple example of a routine that reverses a string input. To model this as a function, it introduces a method to assign unique numbers to strings using a dictionary of allowed characters and representing strings as numeric expressions in a given base. It then proves this method mathematically. The goal is to enable testing software routines using standard mathematical testing techniques by mapping routines to well-defined functions.