<PAGE>
                                                                    EXHIBIT 10.4
                              AMENDED AND RESTATED

                              INFERENCE CORPORATION

                             1993 STOCK OPTION PLAN

                        (Amended as of January 19, 1999)


1.  Purpose.
    -------

     (a) This Plan document is intended to implement and govern two separate
Stock Option Plans of Inference Corporation, a Delaware Corporation (the
"Company"), and its Parent or Subsidiary Corporation(s), if any:

          (i) the Inference Corporation 1993 Incentive Stock Option Plan ("Plan
     A"); and

          (ii) the Inference Corporation 1993 Nonstatutory Stock Option Plan
     ("Plan B").

Plan A provides for the granting of options that are intended to qualify as
incentive stock options ("Incentive Stock Options") within the meaning of
Section 422(b) of the Internal Revenue Code, as amended (the "Code").  Plan B
provides for the granting of options that are not intended to so qualify.
Unless specified otherwise, all provisions of this Plan relate equally to both
Plan A and Plan B (collectively, the "Plans"), which Plans are condensed into
one plan document solely for purposes of administrative convenience and are not
intended to constitute tandem plans.

     (b) The purpose of these Plans is to retain the best available persons for
positions of substantial responsibility and to provide additional incentives for
the accomplishment of key Company objectives. The Plans are intended to
accomplish this purpose by allowing the Company to grant options ("Options") to
purchase shares of the Company's Series A Common Stock ("Common Stock"). (For
purposes of these Plans, "Parent Corporation" and "Subsidiary Corporation" shall
mean corporations as defined in Code Sections 424(e) and 424(f), respectively.
Additionally, "Company" shall include any Parent Corporation or Subsidiary
Corporation that may exist).

2.  Administration.  The Plans shall be administered as follows:
    --------------

     (a) Except as provided below, the Plans shall be administered by (i) the
Board of Directors or (ii) a committee ("Committee"), which Committee shall be
constituted to satisfy applicable laws. The Plan may be administered by
different Committees with respect to different groups of Optionees. To the
extent that the Board determines it to be desirable to qualify Options granted
hereunder as "performance-based compensation" within the meaning of Section
162(m) of the Code, the Plan shall be administered by a committee of two or more
"outside directors" within the meaning of Section 162(m) of the code. To the
extent desirable to qualify transactions hereunder as exempt under Rule 16b-3 of
the 1934 Act, the transactions contemplated hereunder shall be structured to
satisfy the requirements for exemption under Rule 16b-3.

                                      -1-
<PAGE>

     (b) The Board shall have sole authority in its absolute discretion (i) to
determine which employees, consultants and non-employee directors of the Company
shall receive Options ("Optionees"), and (ii) subject to the express provisions
of these Plans, to determine the time when Options shall be granted, the terms
and conditions of Options other than those terms and conditions fixed under
these Plans, and the number of shares which may be issued upon exercise of the
Options. The Board shall adopt by resolution such rules and regulations as may
be required to carry out the purposes of the Plans and shall have authority to
do everything necessary or appropriate to administer the Plans. All decisions,
determinations and interpretations of the Board shall be final and binding on
all Optionees. Administration of the Plans with respect to members of the
Committee shall not be delegated, but shall at all times remain vested in the
Board. The Board may from time to time remove members from, or add members to,
the Committee, and vacancies in the Committee shall be filled by the Board.
Furthermore, the Board at any time by resolution may abolish the Committee and
revest in the Board the administration of the Plans.

     (c) With respect to Options granted to a member of the Board, the Board
shall take action by a vote sufficient without counting the vote of such member
of the Board, although such member of the Board may be counted in determining
the presence of a quorum at a meeting of the Board which authorizes the granting
of Options to such member of the Board.

     (d) The Committee, if appointed pursuant to this Section 2, shall report to
the Board the name of the person granted Options, the number of shares covered
by each Option and the terms and conditions of each such Option.

     3.  Eligibility.
         -----------

     (a) Persons who shall be eligible to receive Options under these Plans
shall be as follows:

          (i) in the case of Plan A, employees of the Company who render those
     types of services which tend to contribute materially to the success of the
     Company; and

          (ii) in the case of Plan B, employees described in subsection 3(a)(i)
     above, consultants, and any non-employee directors of the Company who
     render those types of services which tend to contribute materially to the
     success of the Company.

     (b) The determination as to whether an employee, consultant or non-employee
