Automatic diagnosis of software functional faults by means of inferred behavioral models