Replacing Items in an NSMutableArray
+ (double)runProgram:(id)program usingVariables:(NSDictionary *)variables {        
    NSMutableArray *stack;
    if ([program isKindOfClass:[NSArray class]]) {


Checking the type of incoming parameters is a little suspicious. Do you really want to allow other parameters and just ignore them?

        stack = [program mutableCopy];


This process would actually be easier if you didn't create a copy, but instead create an empty NSMutableArray and add the filtered objects to it.

        for (int i=0; i&lt;stack.count; i++) {


Presumably, you are using this because you need the indexes to replace the objects. If you stop making a copy, you should be able to replace this a foreach loop over the program.

            /* replace variable values with NSNumber values */
            NSNumber *variableValue = [variables valueForKey:[stack objectAtIndex:i]];
            if ([variableValue isKindOfClass:[NSNumber class]]) {


Again why are you checking types? Are there other things besides numbers in your variables? If there are, do you just want to ignore them?

                [stack replaceObjectAtIndex:i withObject:variableValue];
            }
            /* all variables should be replaced now */


This comment isn't true here, because its on the wrong side of the brace

        }
    }
    return [self popOperandOffProgramStack:stack];
}