director is eligible to receive Options hereunder shall be made by the Board in
its sole discretion, and the decision of the Board shall be binding and final.

     4. Number of Shares. The maximum aggregate number of shares which may be
        ----------------
optioned and sold under these Plans is One Million Six Hundred Twenty-Five
Thousand (1,625,000) shares of authorized but unissued Common Stock of the
Company.  If Options granted under the Plans shall terminate or expire without
being exercised, in whole or in part, the shares subject to such unexercised
Options may again be subjected to an Option under these Plans.

     5. Option Price. The Option Price for shares of Common Stock to be issued
        ------------
under Plan B shall be determined by the Board.  The Option Price for shares of
Common Stock to be issued under Plan A shall be equal to or greater than the
fair market value of such shares on the date on which the Option covering such
shares is granted, except that if on the date on which such Option

                                      -2-
<PAGE>

is granted the Optionee is a Restricted Shareholder, then such Option Price
shall be equal to or greater than one hundred ten percent (110%) of the fair
market value of the shares on the date such Option is granted. For the purposes
of the Plans, a "Restricted Shareholder" is an individual who, at the time an
Option is granted under the Plans, owns stock possessing more than ten percent
(10%) of the total combined voting power of all classes of stock of the Company,
with stock ownership to be determined in light of the attribution rules set
forth in Section 424 (d) of the Code. The term 'fair market value' shall mean:
(i) if shares are exchange-traded or traded on the NASDAQ National Market, the
closing sales price per share of the shares; (ii) if shares are regularly traded
in any over-the-counter market other than the NASDAQ National Market, the
average of the bid and asked prices per share of the shares; and (iii) if shares
are not traded as described in (i) or (ii) above, the per share fair market
value of the shares as determined in good faith by the Board on such basis as
the Board in its sole discretion shall choose. The date of determination of fair
market value with respect to (i) and (ii) above shall be the date of the option
grant, or if no trading in the shares takes place on such date, on the next
preceding trading day on which there has been such trading. The date of
determination of fair market value with respect to (iii) above shall be the date
of the option grant.

     6. Term of the Plans. The Plans shall be effective as of September 15,
        -----------------
1993, and shall continue in effect until September 15, 2003, unless terminated
earlier.  No Option may be granted hereunder after September 15, 2003.

     7. Exercise of Options. Subject to the limitations set forth herein and/or
        -------------------
in any applicable Stock Option Agreement entered into hereunder, Options granted
under these Plans shall be exercisable in accordance with the following rules:

     (a) General. Subject to the other provisions of this Section 7, Options
         -------
shall vest and become exercisable at such times and in such installments as the
Board shall provide, in each individual Stock Option Agreement. Notwithstanding
the foregoing, the Board may in its sole discretion, accelerate the time at
which an Option or installment thereof may be exercised. For purposes of these
Plans, any vested installment of an Option granted hereunder shall be referred
to as an "Accrued Installment."

     (b) Termination of Options. All installments of an Option shall expire and
         ----------------------
terminate on such date(s) as the Board shall determine, but in no event later
than ten (10) years from date such Option was granted (except that an Option
granted under Plan A to a Restricted shareholder shall by its terms not be
exercisable after the expiration of five (5) years from the date such Option was
granted) ("Option Termination Date"). Unless provided otherwise in this Section
7 or in the stock Option Agreement pursuant to which an Option is granted, an
Option may be exercised when Accrued Installments accrue as provided in such
Stock Option Agreement and at any time thereafter until, and including, the day
before the Option Termination Date.

     (c) Dissolution or Liquidation; Merger or Asset Sale. In the event of the
         ------------------------------------------------
proposed dissolution or liquidation of the Company, the Board shall notify each
Optionee as soon as practicable prior to the effective date of such proposed
transaction. The Board in its discretion may provide for an Optionee to have the
right to exercise his or her Option until ten (10) days prior to such
transaction as to all of the optioned stock covered thereby, including shares as
to which the Option would not otherwise be exercisable. To the extent it has not
been previously exercised, an Option will terminate immediately prior to the
consummation of such proposed action.

                                      -3-
<PAGE>

     In the event of a merger of the Company with or into another corporation,
