The Feature Language Extensions (FLX) is a set of programming language constructs designed to enable the programmer to develop a reusable feature program without entangling with the programs of other features. This implies that using FLX, one can add new features without changing existing code, and the programmer may package different combinations of features to meet different customer or market needs.A research version of a FLX to Java compiler is available. FLX programs are invoked from and can reuse Java programs. We have used the compiler to develop many features of a telephony system. The program entanglement problem is general. We choose to implement telephony features because they are among the most complex and difficult to develop.
Back to top
What is a Feature?
We use the term feature to represent a set of related testable functionalities. For examples, the reliable data transport and congestion control are two features of the Internet Transmission Control Protocol (TCP). The term is commonly used in development projects to denote a development unit.
What is 'Program Entanglement' and what are its effects on software development?
The programs of two features are entangled if they appear in the same reusable program unit (e.g. function, procedure or method) of the programming language.When the programs of different features entangle, the implementation of one feature requires changing the code of other features. Changing code is a labor intensive and error prone process. The programs of a feature are not reusable without the other features. In larger development, the programmers must negotiate with each other to determine how their code needs to be changed.Program entanglement is a main reason why software development is difficult.Most existing effort to combat program entanglement focused on architecture design. The effort may succeed initially (many do not) but as more features are added to the system, entanglement becomes severe again and programmer productivity drops.
Why do programs entangle? Is it because the programmers lack skill or because their managers do not give them enough time?
Not really ...
Is it because the programmers use or do not use top-down, bottom up, OOP, waterfall or extreme programming?
These are good ideas suitable for different situations. But in general, they do not solve the program entanglement problem.
So, why do programs entangle?
Programs will entangle if (C1) the features interact, (C2) they are executed in the same sequential process, and (C3) they are implemented by a programming language that requires the programmer to specify execution flow.If the features do not interact, their programs do not have to be entangled. This is where disciplined design (such as OOP) helps. The application dictates (C1) and (C2), and existing general purpose programming languages require (C3). See [LEU05a] for more details.
Huh ... What do you mean by "features interact"?
Two features interact if their behaviors change when their programs are integrated together. The definitions of "behavior" and "integrate" and their implications are given in more details in [LEU05a].The term "feature interaction" was coined by developers of the first electronic switching system at Bell Labs to describe circumstances like when the message termination request comes in and the phone is idle, the programs of the plain old telephone service (POTS) will ring the phone, but if call forwarding is added, the combined program will give a ping-ring then forwards the call to another phone.
How common is "feature interaction"?
It is very pervasive.Take the Internet TCP protocol as an example. Before congestion control was implemented, a duplicated acknowledgement will prompt the sender to retransmit. After congestion control, depending also on other circumstances, the same message may cause the sender to retreat to slow start. Applications that require exception handling encounter feature interaction. Without exception handling, a program running on UNIX will crash when someone hits control-c. When exception handling is added, the program does not terminate and may even ask why are you hitting control-cYou can find feature interaction in networked applications, GUI applications, computer games, financial software, workflow software, software for autonomic systems and so on.
So, are you saying FLX will make programming easier?
Yes, FLX reduces the complexity of writing programs. Our experience in programming the telephony features affirms that. Using FLX, the programmer can focus on developing only the logic of a feature. For example, in writing the programs for the plain old telephone service (POTS), the programmer does not need to worry about nor need to write hooks for call forwarding, three way calling and other features. When writing call forwarding, the programmer does not need to worry about call waiting and other features. FLX supports a design method by which the programmer develops a feature according to a model instead of the code of other features.
What is your experience of using FLX?
We have written about twenty different features and feature packages in FLX for the telephony system. Most of the features were developed by two graduate students over a period of about nine months when they also have to take classes and working on the compiler. Most features, such as POTS and call waiting took the students one or two weeks to do. POTS was implemented with 192 lines of FLX code. In developing the telephony system, the anchor feature POTS does not need to be changed when the other features and feature packages are added. When a feature is developed, the testing can focus on the feature itself. We did not encounter a single case when the implementation or debugging of a feature required changes to other features. When well-tested features are integrated in a feature package, the testing and debugging can focus on the programs in the feature package. There was only one instance when the testing of a feature package revealed an error in one feature, and the bug was fixed only in the code of that feature.
Tell me more We are happy to. Send us your specific questions and we will try our best to answer them. This web site contains some papers and powerpoints that we have written. But better yet, we have example FLX code and a research version (that means it may have bugs and do not do all the semantic checking possible) of a FLX to Java compiler. Try it out and let us know of your experience.