From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) References: <1110059861.560004@athnrd02> <1110266099.441421.179290@o13g2000cwo.googlegroups.com> <1110332933.587110.260410@z14g2000cwz.googlegroups.com> <1110390097.532139.43430@f14g2000cwb.googlegroups.com> <422f3808$0$30165$ba620e4c@news.skynet.be> <1110409958.685759.249420@g14g2000cwa.googlegroups.com> <15SdnYvJ0_x3Vq3fRVn-3Q@megapath.net> <1110522060.091940.178510@l41g2000cwc.googlegroups.com> <1110556346.841594.212520@z14g2000cwz.googlegroups.com> <4952804.Myubg7stsI@linux1.krischik.com> <1462853.JgxLXPrZ7W@linux1.krischik.com> <1110831270.911813.215820@f14g2000cwb.googlegroups.com> <2484756.KTycvJxKQH@linux1.krischik.com> <1110907090.268126.101030@g14g2000cwa.googlegroups.com> <423811a9$0$26546$9b4e6d93@newsread4.arcor-online.net> <1110977781.680781@athnrd02> <1110980817.650794@athnrd02> From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Date: 16 Mar 2005 16:59:38 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 16 Mar 2005 16:59:41 CET NNTP-Posting-Host: 82.120.29.155 X-Trace: 1110988781 news.wanadoo.fr 25028 82.120.29.155:1302 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:9500 comp.lang.c++:46008 comp.realtime:1538 comp.software-eng:5121 Date: 2005-03-16T16:59:41+01:00 List-Id: Ioannis Vranos writes: > I had Ada template library in mind as No problem, it is built in plain Ada. > also as "information systems ("money > computing"), string processing, Ada subsetting definitions (what's this?)" > from those mentioned. I think this is the way to restrict the language. In some area it is very important to avoid memory allocation, you can add a pragma like; pragma Restrictions (No_Allocators); Here are the current (read Ada95) set of restrictions: * Safety and Security Restrictions ==================== 1. This clause defines restrictions that can be used with pragma Restrictions, see *Note 13.12::, these facilitate the demonstration of program correctness by allowing tailored versions of the run-time system. _Static Semantics_ 2. The following restrictions, the same as in *Note D.7::, apply in this Annex: No_Task_Hierarchy, No_Abort_Statement, No_Implicit_Heap_Allocation, Max_Task_Entries is 0, Max_Asynchronous_Select_Nesting is 0, and Max_Tasks is 0. The last three restrictions are checked prior to program execution. 3. The following additional restrictions apply in this Annex. 4. Tasking-related restriction: 5. No_Protected_Types There are no declarations of protected types or protected objects. 6. Memory-management related restrictions: 7. No_Allocators There are no occurrences of an allocator. 8. No_Local_Allocators Allocators are prohibited in subprograms, generic sub-programs, tasks, and entry bodies; instantiations of generic packages are also prohibited in these contexts. 9. No_Unchecked_Deallocation Semantic dependence on Unchecked_Deallocation is not allowed. 10. Immediate_Reclamation Except for storage occupied by objects created by allocators and not deallocated via unchecked deallocation, any storage reserved at run time for an object is immediately reclaimed when the object no longer exists. 11. Exception-related restriction: 12. No_Exceptions Raise_statements and exception_handlers are not allowed. No language-defined run-time checks are generated; however, a run-time check performed automatically by the hardware is permitted. 13. Other restrictions: 14. No_Floating_Point Uses of predefined floating point types and operations, and declarations of new floating point types, are not allowed. 15. No_Fixed_Point Uses of predefined fixed point types and operations, and declarations of new fixed point types, are not allowed. 16. No_Unchecked_Conversion Semantic dependence on the predefined generic Unchecked_Conversion is not allowed. 17. No_Access_Subprograms The declaration of access-to-subprogram types is not allowed. 18. No_Unchecked_Access The Unchecked_Access attribute is not allowed. 19. No_Dispatch Occurrences of T'Class are not allowed, for any (tagged) subtype T. 20. No_IO Semantic dependence on any of the library units Sequential_IO, Direct_IO, Text_IO, Wide_Text_IO, or Stream_IO is not allowed. 21. No_Delay Delay_Statements and semantic dependence on package Calendar are not allowed. 22. No_Recursion As part of the execution of a subprogram, the same subprogram is not invoked. 23. No_Reentrancy During the execution of a subprogram by a task, no other task invokes the same subprogram. * The Tasking Restrictions ==================== 1. This clause defines restrictions that can be used with a pragma Restrictions, see *Note 13.12::, to facilitate the construction of highly efficient tasking run-time systems. _Static Semantics_ 2. The following restriction_identifiers are language defined: 3. No_Task_Hierarchy All (nonenvironment) tasks depend directly on the environment task of the partition. 4. No_Nested_Finalization Objects with controlled parts and access types that designate such objects shall be declared only at library level. 5. No_Abort_Statements There are no abort_statements, and there are no calls on Task_Identification.Abort_Task. 6. No_Terminate_Alternatives There are no selective_accepts with terminate_alternatives. 7. No_Task_Allocators There are no allocators for task types or types containing task subcomponents. 8. No_Implicit_Heap_Allocations There are no operations that implicitly require heap storage allocation to be performed by the implementation. The operations that implicitly require heap storage allocation are implementation defined. 9. No_Dynamic_Priorities There are no semantic dependences on the package Dynamic_Priorities. 10. No_Asynchronous_Control There are no semantic dependences on the package Asynchronous_Task_Control. 11. The following restriction_parameter_identifiers are language defined: 12. Max_Select_Alternatives Specifies the maximum number of alternatives in a selective_accept. 13. Max_Task_Entries Specifies the maximum number of entries per task. The bounds of every entry family of a task unit shall be static, or shall be defined by a discriminant of a subtype whose corresponding bound is static. A value of zero indicates that no rendezvous are possible. 14. Max_Protected_Entries Specifies the maximum number of entries per protected type. The bounds of every entry family of a protected unit shall be static, or shall be defined by a discriminant of a subtype whose corresponding bound is static. _Dynamic Semantics_ 15. If the following restrictions are violated, the behavior is implementation defined. If an implementation chooses to detect such a violation, Storage_Error should be raised. 16. The following restriction_parameter_identifiers are language defined: 17. Max_Storage_At_Blocking Specifies the maximum portion (in storage elements) of a task's Storage_Size that can be retained by a blocked task. 18. Max_Asynchronous_Select_Nesting Specifies the maximum dynamic nesting level of asynchronous_selects. A value of zero prevents the use of any asynchronous_select. 19. Max_Tasks Specifies the maximum number of task creations that may be executed over the lifetime of a partition, not counting the creation of the environment task. 20. It is implementation defined whether the use of pragma Restrictions results in a reduction in executable program size, storage requirements, or execution time. If possible, the implementation should provide quantitative descriptions of such effects for each restriction. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595