or the sale of substantially all of the assets of the Company, each outstanding
Option shall be assumed or an equivalent option substituted by the successor
corporation or a parent or subsidiary of the successor corporation. In the event
that the successor corporation refuses to assume or substitute for the Option,
the Optionee shall fully vest in and have the right to exercise the Option as to
all of the optioned stock, including shares as to which it would not otherwise
be vested or exercisable. If an Option becomes fully vested and exercisable in
lieu of assumption or substitution in the event of a merger or sale of assets,
the Board shall notify the Optionee in writing or electronically that the Option
shall be fully vested and exercisable for a period of fifteen (15) days from the
date of such notice, and the Option shall terminate upon the expiration of such
period. For the purposes of this paragraph, the Option shall be considered
assumed if, following the merger or sale of assets, the option confers the right
to purchase or receive, for each share of optioned stock subject to the Option
immediately prior to the merger or sale of assets, the consideration (whether
stock, cash, or other securities or property) received in the merger or sale of
assets by holders of Common Stock for each share held on the effective date of
the transaction (and if holders were offered a choice of consideration, the type
of consideration chosen by the holders of a majority of the outstanding shares);
provided, however, that if such consideration received in the merger or sale of
assets is not solely common stock of the successor corporation or its parent,
the Board may, with the consent of the successor corporation, provide for the
consideration to be received upon the exercise of the Option, for each share of
optioned stock subject to the Option, to be solely common stock of the successor
corporation or its parent equal in fair market value to the per share
consideration received by holders of Common Stock in the merger or sale of
assets.

     (d) Termination of Employment Other than by Death or Disability. If the
         -----------------------------------------------------------
employment of an Optionee with the Company is terminated for any reason other
than death or permanent and total disability, any installments under the Option
which have not accrued as of the termination date shall expire and become
unexercisable as of the termination date. All Accrued Installments as of the
termination date shall remain exercisable for a period not to exceed the earlier
of (i) three (3) months following the termination date or (ii) the Option
Termination date.

     (e) Death or Disability of Optionee While Employed. If the employment of an
         ----------------------------------------------
Optionee with the Company is terminated by reason of death or permanent and
total disability, any unexercised Accrued Installments of Options granted
hereunder to such Optionee shall expire and become unexercisable as of the
earlier of:

          (i) The applicable Option Termination Date, or

          (ii) The first anniversary of the date of termination of employment of
     such Optionee by reason of his death or permanent and total disability. Any
     such Accrued Installments of a deceased Optionee may be exercised prior to
     their expiration only by the person or persons to whom the Optionee's
     Option rights pass by will or by laws of descent and distribution. Any
     installments under such a deceased or disabled Optionee's Option that have
     not accrued as of the date of his termination of employment due to death or
     permanent and total disability shall expire and become unexercisable as of
     said termination date. For purposes of these Plans, the term "permanent and
     total disability" shall be defined under Code Section 22(e)(3).

     (f) Extensions. Notwithstanding the provisions covering the exercisability
         ----------
of Options following termination of employment, as described in Sections 7(d)
and (e), respectively, the Board may, in its sole discretion, with the consent
of the Optionee or the Optionee's estate (in the

                                      -4-
<PAGE>

case of the death of Optionee), extend the period of time during which Accrued
Installments shall remain exercisable, provided that in no event shall such
extension go beyond the Option Termination Date. In the case of Incentive Stock
Options, extensions under this Section 7(f) may result in loss of the favorable
treatment accorded incentive stock options under the Code.

     (g) Limitations The following limitations shall apply to grants of Options:
        ------------

          (i) No Optionee shall be granted, in any fiscal year of the Company,
     Options to purchase more than 200,000 shares of Common Stock.

          (ii) In connection with his or her initial service, an Optionee may be
     granted Options to purchase up to an additional 300,000 shares of Common
     Stock which shall not count against the limit set forth in subsection (i)
     above.

          (iii) The foregoing limitations shall be adjusted proportionately in
     connection with any change in the Company's capitalization as described in
     Section 14.

     (h) Exercise of Options. An Option may be exercised in accordance with this
         -------------------
Section 7 as to all or any portion of the shares covered by an Accrued
Installment of the Option from time to time during the applicable option period,
except that an Option shall not be exercisable with respect to fractions of a
share.

     (i) Payment. The Board shall determine the acceptable form of consideration
         -------
