Many software and hardware producers take pride in the exponential pace of technological change, but for users and consumers of their products and services the rapid technological obsolescence often means increased costs, frustrations, and unfulfilled promises. Corporate America does not expect investment in goods and equipment are investments that last five, ten, even twenty years, but only a life span of eighteen months for computer software and hardwareUncommon.
Reduce the costs to develop new software solutions or extending the lifetime of software applications are two complementary approaches to addressing technological change. These goals can often applied methodology are met by a declarative strategy when designing software systems independent of the programming.
Problems with Imperative Programming
Most programming projects today use the imperative style of programming. Developerswrite sequences of operations in a language like C + +, Java, Visual Basic, etc., the implementation of an algorithm or formula for the execution of tasks. The algorithm for the task mixes logical, or relational, statements about the problem to be solved and control statements about how to calculate the solution. The logical statements describe "what to" calculate while the control statements describe "how-to" calculate. Debugging the algorithm consists of verifying the accuracy of thelogical statements and fixing the control statements, if necessary.
There are many problems with the imperative approach. The sequence of operations critically determines the correctness of the algorithm. Unexpected execution sequences through an algorithm of user input actions or real-time events in a multitasking environment causes can fail in subtle or catastrophic algorithm. The letter from the control logic is the programmer responsible for it and therefore subjectImplementation error. Understanding a program's algorithm is often difficult for other developers without extensive metadata, or comments about the code and empirical tracing of the execution of the program with sample data. Check program correctness consumes a large part of the development work, but usually do not discover a significant number of defects.
To avoid the problems associated with imperative programming, the computer industry developed and advocated for manyApproaches. Structured programming and campaigns against "go-to" statements address some of the problems discovered with ad hoc control structures and statements. Modularization initiatives stress decomposition techniques on the premise that people better understand, reason about and maintain smaller pieces of code. Object-oriented programming advocates program constructions using reusable components, libraries and frameworks. The pattern programming school stresses analogies to otherAreas such as architecture, by constructing programs using well-designed and crafted solutions or patterns that recur in many programming contexts.
What is declarative programming?
Declarative programming separates the logic, or what, by an algorithm from the control, or how, an algorithm. The programmer still specifies the logic or equations specifying the problem of relations, but the program is responsible for the control, or how the logic is evaluated. Theknown examples are spreadsheets and query languages for relational databases. The user or programmer, is to say, a mathematical relation as a query in SQL, for what to get, while the database engine determines how to execute the query in the database.
There are many advantages to declarative programming over the imperative style. In declarative languages, programmers do not specify sequences of operations, but only definitions or equations specifying relations.Unlike imperative programming, logic relations in declarative programming are execution order independent, free from side effects of evaluation, and semantically clear visual inspection.
The family of declarative programming languages has a long history in academic computer science community and specialized areas of commercial application, such as compiler construction, expert systems and databases. Declarative languages have two family trees. The logic declarativeLanguages such as Prolog, are on the first-order logic, the notions of Aristotelian true or false values generalized statements, or predicates, based on which the relations between all institutions. The other family branch consists of functional declarative languages, such as Miranda, Haskell, and SML. The functional declarative languages are developed on the l-calculus, the mathematician, Alonzo Church in the 1930s. l-calculus formalizes the notions of recursive applicationof pure functions computable problems. Although not widely known as such, is the latest programming fashion, XSLT, an extensible stylesheet language for transforming XML is also a functional declarative language.
Despite the theoretical advantages of declarative programming languages, they have not widely applied in commercial programming practice despite an attempt in the 1980's by Borland to mass-market a PC version of Prolog along with the highly popular Turbo Pascal. There aremany factors contributing to the infrequent use of declarative languages. A big factor is the lack of collegiate training in declarative languages, but awkward syntax of some languages, inefficient compilers and run times, and restricted domains of applicability of generalized "how-to" mechanisms are all contributors.
Using Declarative Strategies in Commercial Software
While declarative programming languages are not widespread commercial use, the receivedStrategy of separating logic, or what control or, as in an algorithm is a powerful, generalized technique for increasing the usability and extend the life of the software. Declarative techniques are particularly powerful in user interfaces and application programming interfaces (APIs), a rich, complex set of inputs have a relatively small area of the execution behavior.
Two examples of commercial software that illustrate the applicability of declarativeDriverLINX techniques and ExceLINX be tested in the areas of data acquisition and instrument control.
With explanations for the data collection
DriverLINX is an API for controlling data acquisition hardware to measure and generate analog and digital signals interfaced to all types of external sensors. Data acquisition applications include laboratory research, medical instruments and industrial process control.
Traditionally, APIs for data acquisition devicesmodels the characteristics of the hardware design and had a large number of functions of one or more parameters to setup the hardware and control data flow through the system. The order of the sequences of operations was often critical to correctly programming and controlling the hardware. Upgrading to new data acquisition hardware was often costly as hardware changes required changes in the sequence of work processes to program the hardware required costly software.
ToTo overcome these problems, DriverLINX takes an abstract and declarative approach to data acquisition programming. Instead of modeling specific board designs, DriverLINX abstracts the functional subsystems of data acquisition hardware into generalized attributes and capabilities. Programs request the measurement task they want by programming a "service request" declaration of conduct. The DriverLINX determined period, as to satisfy the service request with the existing hardware and suppliesthe measurements as a packetized stream to the program. The data acquisition programmer is relieved of any responsibility for data acquisition algorithm control.
Besides relieving the programmer of control responsibility, DriverLINX are abstract, declarative approach of the program syntactic and semantic interchangeability when migrating to equivalent hardware products. The abstract, declarative approach also helps isolate the software vendor from early technologicalObsolescence of change in the computer industry by focusing on the immutable logic of data acquisition relations while the control developments, depending on the software. DriverLINX a viable concept for data acquisition programming for more than 12 years, despite the market evolution from 16-bit Windows . NET today.
With explanations for Test
Testing equipment such as digital voltmeters and electrometers, have evolved from simple devices witha front panel control and display to sophisticated measurement processors perform dozens of measurement and control functions. Such as data acquisition devices, typically developers send a carefully ordered sequence of commands to an instrument to establish the measurement and then send additional command sequences to control the data flow of measurements from the device. The aforementioned problems for developers who must restrict approaches to instrument control significantly easeUse and prohibit quick instrumentation solutions to short-term measurement needs.
ExceLINX is an add-in for Microsoft Excel, the rapid specification of instrument test setups by using worksheet forms can. Users specify, or declare, the channels, configurations, sampling rates, triggering, and data locations for the measurements they wish to perform by filling out an Excel worksheet. If the user selects the "Start" is selected in the toolbar, ExceLINX translates the specification into thecorrect command sequence for the target instrument, initiates the measurement and the data flow back to the desired worksheet. Users can setup and collect measurements even in a few minutes with logic specifications compared to days or weeks of programmer time mandatory requirements.
Intern ExceLINX also uses a declarative approach to treating the complex problem of field validation for the worksheet forms. Instruments have hundreds of parameters with complexOverlap between parameters. To validate whether the instrument supports the parameter selected by the user maintains a dependency tree ExceLINX allowed, not allowed, and unused parameters for every input cell on the worksheet. Each node in the tree also maintains logical relations among the selected set of parameters that are evaluated at run time to ExceLINX cross validation of user input selection. Each tool supports model has different parameter semantics, but can easily ExceLINXthis complexity by switching model trees because the model logic in the validation tree is separate from the shared control implementation in the ExceLINX code.
Declarative programming strategies that separate logic from control in algorithms are powerful techniques that can be used with today's popular imperative languages. These techniques, software more interchangeable, maintainable, usable, and endurable.
Copyright Roy Furman, MD, Ph.D.2005
Thanks To : !: Best HDTV !: Tv Plasma On Sale !8!# Valvetrains Timing Belt Buy Now !8!# Baby Shower This Instant ±69± Purchase Home Theater Screen
No comments:
Post a Comment