Ioannis Vranos said:
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