Teleological modeling is fundamental to understanding and explaining many complex systems, especially engineered systems. Research on engineering design and problem solving has developed several ontologies for expressing teleology, e.g., FR, FBS, and SBF. In this paper, we view SBF as a programming language. SBF models of engineering systems have been used in several computer programs for automated design and problem solving. The SBF language captures the expressive power of the earlier programs and provides a basis for interactive construction of SBF models. We provide a precise specification of the SBF language. We also describe an interactive model construction tool called SBFAuthor.