My type discrimants

Hello,

Attached is the way I organized my questionnaire on types. It is
isomorphic to a tree classification of what kinds of types and typing
are is question. As I explained, the questionnaire is a yes/no
decomposition organized as a tree hierarchy. The logical way to use
the question tree is that one goes on down a branch only if "yes" was
the answer at the question node.

This makes it easy to see a typed RL as a subtree signature (i.e., the
maximal subtree having "yes" on all nodes. In effect, this makes the
number of questions an irrelevant matter as one can simply and safely
ignore subtrees that do not concern a typed RL being so classified.
For example, in a flattened version (such as proposed by Frank), there
is a separate question for collections, sets/bags, then later for
lists, then intervals. In my tree decomposition, collection types is a
parent of sets, bags, list, intervals. Answering "no" to collections
de facto eliminates questions about sets, bags, etc ... I would have
no problem deriving a formal ontology from my tree-driven yes/no
questionnaire. It would be more difficult to do so from a flat one...

If this makes sense to others on this WG, then I suggest that we try
our best to organize all our RIFRAF questionnaires along this line,
or some other that would allow us to see a RL classification ontology
emerge from the set of answers to the questionnaires.

-hak
-- 
Hassan Aït-Kaci
ILOG, Inc. - Product Division R&D
tel/fax: +1 (604) 930-5603 - email: hak @ ilog . com
Reviewing rule languages with types, the following discriminants seem
important.

A. Whether types are processed statically (before runtime) or
   dynamically (at runtime), or both.

B. Whether types are verified or inferred, or both.

C. Whether subtyping is supported.

D. Whether types are simple or have structure (i.e., polymorphic types,
   object types, collection types).

E. Whether higher (i.e., functional, relational) types are allowed.

F. Whether type definitions are allowed, and if so if new types may be
   recursive, opaque or transparent.

Below is a hierarchy of type discriminants that takes the above questions
into account.

------------------------------------------------------------------------
[In what follows: RL = Rule Language. TL = Type Language.]
------------------------------------------------------------------------

0. TYPES?
   Is your RL typed? I.e., do types form an expression language that is
   distinct from the language representing base expressions?

   (yes/no)

1. POLYMORPHIC TYPES?
   Does your TL admit type variables?

   (yes/no)

2. SUBTYPING?
   Do types form a set-denoting inclusion hierarchy?

   (yes/no)

   2.1. STATIC TYPES?
        Are types processed before runtime?

        (yes/no)

        2.1.1 TYPE CHECKING?
              Are specified types verified?

              (yes/no)

        2.1.2 TYPE INFERENCE?
              Are missing types inferred?

              (yes/no)

        2.1.3 TYPE CHECKING AND INFERENCE?
              Are missing types inferred and specified types checked?

              (yes/no)

        2.1.2 NAMED TYPES?
              Do types have specific names?

              (yes/no)

              
              2.1.2.1 TYPE CONSTANTS?
                      Are there predefined (built-in) type names?

                      (yes/no)

                      2.1.2.1.1 COLLECTION TYPE CONSTANTS?
                                Are there predefined collection type names?

                                (yes/no)

              2.1.2.2 TYPE TERMS?
                      Can types be expressions or terms, not just names?

                      (yes/no)
             
                      2.1.2.2.1 CLASS TYPES?
                                Are there class types (with fields and
                                methods) denoting sets of record objects?

                                (yes/no)
                     
                      2.1.2.2.2 DEFINED TYPES?
                                Can one define new type expressions in
                                terms of other types?

                                (yes/no)

                                2.1.2.2.2.1 RECURSIVE TYPES?
                                            Can type definitions be cyclic?

                                            (yes/no)

                                2.1.2.2.2.2 OPAQUE TYPES?
                                            Are defined types new - i.e. do
                                            they hide their type definitions?

                                            (yes/no)

                                2.1.2.2.2.3 TRANSPARENT TYPES?
                                            Are defined types simple aliases
                                            for their type definitions?

                                            (yes/no)

        2.1.3 TYPE VARIABLES?
              Can a type be left unspecified as a type variable?

              (yes/no)

        2.1.4 STRUCTURED TYPES?
              Do types have internal structure?

              (yes/no)

              2.1.4.1 BOXABLE TYPE CONSTANTS?
                      Is there a separation between primitive type
                      constants and other (boxed) types?

                      (yes/no)

              2.1.4.2 FUNCTION TYPES?
                      Are there functional types?

                      (yes/no)

              2.1.4.3 TUPLE TYPES?
                      Are there relational types (a.k.a., positional records)?

                      (yes/no)

                      2.1.4.3.1 NAME TUPLE TYPES?
                                Are there key/value tuple types?

                                (yes/no)

              2.1.4.4 ARRAY TYPES?
                      Are there array types?

                      (yes/no)

                      2.1.4.4.1 COLLECTION-INDEXABLE ARRAY TYPES
                                Can array types allow index types
                                specified as (dynamic) collections?

                                (yes/no)
                      

              2.1.4.5 COLLECTION TYPES?
                      Are there collection-denoting types?

                      (yes/no)

                      2.1.4.5.1 SET TYPES?
                                Are there set types (i.e., ACI containers)

                                (yes/no)
                      
                      2.1.4.5.2 BAG TYPES?
                                Are there bag types (i.e., AC containers)

                                (yes/no)
                      

                      2.1.4.5.3 LIST TYPES?
                                Are there set types (i.e., A containers)

                                (yes/no)
                      
                      2.1.4.5.4 INTERVAL TYPES?
                                Are there numerical range types?

                                (yes/no)

   2.2. DYNAMIC TYPES?
        Does the RL allow dynamically processed types (i.e., contracts)?

        (yes/no)

        2.2.1 EXTENSIONAL TYPES?
              Can types be sets of (dynamically) calculated elements
              extensions (i.e., enumerated)?

              (yes/no)

        2.2.2 INTENSIONAL TYPES?
              Can types be dynamically enforceable constraints expressed
              as set-denoting logical formulae?

              (yes/no)
        
   2.3. BOTH STATIC AND DYNAMIC TYPES?
        Does your system allow both static and dynamic typing?

        (yes/no)

------------------------------------------------------------------------

Received on Tuesday, 29 August 2006 16:36:37 UTC