Frame technology (software engineering)

Last updated

Frame technology (FT) is a language-neutral (i.e., processes various languages) system that manufactures custom software [1] from reusable, machine-adaptable building blocks, called frames. FT is used to reduce the time, effort, and errors involved in the design, construction, and evolution of large, complex software systems. Fundamental to FT is its ability to stop the proliferation [2] of similar but subtly different components, an issue plaguing software engineering, for which programming language constructs (subroutines, classes, or templates/generics) or add-in techniques such as macros and generators failed to provide a practical, scalable solution.

Contents

A number of implementations of FT exist. Netron Fusion specializes in constructing business software and is proprietary. ART (Adaptive Reuse Technology) is a general-purpose, open-source implementation of FT. Paul G. Bassett invented the first FT in order to automate the repetitive, error-prone editing involved in adapting (generated and hand-written) programs to changing requirements and contexts.

A substantial literature now exists [3] [4] [5] [6] [7] [8] [9] [10] that explains how FT can facilitate most aspects of software's life-cycle, including domain modeling, requirements gathering, architecture and design, construction, testing, documentation, fine tuning and evolution. Independent comparisons of FT to alternative approaches [11] confirm that the time and resources needed to build and maintain complex systems can be substantially reduced. One reason: FT shields programmers from software's inherent redundancies: FT has reproduced COTS object-libraries from equivalent XVCL frame libraries that are two-thirds smaller and simpler; [2] [6] custom business applications are routinely specified and maintained by Netron Fusion SPC frames that are 5% – 15% of the size of their assembled source files. [7]

Frames

Below are two informal descriptions, followed by a more precise definition and explanation.

  1. A frame is an adaptable component on an automated software assembly line. Imagine an auto factory where, instead of having specific bumpers, fenders, and other parts to suit the specifics of each car model, we have just one generic bumper, one generic fender, and so on. Now imagine that these generic parts could be cloned and shaped to fit each car model as it came down the line. Such a fantasy would revolutionize manufacturing; and while impossible for physical parts, this is what frames do for software (and information in general).
  2. A frame is a recipe for "cooking up" a (program) text. Its instructions say how to blend its ingredients – chunks of frame-text within itself – with the ingredients from other frames. The “chef” is a frame processor that carries out the instructions, i.e. the frame commands, which alter (add, modify, delete) ingredients as necessary, to suit the main recipe.

