Embedded Domain-Specific Languages

January 1998


This article is fourth in a series concerning the development of knowledge-based applications using Dynamic Objects. See Embedded Domain-Specific Languages (October 1997) for an overview of this emerging trend including a discussion of the integration of knowledge-based applications into multi-tier, client-server architectures and the types of applications that are considered knowledge-based.

The last article, Embedded Domain-Specific Languages (December 1997), focused on the Meta-Object Protocol (MOP), a protocol layer built into Allegro CL's CLOS object system with automatically enforced default rules about how methods are added and classes inherit from super-classes, etc. The MOP is one key feature which makes Allegro CL an ideal development environment for building knowledge-based applications.

Embedded Domain-Specific Languages

In this article we discuss another feature of Dynamic Object systems important for knowledge-based applications-the ability to embed domain-specific languages. Dynamic Objects technology makes it possible to actually build languages to abstract out functionality. That is, they allow the programmer to embed abstraction into the application using domain-specific languages that employ vocabulary, syntax and semantics suited to the problem area. For example, the user of a knowledge-based engineering system is not likely a programmer; the user is likely to be a design engineer. A Dynamic Object system designed to simplify the user's task would offer an embedded domain-specific language using the characteristic terminology and jargon of the domain to express the problem area. The user would be able to access the stored knowledge pertaining to this problem area (and add to the knowledge base) by using familiar vocabulary ("parts", "assemblies", "drawings") rather than by having to learn a programming language vocabulary and syntax. The complexity of the underlying knowledge system is hidden to the user: it is encapsulated or abstracted succinctly.

Special Dynamic Objects Features Support Domain-Specific Languages

What features of Dynamic Objects systems make it easy to build domain-specific languages on top of the base system? Dynamic Object systems enable developers to easily define their own functions and macros (special operators which, through expansion into code, return expressions). This makes it possible to create virtually any programming or scripting language on top of a base Dynamic Objects system. CLOS systems, for example, can easily be extended at the language level. Using a CLOS system, the developer can build an application as a series of layers, with the topmost layer being a user-friendly scripting language with which the non-programmer can easily interact. This style of application development can lead to more extensible, reusable software because the general is effectively separated from the specific. Changes to the uppermost, specific layer can take place to tailor the application to meet particular user requirements; the deeper, more general layers become foundational components that can be reused for different applications. The strength of Dynamic Objects systems for supporting this kind of abstraction is another of the important reasons for their traditional popularity in the development of knowledge-based applications.

Many of the Fortune 1000 are using Dynamic Objects systems to build complex, enterprise-wide knowledge systems. We look at a few of these case studies in the next article.

Copyright © 2020 Franz Inc., All Rights Reserved | Privacy Statement Twitter Google+