- From: Francis McCabe <frankmccabe@mac.com>
- Date: Sun, 20 Aug 2006 15:01:30 -0700
- To: W3C RIF WG <public-rif-wg@w3.org>
The purpose of this series of questions is to try to ascertain what kind of support there is for types in the rule language. The range of possible type systems is huge, so it is a little difficult to ensure that one questionnaire covers all the possibilities. 1. Does the language support any form of types on terms, predicates and other program elements? a. Yes b. No (If no, please read following questions, you might decide to re- answer this question.) 2. Does the language support any built-in functions, predicates or actions? a. Yes b. No 3. If yes, does the system dynamically verify that the arity of any use of these built-ins is consistent with the semantics of the built- in? (E.g., do the arithmetic operators verify the correct number of arguments when they are applied during a computation?) a. Yes b. No Note: if yes, the language supports limited dynamic types of functions/predicates etc. 4. If yes to 2, do they perform type safety checks on their input arguments? (E.g., does the arithmetic addition operator verify that the arguments are numbers?) a. Yes b. No 5. If yes, does a type violation cause a different kind of result from a normal failure/negative response? a. Yes b. No Note: if yes, then the language supports dynamic types on terms. 6. Does the language treat an attempt to invoke a non-defined program differently to a failed attempt to use a defined rule/predicate/ function etc.? a. Yes b. No Note: if yes, then the language supports limited types on predicates/ functions/actions etc. 7. Does the language support any form of explicit type language? a. Yes b. No 8. Are terms that denote types syntactically distinct from terms that denote values? a. Yes b. No 9. Are terms that denote types semantically distinct from terms that denote values? a. Yes b. No 10. Are type terms permitted as value terms in rules? a. Yes b. No Note: if yes, then language supports explicit dynamic typing 11. May a type term be a function term (i.e., may a type term contain other type terms as arguments)? a. Yes b. No Note: if yes, then the type language support parametric polymorphism. 12. Which statement is more accurate for the relationship between type terms and other elements of the language: a. The type system induces an abstract interpretation over the sets of rules. b. The type system partitions the universe of elements into disjoint categories. c. The type system represents a system of monadic predicates with a distinguished interpretation. d. All of the above. e. None of the above. Note: this is an attempt to gain a rough characterization of the semantics of types vs the semantics of rules themselves. 13. Is it possible to define arbitrary predicates over type terms? a. Yes b. No Note: if yes, then the language is likely not type decidable. 14. Does the language support any predefined predicates over type terms? a. Yes b. No 15. Does the language support any form of sub-type relation over type terms? a. Yes b. No Note: if yes, then the language supports sub-type polymorphism 16. Does the language support existential types? E.g., is it possible to write rules that can 'recover' a type of an argument whose type is obscured? a. Yes b. No 17. Does the language support type reflection? I.e., can the type of an expression be reified, and can the type of an expression be determined to be consistent with a reified type expression? a. Yes b. No Note: if yes, then the language must also support type casting. 18. Does the language permit annotations on expressions that further constrain the type of the expression? a. Yes b. No Note: if yes, then the language supports type casting. 19. Does the language system perform type consistency verification independently of any queries? a. Yes b. No Note: if yes, then the language supports static type checking 20. Does the language permit queries if one or more type inconsistencies are detected? a. Yes b. No 21. Does the language permit more than one type interpretation of any terms/rules/functions/predicates etc.? a. Yes b. No Note: if yes, then the language is weakly typed, if no, then the language is strongly typed. 22. Does the language permit more than one type for any function/ predicate/action symbol? a. Yes b. No Note: if yes, then the language supports overloading. Note: this is different to previous question, it is possible to be strongly type checked and to support overloading. 23. Does the language permit individual rules to select on the type of the arguments (as opposed to the values of the arguments)? a. Yes b. No Note: if yes, the language supports type restrictions. 24. Does the language support type interfaces? a. Yes b. No 25. Can a type interface include assertions as well as pure type descriptions? a. Yes b. No 26. Can a type interface capture preconditions/postconditions/ invariants? a. Preconditions only b. Preconditions and postconditions c. Preconditions, postconditions and invariants 27. Does the type language permit description of modules/packages? a. Yes b. No 28. Does the type language permit the description of large scale entities such as classes, modules, packages etc.? a. Yes b. No 29. Does the type system support the assembly of rule systems from multiple sources? (I.e., are features such as loading of modules also type safe?) a. Yes b. No 30. Does the language support any form of reference type? a. Yes b. No Note: Reference types are often used in conjunction with re- assignable variables. 31. For parametric polymorphic type systems, are there any distinctions between the types permitted on reference types as compared to non-reference types? a. Yes b. No Note: Many functional programming languages have complex rules associated with the type targets of reference types; such as not permitting polymorphism in such cases.
Received on Sunday, 20 August 2006 22:01:54 UTC