Formally, a frame is a procedural macro consisting of frame-text – zero or more lines of ordinary (program) text and frame commands (that are carried out by FT's frame processor as it manufactures custom programs). Each frame is both a generic component in a hierarchy of nested subassemblies, and a procedure for integrating itself with its subassembly frames (a recursive process that resolves integration conflicts in favor of higher level subassemblies). The outputs are custom documents, typically compilable source modules.

The main commands

The processor transforms frame-text by replacing commands with ordinary text, and by emitting ordinary text as is. Examples: It replaces an invoke by the result of processing the invoked frame; it replaces an assign with nothing; and an instantiate becomes the ordinary text resulting from evaluating the frame parameter's assigned expression, which can be a concatenation of strings, arithmetic expressions, and nested frame parameters.

Component relationships

Assembling Programs From Frame Components.png

Invoke sets up component relationships among frames. For example, in figure 1: F is J’s component and C is J’s subcomponent. Of course, many components may invoke the same subcomponent, as in I and J invoking F, each constructing a different text. The overall component structure forms a generic semilattice, [12] with each frame being the root of a subassembly. Thus C is its own subassembly; F and C are components of the F subassembly, and J, F, and C are components of the J subassembly. [13]

Context scoping

Context scoping is what distinguishes FT from other modeling and construction systems: Each frame constitutes the context into which it integrates its subassembly. In nested subassemblies the lower levels are progressively more context-free because they integrate less information. Integration conflicts are resolved in favor of the most context-sensitive frame to assign or insert a parameter – it becomes read-only to all other frames in that frame's subassembly. [14] In figure 1, frames F and C would conflict if they assign different values to parameter p. So F overrides C – i.e., the frame processor ignores C’s assignment(s) to p, and uses F’s value(s) for p in F and C. Similarly, J can override both F and C, and so on.

Context-scoping matters because all the adjustments needed to fit any number of (sub)components to a given context are explicit and local to that context. Without context-scoping such adjustments are mostly implicit, scattered and hidden within component variants. Not only do such variants tend to proliferate, causing unnecessary redundancy and complexity, but system evolution is also unnecessarily difficult and error-prone.

Specification frames and templates

A specification frame (SPC) is an entire assembly's topmost, hence most context-sensitive frame. The processor starts at an SPC, such as L or M in figure 1, in order to manufacture a complete program or subsystem. While in principle an SPC could customize every detail, in practice an SPC is a small fraction of its entire assembly because most of the exceptions (and exceptions to exceptions, etc.) have already been handled by various subassembly frames.

Given a frame library, SPCs logically entail the programs they construct; thus SPCs replace source files as primary control points. It's routine practice to use templates to create SPCs that create programs, then use SPCs to manage and evolve those programs indefinitely. This practice greatly reduces the number of details that application programmers must know and manage. It also avoids the redundancies, complexities, and errors inherent in copying and editing source texts by hand. Debugging time shrinks as well because most components are reused, hence pretested. Errors tend to localize in SPCs, as they are the least tested.

A template is an archetypal SPC, with embedded comments explaining how to customize it. Typically, there is a small number of types of programs, each type being characterized by a template. By copying and filling it in, programmers convert a template into an SPC without having to remember what frames they need, their component relationships, or what details typically need to be customized.

Frame-based domain-specific languages

An FT-based, domain-specific language (FT-DSL) is a domain-specific language whose semantics (expressed in program code) have been engineered into frames. A typical FT-DSL editor translates between DSL expressions and a frame that will adapt the framed semantics to express program-code equivalents of the DSL expressions. An SPC sitting atop this subassembly can then specify in program code any customizations inexpressible in the domain-specific language. Thus when users regenerate program code from altered DSL expressions, prior customizations are not lost. [15]

Frame engineering

Frame engineering applies software engineering to a frame technology environment. This includes domain analysis, designing, writing, testing, and co-evolving frames along with the systems they construct. [10] Framing occurs both bottom–up and top–down. Bottom–up, frame engineers typically create frames by unifying and parameterizing groups of similar program elements (of any granularity, from text snippets to subsystems) into generic equivalents. The top–down approach combines domain expertise with iterative prototype refinement, constrained by application and architectural requirements, corporate standards, and the desire to evolve a set of reusable assets whose return greatly exceeds the investment. (Reuse is measured by dividing the total size of the frame libraries into the total size of the resulting constructs, and/or by counting individual frame reuses.)

A mature frame library enhances cost-effectiveness because software project stakeholders can restrict their attention to a system's novelties, taking the bulk of its robust components and architecture for granted. A mature library is not static. Frame engineers can, using the select command, evolve reusable frames indefinitely, meeting new requirements without necessitating retrofits to programs manufactured from frames’ previous versions. [7]

Footnotes

  1. Software is emphasized here; but given the appropriate frames, FT can assemble any kind of documents: technical and end-user manuals, UML models, test cases, legal contracts, bills-of-materials, etc.
  2. 1 2 S.Jarzabek and S.Li, "Eliminating Redundancies with a 'Composition and Adaptation' Meta-Programming Technique," Proc. European Software Eng. Conf./ACM/SIGSOFT Symp. Foundations of Software Engineering, (ESEC/FSE 03), ACM Press, 2003, pp. 237–246; received the ACM Distinguished Paper Award
  3. P.G.Bassett "Frame-Based Software Engineering", IEEE Software, July 1987, pp. 9 -16
  4. "C.Holmes and A. Evens, "A Review of Frame Technology." Nov. 28 2003;" (PDF). Archived from the original (PDF) on 2004-07-19. Retrieved 2008-10-10.
  5. F.Sauer, "Metadata Driven Multi-Artifact Code Generation Using Frame Oriented Programming," Workshop on Generative Techniques in the context of Model Driven Architecture (Oopsla 02), 2002
  6. 1 2 H. Basit, D.C. Rajapakse, and S. Jarzabek, "Beyond Templates: A Study of Clones in the STL and some General Implications," Proc. Int'l Conf. Software Eng. (ICSE 05), ACM Press, 2005, pp. 451–459
  7. 1 2 3 P.G. Bassett, Framing Software Reuse: Lessons from the Real World, Prentice Hall, 1997.
  8. S. Jarzabek, Effective Software Maintenance and Evolution: A Reuse-based Approach, Auerbach, 2007.
  9. P.G.Bassett, "The Case for Frame-Based Software Engineering," IEEE Software, July 2007, pp. 90–99
  10. 1 2 P.G.Bassett, "Adaptive Components: Software Engineering's Ace in the Hole," Cutter Consortium's Agile Project Management, Vol.5 #5
  11. I. Grossman and M. Mah, "Independent Research Study of Software Reuse", tech. report, QSM Associates, 1994
  12. The semilattice is generic because its nodes and graph structure can vary, depending on parameter values.
  13. The ambiguity reflects the mental habit of thinking of a subassembly as one component.
  14. Non-nested subassemblies can reassign the same parameter.
  15. Hand editing the same customizations into regenerated code again and again spurred the invention of FT.

Related Research Articles

<span class="mw-page-title-main">Macro (computer science)</span> Rule for substituting a set input with a set output

In computer programming, a macro is a rule or pattern that specifies how a certain input should be mapped to a replacement output. Applying a macro to an input is known as macro expansion. The input and output may be a sequence of lexical tokens or characters, or a syntax tree. Character macros are supported in software applications to make it easy to invoke common command sequences. Token and tree macros are supported in some programming languages to enable code reuse or to extend the language, sometimes for domain-specific languages.

In computer science, a preprocessor is a program that processes its input data to produce output that is used as input in another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers. The amount and kind of processing done depends on the nature of the preprocessor; some preprocessors are only capable of performing relatively simple textual substitutions and macro expansions, while others have the power of full-fledged programming languages.

Generic programming is a style of computer programming in which algorithms are written in terms of data types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplicate code.

In computer programming, a parameter or a formal argument is a special kind of variable used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are the values of the arguments with which the subroutine is going to be called/invoked. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call are evaluated, and the resulting values can be assigned to the corresponding parameters.

Metaprogramming is a programming technique in which computer programs have the ability to treat other programs as their data. It means that a program can be designed to read, generate, analyse or transform other programs, and even modify itself while running. In some cases, this allows programmers to minimize the number of lines of code to express a solution, in turn reducing development time. It also allows programs a greater flexibility to efficiently handle new situations without recompilation.

A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only one or a few pieces of software, such as MUSH soft code. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages, and domain-specific programming languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages.

In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls to pure functions and returning the cached result when the same inputs occur again. Memoization has also been used in other contexts, such as in simple mutually recursive descent parsing. It is a type of caching, distinct from other forms of caching such as buffering and page replacement. In the context of some logic programming languages, memoization is also known as tabling.

ColdFusion Markup Language, more commonly known as CFML, is a scripting language for web development that runs on the Java virtual machine (JVM), the .NET framework, and Google App Engine. Several commercial and free and open-source software implementations of CFML engines are available, including Adobe ColdFusion, Lucee, New Atlanta BlueDragon, Railo, Open BlueDragon, and other CFML server engines.

In software development, code reuse, also called software reuse, is the use of existing software, or software knowledge, to build new software, following the reusability principles.

Quattor is a generic open-source tool-kit used to install, configure, and manage computers. Quattor was originally developed in the framework of European Data Grid project (2001-2004). Since its first release in 2003, Quattor has been maintained and extended by a volunteer community of users and developers, primarily from the community of grid system administrators. The Quattor tool-kit, like other configuration management systems, reduces the staff required to maintain a cluster and facilitates reliable change management. However, three unique features make it particularly attractive for managing grid resources:

In software engineering, inversion of control (IoC) is a design pattern in which custom-written portions of a computer program receive the flow of control from a generic framework. The term "inversion" is historical: a software architecture with this design "inverts" control as compared to procedural programming. In procedural programming, a program's custom code calls reusable libraries to take care of generic tasks, but with inversion of control, it is the framework that calls the custom code.

<span class="mw-page-title-main">Meta-process modeling</span>

Meta-process modeling is a type of metamodeling used in software engineering and systems engineering for the analysis and construction of models applicable and useful to some predefined problems.

A software factory is a structured collection of related software assets that aids in producing computer software applications or software components according to specific, externally defined end-user requirements through an assembly process. A software factory applies manufacturing techniques and principles to software development to mimic the benefits of traditional manufacturing. Software factories are generally involved with outsourced software creation.

In software engineering, domain analysis, or product line analysis, is the process of analyzing related software systems in a domain to find their common and variable parts. It is a model of wider business context for the system. The term was coined in the early 1980s by James Neighbors. Domain analysis is the first phase of domain engineering. It is a key method for realizing systematic software reuse.

Glossary of Unified Modeling Language (UML) terms provides a compilation of terminology used in all versions of UML, along with their definitions. Any notable distinctions that may exist between versions are noted with the individual entry it applies to.

A model transformation language in systems and software engineering is a language intended specifically for model transformation.

<span class="mw-page-title-main">Web template system</span> System in web publishing

A web template system in web publishing allows web designers and developers work with web templates to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic elements based on web request parameters. Web templates support static content, providing basic structure and appearance. Developers can implement templates from content management systems, web application frameworks, and HTML editors.

An application-specific instruction set processor (ASIP) is a component used in system on a chip design. The instruction set architecture of an ASIP is tailored to benefit a specific application. This specialization of the core provides a tradeoff between the flexibility of a general purpose central processing unit (CPU) and the performance of an application-specific integrated circuit (ASIC).

Template may refer to:

Software architecture description is the set of practices for expressing, communicating and analysing software architectures, and the result of applying such practices through a work product expressing a software architecture.