1 EXHIBIT 5.1 FOLEY, HOAG & ELIOT LLP One Post Office Square Boston, Massachusetts 02109 September 16, 1996 Cayenne Software, Inc. 8 New England Executive Park Burlington, MA 01803 Ladies and Gentlemen: We are familiar with the Registration Statement on Form S-8 transmitted for filing by the Company today (the "S-8 Registration Statement") relating to 706,733 shares (the "Shares") of the Company's Common Stock issuable pursuant to two stock option plans of the Company's wholly-owned subsidiary Cadre Technologies Inc. (the "Plans"). We are familiar with the Company's Articles of Organization and all amendments thereto, its By-Laws and all amendments thereto, the records of all meetings and consents of its Board of Directors and of its stockholders, and its stock records. We have examined such other records and documents as we deemed necessary or appropriate for purposes of rendering this opinion. Based upon the foregoing, we are of the opinion that (a) the Company has corporate power adequate for the issuance of the Shares in the manner set forth in the S-8 Registration Statement, (b) the Company has taken all necessary corporate action required to authorize the issuance and sale of the Shares and (c) when certificates for the Shares have been duly executed and countersigned, and delivered against due receipt of the exercise price therefore in accordance with the Plan, the Shares will be legally issued, fully paid and non-assessable. We consent to the filing of this opinion as an exhibit to the S-8 Registration Statement. Very truly yours, FOLEY, HOAG & ELIOT By: /s/ David W. Walker a Partner