This paper introduces the various forms of analogy in NARS, a general-purpose reasoning system. NARS is an AI system designed to be adaptive and to work with insufficient knowledge and resources. In the system, multiple types of inference, including analogy, deduction, induction, abduction, comparison, and revision, are unified both in syntax and in semantics. The system can also carry out relational and structural analogy, in ways comparable to (though different from) that in some other models of analogy, such as Copycat and SME. The paper addresses several theoretical issues in the study of analogy, including the specification and justification of analogy, the context sensitivity of analogy, as well as the role analogy plays in intelligence and cognition. (C) 2009 Elsevier B.V. All rights reserved.