F-Script(ID:5441/fsc002)


object-oriented scripting language with APL influences


Related languages
F-Script => OOPAL   Written using

References:
  • Mougin, Phillipe "F-Script Guide" 1999 view details pdf
  • Mougin, Phillipe "F-Script Reference Manual" 1999 view details
  • Mougin, Philippe "High-level Object Oriented Programming with Array Technology" Proceedings of the international conference on APL-Berlin-2000 conference, p.163-175, July 24-27, 2000, Berlin, Germany view details Abstract: Although classical object-oriented programming languages provide high-level modeling capacities (abstract data type, inheritance etc.), they remain low-level when it comes to data manipulation.
    Addressing this problem with object oriented programming languages is an important mission of today's research. Considerable work has already been done, leading to the development of tools such as object query languages, with mixed results. In this paper, we present the  key points of a new approach to this problem. We propose an enhancement of object oriented programming at the core level, by integrating Array Programming, a high-level model for computing. Our solution is based on an extension to object oriented programming. This integration of object technology and Array Programming allows for highlevel object-oriented programming. At the same time, it opens Array Programming to the powerful world of objects. Extract: Context
    Object Technology (OT) has taken the world by storm, and today constitutes the basis of many development efforts. OT was invented at Xerox Park by Alan Kay in the late 1960s, and is modeled after biological systems. In fact, the way objects communicate by exchanging messages is directly inspired by the communication between living cells. This revolutionary technology and its implications have yet to be fully understood. Despite its great success, it has its own set of internal problems and failures.
    We will take a look at object technology's failure to replace relational technology at the heart of corporate information systems. We must acknowledge the fact that when choosing a core technology many corporations still opt for relational rather than object technologies. Throughout the industry, most of the information systems built for corporations are based upon relational databases. More importantly, the use of object/relational (O/R) mapping is still marginal. This means that in most ISs developed today, the core paradigm for modeling and manipulation of business entities is the relational paradigm. We use OO languages, mostly Java, to build these systems. However, without O/R mapping, business entities are manipulated explicitly using relational algebra via calls to middleware such as JDBC. Indeed, the current commercial failure of Object-Oriented Database Management System (OODMS) is an argument to consider.
    In fact, when relational proponents argued years ago that OODBMSs were a twenty-year step backward, they were right! This criticism prompted a major enhancement of Object Technologies (OT): the development of object query languages. This development was an answer to the lack of high-level features found in traditional object languages. This last sentence may not be very clear. Aren't "abstraction" and "high-level" hallmarks of Object Technology? To answer this question and to understand the problem addressed in this paper, we think it is useful to consider the concepts of "modeling" and "computing" separately. We would argue that, historically speaking, OT has provided a high-level framework for modeling and a low-level framework for computing (object manipulation), especially in regard to the relational theory. OT's capacity to provide high-level modeling comes mainly from the Abstract Data Type (ADT) theory, which is fully supported by OT, as well as from extended modeling capacities like inheritance. With the relational theory, a specific entity, such as a "client" of a corporation, is represented in one or more tuples. The possible operations applying to a single tuple are creating the tuple, destroying the tuple, reading the value of one attribute of the tuple, and setting the value of one attribute of the tuple. Conversely, with OT it is possible to define any operation, including highlevel ones on entities. Indeed, we are not limited to the four operations available on tuples. Clearly, when it comes to modeling, OT can hold its own weight against the relational theory! However, when it comes to data manipulation, OT offers a low-level paradigm: message sending. Message sending is an incredibly powerful mechanism at the core of OT. It supports polymorphism and greatly unifies concepts. Nevertheless, message sending is a very low-level concept. This is rather obvious when we compare it with relational algebra, the base paradigm for data manipulation of the relational theory that was introduced by Codd [Codd70] [Codd72]. Relational algebra defines a small kernel of fundamental operators for the manipulation of relations (i.e. whole groups of tuples) that clearly addresses the typical needs of today's information.
    Addressing this historical problem with OO programming languages is an important mission of today's research in our community. Considerable work has already been done, and has lead to the development of great tools like object query languages. Other solutions are currently being explored such as integrating logic programming with OT or enhancing OT by using Aspect-Oriented Programming (AOP) [AOPW99]. In the mainstream computing industry, many actors have recognized this problem and are trying to address it. For example, Software AG's new application server, Bolero, provides a new object-oriented language (an extension to Java) which integrates a subset of OQL, the object query language standardized by ODMG, in conjunction with an object/relational mapping system.
    However, a pragmatic evaluation of how OT is used by corporations at the core level of their IS should encourage us to explore new solutions. Analysts admit that for the moment OODMSs have been commercial failures. Even François Bancilhon, creator of the O2 system and object database hero, clearly confirmed this situation during his keynote address at the Objet 99-Nantes conference. This would not be a problem if O/R mapping were of common use. But this is clearly not the case–even though modern O/R tools can offer excellent performance1. A third possibility would be to turn to the OO features found in relational databases from such leading vendors as Oracle or Sybase. But few corporations today use the object-oriented features found in these hybrid databases2.
    In this paper, we try to address the problem described in a new way. We propose enhancing OOP at the core level, by integrating Array Programming, a high-level model for computing. This paper is structured as follows: Section 2 gives a brief presentation of Array programming and how it is used today. Section 3 is a brief introduction to object technology. Section 4 introduces the base elements of F-Script syntax. F-Script is a new, object-oriented scripting language implementing our high-level model. In this paper it is used as both an example and a notation. Sections 5 and 6 present the key points of our Array/object integration model. The last sections provide some additional results about the possibility offered by this model and discuss related work. Extract: Description
    The fundamental idea behind Array Programming is that operations apply to an entire set of values. Consequently, Array programming is a high-level programming model that lets us easily operate on whole Arrays of data, without having to resort to explicit loop constructions. For instance, to add two vectors of numbers (say A and B) you simply write A+B. In an Array language such as Fortran 90 [Fox94], the expression A=B+C*SIN(D) is legal, not only for scalar A, B, C, and D but also for cases in which A, B, C, and D are Arrays of exactly the same shape or scale [Willhoft91].
    In APL, the compression function, combined with the basic Array capacities described above, allows you to select the elements of an Array that satisfy particular criteria. For example, the expression (A<60)\A returns all of the elements of A that are less than 60. APL is the seminal language for Array programming. Its creator, Ken Iverson, received the prestigious Turing Award for his work. APL's expressiveness and power are recognized throughout the industry and, as pointed out by ACM SIGAPL, "…comes from its direct manipulation of n-dimensional Arrays of data. The APL primitives express broad ideas of data manipulation. These rich and powerful primitives can be strung together to perform in one line what would require pages in other programming languages." More than a mere programming language, APL and its various dialects can be seen as an active branch of mathematics [Iverson].
    J is a modern dialect of APL created by Ken Iverson. In [Smillie99] Keith Smillie introduces Array programming and J. Many Array languages exist. For example, we can look at K [Whitney93] and Nial [NialSystem] [Glasgow89] [JenKins89].
    It is also worth noting that Array programming provides great synergy with parallel hardware [Albert88].
    Today, Array technology is used in many branches of our industry, from scientific to business computing, including software and hardware design3. Array technology itself takes many forms and is used, for instance, in spreadsheets and in mainstream mathematical and statistical packages. Finally, it is worth noting that one of the fastest growing domains in IS today, decision support with Online Analytical Processing (OLAP), is based on Array technology (using the notion of hypercube to represent data).
    Extract: OT and ADT
    Fundamentally, OT is based on two conceptual and technical pillars: the abstract data type (ADT) theory and dynamic binding. ADT enables implementation of new data types that are adapted to each particular situation and thus facilitates high-level programming. Dynamic binding technology makes it possible to organize information systems in modules (the objects) representing abstract data types that communicate dynamically between each another by sending messages. Communication by sending messages differs from simple procedure calls of non-object languages:
    Each message is sent to a specific object.
    The code executed by the object receiving the message is selected automatically and dynamically at execution according to the message name and the ADT associated with the object (i.e. the class of the object). In the case of a simple procedure call, the code is selected statically at link time. This ability of different objects to respond, each in its own way, to identical messages is called polymorphism [Larkin]. Basically, dynamic binding makes it possible to write a chunk of code that is able to process in the same way various kinds of objects adhering to a same interface (i.e. able to respond to a common set of messages). This model enables high-level, modular programming, high reuse of objects and development using frameworks. This development approach consists in building an object structure, factorizing generic processes and making a host infrastructure for application-oriented objects. This approach enables implementation of flexible and extensible applications.
    Extract: Description
    F-Script is an object-oriented scripting language [Mougin99b] [Mougin99c] we have developed. It is based on our proposed solution for high-level object computing. F-Script is based on the object paradigm. With the exception of a few details, the base syntax and concepts of F-Script are identical to those of Smalltalk4. Of course, when it comes to array programming, F-Script differs significantly from Smalltalk since the latter does not support this technology.
    Like Smalltalk and APL, F-Script provides an interpreted, interactive environment and supports the notion of workspace. F-Script provides a rich set of functionality including object persistence, distributed objects, graphical interface framework, database access, integration with a GUI Builder etc. Like Smalltalk, F-Script is a pure OO language. This means that every entity manipulated with the language is an object, from a simple number to a string to an arbitrarily complex business concept. This unifies the way in which things are manipulated.