!topic LSN024 on Low bid for Ada 9X $Revision: 1.4 $ !reference MS version 4.0 !reference DR meeting 1/92 !from Tucker Taft $Date: 92/01/30 13:51:03 $ !discussion Here is an attempt to list all proposals in MS 4.0 with our view of their importance to the success of Ada 9X. The items marked "essential" reflect the growing consensus that Ada 9X must support object-oriented programming, plus other places where we believe the tradeoffs are overwhelmingly in their favor. The items marked "simplifies" reflect a general consensus that this proposal simplifies the language in all dimensions, with minimal expense to accommodate the change in existing implementations (in some cases, the simplification presumes some related "essential" proposal is accepted). A possible "low" bid on Ada 9X would be to take only the "Essential" and "Simplifies" items. The items marked "&Cheap" are considered to have a very low implementation cost, and represent opportunities to make some users happier with minimal implementor burden. The items marked only "Important" will simplify the use and enhance the utility of Ada for a significant number of users, but may have a non-trivial implementation cost in some compilers. Here the tradeoff analysis is more difficult. -Tuck ================================================================== Item# Importance MS 4.0 Section Proposal ----- ---------- -------------- -------- 01 Essential 3.3 Unified hierarchical type model; specific/class-wide distinction; CLASS attribute 02 Simplifies 3.3.2 Eliminate accuracy subtypes and constraints 03 Essential 3.3.3 Operand matching rules 04 Import&Cheap 3.3.3 Allow T'BASE as a type mark for elem types 05 Not worth it 3.3.3 Allow T'BASE as a type mark for non-elem types. 06 Essential 3.4.1 Tagged types and type extension; Record and private extension 07 Import&Cheap 3.4.1 TAG attribute on class-wide objects and specific types 08 Essential 3.4.2 Primitive ops are dispatching 09 Essential 3.4.2/6.1 Abstract subprograms and types (same as #46) 10 Essential 3.5.2 WIDE_CHARACTER 11 Import&Cheap 3.5.4 Root_integer'CLASS namable as INT_CLASS 12 Import&Cheap 3.5.6 Root_real'CLASS namable as REAL_CLASS 13 (see note 1) 3.5.8/9 Changes to fixed point (note 1: Prefer recent proposal by Ben Brosgol to have syntactically distinguishable decimal fixed point, and then can safely leave "normal" fixed point as it was in Ada 83, except for minor fixups to make it easier to support arbitrary smalls.) 14 Essential 3.6 Class-wide obj constrained by initial value 15 Simplifies 3.6 Composite obj constrained by initial value 16 Import&Cheap 3.6.1 Access discriminants on limited types (Note: with "limited" records there is no need to allow access discrims except when type is limited already -- see 3.8.) 17 Not worth it 3.6.1 Other non-discrete discriminants 18 Essential 3.6.1 New discriminants for type extensions 19 Useful&Cheap 3.6.1 New discriminants for non-extensions 20 Important 3.6.1 Array discriminants 21 Simplifies 3.7.1 -1 .. 100 interpreted as STANDARD.INTEGER 22 Essential 3.7.3 WIDE_STRING 23 Essential 3.8 tagged records 24 Import&Cheap 3.8 limited records 25 Essential 3.8.2 (visible) record extension 26 Essential 3.9 access all T 27 Import&Cheap 3.9 access constant T 28 Essential 3.9 access procedure/function 29 (see note 2) 3.9 access protected procedure/function (Note 2: Essential if protected records retained as solution for interrupt handlers) 30 Essential 3.9/6.1 access parameters (same as #47) 31 Essential 3.9.2 aliased reserved word 32 Essential 3.9.2 ACCESS attribute on objs & subprograms 33 Essential 3.9.2 Scope checking 34 Simplifies 3.10 Drop decl. part ordering requirements 35 Import&Cheap 4.3.2 Iterator in array aggregate 36 Important 4.3.2 Parallel task activation 37 Simplifies 4.4 Eliminate restrictions on OUT parameters 38 Essential 4.5.2 Membership tests for tagged class-wide 39 Simplifies 4.5.3 Simpler concatenate rules 40 Simplifies 4.5.5 Univ-real/int/fixed ops reexpressed using root numeric types. 41 (see note 3) 4.6 Constructor conversions (Note 3: Too many special rules when treated as a "conversion." Prefer a solution where it is an aggregate, perhaps using a syntax proposed long ago by Norm of : (parent_value WITH comp1 => val1, comp2 => val2, ...) 42 Essential 4.6 Conversions between general access types 43 Simplifies 4.9 Allow basic ops in static expressions 44 Important 4.9 Uniform rules for static evaluation (always exact) 45 Simplifies 4.9.1 Concept of static subtype matching 46 Essential 6.1/3.4.2 Abstract subprograms (same as #09) 47 Essential 6.1/3.9 Access parameters (same as #30) 48 Useful 6.3 Renaming acting as body 49 Useful 6.3 Instantiation acting as body 50 Essential 6.3.1 Calling convention concept 51 Simplifies 6.7 "=" treated more like regular operator 52 Essential 7.4.1 Tagged private types 53 Essential 7.4.2 Private extension (Note: there seems no reason to have the optional word "limited" in a private extension now that the extension may be limited only if the parent is.) 54 Simplifies 7.4.4 Deferred constant of any type 55 (see note 4) 7.4.5 Finalization deferred on limited func return (Note 4: Essential to address issue of returning local finalizable object. Low bid is to make it erroneous, just like returning a task outside its master. Then some vendors can choose to do the "right" thing, others can raise PROGRAM_ERROR, and others can ignore the problem, depending on their vision of the OOP market. Medium bid is to make it statically illegal, either with or without generic contract model violations and corresponding upward incompatibilities. Another approach would be to resurrect the user-defined copy function concept. The current mapping based on simply deferring finalization is our very-much-preferred solution.) 56 (see note 5) 8.3 Primitive visibility (Note 5: We believe it is essential to the success of Ada 9X to provide direct visibility to at least the predefined operators. The lack of direct visibility to predefined operators is probably the only serious human engineering flaw in Ada 83, in that both naive and experienced Ada programmers bump into it on a daily basis.) 57 Essential 8.7 New preference rule 58 Important 9.1 Task type discriminants 59 Important 9.1 Task private part 60 Essential 9.2 Root_task'CLASS namable as TASK_CLASS 61 (see note 6) 9.5 Protected records; PR discriminants; PR private part (Note 6: We believe it is essential to satisfy the requirements for fast mutual exclusion and asynchronous signaling. We understand the technical argument that if the linguistic support for real-time is not complete, then it should be abandoned and a non-linguistic approach taken. However, we believe there is a serious danger if Ada 9X appears to be ignoring the revision requirements relating to real-time. Furthermore, there is a large class of simple yet time-critical applications where protected records would provide sufficient light-weight synchronization support, via a single encapsulated language construct.) 62 (see note 6) 9.7.1 Requeue statement 63 Essential 9.8 Delay until 64 Useful&Cheap 9.9.1 Iterators in selective accept (wait) 65 (see note 7) 9.9.2/3 Multi-way entry call Asynchronous transfer of control (Note 7: We believe that it is essential that the requirements associated with asynchronous communication and ATC are satisfied. It seems inevitable that any solution to the requirements would result in a single task possibly waiting on multiple event/entry queues. However, we are willing to support the investigation of non-linguistic alternatives which might only appear in an annex, and which might be sufficiently efficient while still being easier to implement.) 66 Essential 10.1 Child library units; Private child units 67 Important 10.1 Renaming of library units 68 Essential 10.1.2/G.3 Partition concept (same as #C1) 69 Essential 10.5/10.5.1 Addressing the elaboration-order problem (ELABORATE_BODY, static approach, or some other approach) 70 Essential 10.5.1 Pragma PURE 71 Import&Cheap 11.2 Exception occurrence support 72 Not worth it 11.6 Canonical execution order mode (see #E3) 73 Essential 12.1 Tagged generic formals 74 Simplifies 12.1 (<>) discriminant part 75 Essential 12.1 Defer scope checks in spec 76 Essential 12.1 Defer extension compatibility checks in spec 77 Useful 12.1 Defer staticness checks in spec 78 Essential 12.1.2 Generic formal derived types 79 Important 12.1.4 Generic formal packages 80 Import&Cheap 12.2 Allow sharing of exceptions in generic bodies 81 Essential 13.2 Generalized attrib definition clause 82 Import&Cheap 13.2 Object SIZE as specificable attribute 83 Import&Cheap 13.2 COMPONENT_SIZE as specifiable attribute 84 Import&Cheap 13.2 ALIGNMENT as specifiable attribute 85 Simplifies 13.2 ADDRESS as specifiable attribute 86 Simplifies 13.7 Drop pragmas SYSTEM_NAME, STORAGE_UNIT, and MEMORY_SIZE 87 Essential 13.9 INTERFACE_OBJECT, CALLING_CONVENTION, INTERFACE_NAME (or equivalent functionality) 88 Import&Cheap 13.10.3 UNCHECKED_ACCESS attribute 89 Import&Cheap 14.2.2 APPEND_FILE mode for SEQUENTIAL_IO 90 Useful&Cheap 14.3.6 GET_LINE as function 91 Useful&Cheap 14.3.6 STRING'CLASS instead of STRING in TEXT_IO 92 Import&Cheap 14.3.7 GET_INT/PUT_INT on INT_CLASS 93 Import&Cheap 14.3.8 GET_REAL/PUT_REAL on REAL_CLASS 94 Important 14.7 Stream I/O 95 Important 14.7.1 T'READ and T'WRITE --------- Systems Programming Area -------- A1 Import&Cheap G.1.1 INTERFACE(Assembler) A2 Important G.1.1 Support for intrinsics A3 No comment G.1.1 Machine code insertions A4 (see note 8) G.1.2 Interrupt handling (Note 8: We believe that it is essential that the requirement for efficient interrupt handling be satisified in Ada 9X. We also believe that protected record procedures provide the best solution. However, if protected records are dropped, then we must investigate alternatives, which must address both the problem of masking of interrupts, and of signaling between interrupt handlers and other tasks.) A5 Important G.1.3 User-defined allocators A6 Essential G.1.4 User-defined finalization A7 Import&Cheap G.1.5 Pragma PREELABORATE A8 Important G.1.5 Preelaboratable package implemented with no run-time code A9 Important G.1.6 Unsigned integers A10 Important G.1.7 Pragma VOLATILE A11 Essential G.1.7 Pragma ATOMIC (or pragma SHARED) on objects *and* components. A12 Import&Cheap G.1.8 CURRENT_TASK A13 Import&Cheap G.1.8 GET/SET_ATTRIBUTE A14 Import&Cheap G.1.8 E'CALLER attribute --------- Real-Time Programming Area -------- B1 Essential G.2.1.1 Interrupt-level priorities B2 (see note 6) G.2.3 Ceiling priorities B3 Essential G.2.4 Priority queueing B4 Essential G.2.5 Dynamic priority B5 Important G.2.6 Immediate Abort B6 Important G.2.7 Processor Time Accounting B7 Premature G.2.8 Simple tasking B8 Import&Cheap G.2.9 MONOTONIC time --------- Distribution Area -------- C1 Essential G.3/10.1.2 Partition concept (same as #68) C2 Important G.3 Standardized support for distribution --------- Information Systems Area -------- D1 Essential G.4.1 Decimal arithmetic D2 Important G.4.1 Other standardized decimal support D3 Import&Cheap G.4.2 Standardized character manip packages D4 Useful&Cheap G.4.3 Standardized string handling D5 Essential G.4.4 WIDE_TEXT_IO D6 Not worth it G.4.4 Generic TEXT_IO D7 Important G.4.5 Standardizing interfacing capabilities --------- Safety/Security Area -------- E1 Essential G.5.1 Enumerate erroneous situations E2 Essential G.5.2 Enumerate bounded error situations E3 Important G.5.3 Understandable Object Code E4 Useful&Cheap G.5.4 Require reporting of elab order E5 Import&Cheap G.5.13 Assertion pragma (or equivalent) --------- Numerics Area -------- F1 Simplifies G.6.1 Model of real arithmetic F2 Essential G.6.2 Elementary functions F3 Essential G.6.3 Primitive functions F4 Import&Cheap G.6.4 T'MIN/T'MAX F5 Import&Cheap G.6.4 T'MODEL/T'MACHINE (for most compilers) F6 Important G.6.4 ARRAY_SECTION pragma