for exercising an Option, including the method of payment. In the case of an
Incentive Stock Option, the Board shall determine the acceptable form of
consideration at the time of grant. Such consideration may consist entirely of:
(i) cash; (ii) check; (iii) promissory note; (iv) other shares of Common Stock
which (A) in the case of shares acquired upon exercise of an option, have been
owned by the Optionee for more than six months on the date of surrender, and (B)
have a fair market value on the date of surrender equal to the aggregate
exercise price of the shares as to which said Option shall be exercised; (v)
consideration received by the Company under a cashless exercise program
implemented by the Company in connection with the Plan; (vi) any combination of
the foregoing methods of payment; or (vii) such other consideration and method
of payment for the issuance of shares to the extent permitted by applicable law.

     8. Authorization to Issue Options and Shareholder Approval. Options granted
        -------------------------------------------------------
under the Plans shall be conditioned upon the Company obtaining any required
regulatory permit, free of any conditions not acceptable to the Board,
authorizing the Company to issue such Options; provided, however, such condition
shall lapse as of the effective date of issuance of such permit(s) in a form to
which the Company does not object within sixty (60) days.  The grant of Options
under the Plans also is conditioned on approval of the Plans by the shareholders
of the Company within twelve (12) months after the date hereof, and no Option
shall be granted hereunder unless and until the Plans have been so approved.

     9. Automatic Option Grants to Outside Directors.
        --------------------------------------------

     (a) First Option. Each non-employee director who becomes a non-employee
         ------------
director after the effective date of this Plan shall be automatically granted a
nonstatutory stock option to purchase 20,000 shares of Common Stock (the "First
Option") on the date on which such person first becomes a non-employee director,
whether through election by the shareholders of the

                                      -5-
<PAGE>

Company or appointment by the Board to fill a vacancy; provided, however, that
an employee director who ceases to be an employee director but who remains a
director shall not receive a First Option.

     (b) Subsequent Option. Each non-employee director shall be automatically
         -----------------
granted a Nonstatutory Stock Option to purchase 5,000 shares of Common Stock (a
"Subsequent Option") on the anniversary of the non-employee director's election
to the Board each year; provided that he or she is then a non-employee director.
                        --------

     c) Terms of First Options. The terms of First Options granted hereunder
        ----------------------
shall be as follows:

     (i) the term of each Option shall be ten (10) years.

     (ii) the exercise price per share shall be 100% of the fair market value
per share of Common Stock on the date of grant. In the event that the date of
grant is not a trading day, the exercise price per share of Common Stock shall
be the fair market value on the next trading day immediately following the date
of grant.

     (iii) 25% of the shares of Common Stock subject to the Option shall vest
twelve (12) months after the date of grant, and 1/48 of the shares of Common
Stock subject to the Option shall vest each month thereafter so that 100% of the
shares of Common Stock subject to the Option shall be vested four (4) years from
the grant date, subject to the Optionee remaining an employee, director or
consultant as of such vesting dates.

     (d) Terms of Subsequent Options. The terms of Subsequent Options granted
          ---------------------------
hereunder shall be as follows:

          (i) the term of each Option shall be ten (10) years.

          (ii) the exercise price per share shall be 100% of the fair market
     value per share of Common Stock on the date of grant. In the event that the
     date of grant is not a trading day, the exercise price per share of Common
     Stock shall be the fair market value on the next trading day immediately
     following the date of grant.

          (iii) the shares of Common Stock subject to the Option shall vest in
     equal monthly installments over a one year period beginning three (3) years
     from the date of grant, subject to the Optionee remaining an employee,
     director, or consultant as of such vesting dates.

     (e) All Options granted pursuant to this Section 9 shall become fully
vested and exercisable upon the consummation of any transaction described in
Section 7(c).

     (f) The Option shall be subject to the other provisions of this Plan which
are not inconsistent with the provisions of this Section 9.

     10.  Stock Option Agreement.  The terms and conditions of Options granted
          ----------------------
under the Plans shall be evidenced by a Stock Option Agreement executed by the
Company and the person to whom the Option is granted. Each Stock Option
Agreement shall incorporate these Plans by reference and shall include such
provisions as are determined to be necessary or appropriate by the Board.

                                      -6-
<PAGE>

     11. Amendment or Termination of the Plans.
         -------------------------------------

     (a) The Board may amend, suspend and/or terminate the Plans at any time,
provided, however, that except as provided in Section 14 below, the Board shall
not amend the Plans in the following respects without shareholder approval:

     (b) To increase the maximum number of shares subject to the Plans;

          (i) To change the designation or class of persons eligible to receive
     Options under the Plans;

          (ii) To extend the term of the Plans or the maximum Option exercise
     period; or

          (iii) To decrease the minimum price at which shares may be optioned
     under the Plans.

     (c) Furthermore, the Plans may not, without the approval of the
