18. Non-enforcement except with variation .—Where a plaintiff seeks specific performance of a contract in writing, to which the defendant sets up a variation, the plaintiff cannot obt ain the performance sought, except with the variation so set up, in the following cases, namely:—
(a) where by fraud, mistake of fact or mis-representation, the written contract of which performance is sought is in its terms or effect different from what t he parties agreed to, or does not contain all the terms agreed to between the parties on the basis of which the defendant entered into the contact;
(b) where the object of the parties was to produce a certain legal result which the contract as framed is not calculated to produce;
(c) where the parties have, subsequently to the execution of the contract, varied its terms.