shareholders, be amended in any manner that would cause Incentive Stock Options
issued hereunder to fail to qualify as Incentive Stock Options as defined in
Code Section 422(b). Notwithstanding the foregoing, no amendment, suspension or
termination of the Plans shall adversely affect Options granted on or prior to
the date thereof, as evidenced by the execution of a Stock Option Agreement by
both the Company and the Optionee, without the consent of such Optionee.

     12.  Options Not Transferable.  Unless determined otherwise by the Board,
          ------------------------
Options granted under these Plans may not be sold, pledged, hypothecated,
assigned, encumbered, gifted or otherwise transferred or alienated in any
manner, either voluntarily or involuntarily by operation of law, other than by
will or the laws of descent or distribution, and may be exercised during the
lifetime of an Optionee only by such Optionee.  If the Board makes an Option
transferable, such Option shall contain such additional terms and conditions as
the Board deems appropriate.

     13.  Restrictions on Issuance of Shares.  The Company, during the term of
          ----------------------------------
these Plans, will use its best efforts to seek to obtain from the appropriate
regulatory agencies any requisite authorization in order to issue and sell such
number of shares of its Common Stock as shall be sufficient to satisfy the
requirements of the Plans.  The inability of the Company to obtain from any such
regulatory agency having jurisdiction thereof the authorization deemed by the
Company's counsel to be necessary to the lawful issuance and sale of any shares
of its stock hereunder shall relieve the Company of any liability in respect of
the nonissuance or sale of such stock as to which such requisite authorization
shall not have been obtained.

     14.  Adjustments Upon Changes In Capitalization.  If the outstanding shares
          ------------------------------------------
of Common Stock of the Company are increased, decreased, changed into or
exchanged for a different number or kind of shares of the Company through
reorganization, recapitalization, reclassification, stock dividend, stock split
or reverse stock split, upon proper authorization of the Board an appropriate
and proportionate adjustment shall be made in the number or kind of shares, and
the per-share option price thereof, which may be issued in the aggregate and to
individual Optionees under these Plans upon exercise of Options granted under
the Plans; provided, however, that no such adjustment need be made if, upon the
advice of counsel, the Board determines that such adjustment may result in the
receipt of federally taxable income to holders of Options granted hereunder or
the holders of
                                      -7-
<PAGE>

Common Stock or other classes of the Company's securities. If any Option granted
under the Plans shall terminate for any reason or expire before such option is
exercised in full, the securities that might otherwise have been issued upon
exercise of such option shall again become available for purposes of these
Plans.

     15. Representations and Warranties. As a condition to the granting and the
         ------------------------------
exercise of any portion of an Option, the Company may require the person
receiving or exercising such Option to make any representation and/or warranty
to the Company as may, in the judgment of counsel to the Company, be required
under any applicable law or regulation, including but not limited to a
representation and warranty that the Option and/or shares are being acquired
only for investment and without any present intention to sell or distribute such
shares if, in the opinion of counsel for the Company, such a representation is
required under the Securities Act of 1933, as amended ("1933 Act"), or any other
applicable law, regulation or rule of any governmental agency.

     16. No Enlargement or Employee Rights. These Plans are purely voluntary on
         ---------------------------------
the part of the Company, and while the Company hopes to continue them
indefinitely, the continuance of the Plans shall not be deemed to constitute a
contract between the Company and any employee, or to be consideration for or a
condition of the employment of any employee. Nothing contained in the Plans
shall be deemed to give any employee the right to be retained in the employ of
the Company or to interfere with the right of the Company to discharge or retire
any employee thereof at any time. No employee shall have any right to or
interest in Options authorized hereunder prior to the grant of such an Option to
such employee, and upon such grant he shall have only such rights and interests
as are expressly provided herein, subject, however, to all applicable provisions
of the Company's Articles of Incorporation, as the same may be amended from time
to time.

     17. Availability of Plans. A copy of these Plans shall be delivered to the
         ---------------------
Secretary of the Company and shall be shown by the Secretary to any eligible
person making reasonable inquiry concerning the Plans.

     18. Applicable Law. These Plans shall be governed by and construed in
         --------------
accordance with the laws of the State of California.

                                      -8-