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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Where to find Ravenscar compatible ADT Containers (List, Vector, stack) Date: Tue, 28 Aug 2018 16:03:47 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="dc220bad8cc6392293fad97f6df5b436"; logging-data="17213"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GCmWOCLOo/qLxWBPwaGGkpOnDlahyWkU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:jUlE6VRjl3rzTODLEVRJaYdHsF4= sha1:TKo7yYXCbfwgHOu7IhYJSn1X6cs= Xref: reader02.eternal-september.org comp.lang.ada:54281 Date: 2018-08-28T16:03:47+01:00 List-Id: Daniel Norber writes: > The standard ADA.Containers library is not prepared for Ravenscar use. > Even bounded versions, like Bounded_double_Linked_List have several > violations of Ravenscar, like Implicit_Heap_Allocation when i try to > instantiate it, and bind it. Which compiler are you using? I ask because I encountered this with GCC 4.9.1 & GNAT GPL 2014 A workround (which allowed the package which revealed the problem to be built) was to explicitly state the restriction in the body: pragma Restrictions (No_Implicit_Heap_Allocations); with Ada.Containers.Bounded_Vectors; package body Containing is subtype Index is Natural range 0 .. 19; subtype Line is String (1 .. 20); package Line_Vectors is new Ada.Containers.Bounded_Vectors (Index_Type => Index, Element_Type => Line); making it a compiler error. Of course, that's not going to help with the unbounded Containers. > I've Found ADA95 booch ADT, but is not ready for the new ADA2012 > aspects that let you write something like this: > > for E of List loop > E:= E + 1; > --E is a reference. That increases performance with big structures. > end loop; Not sure that would actually be a performance improvement. > Someone know a modern ADA2012 third party ADT that compliances > Ravenscar?. Seems like ADA forgot Ravenscar users when they released > 2005 containers. The list of restriction violations for Bounded_Doubly_Linked_Lists (from the ALI) for CE 2018 is RV NO_ACCESS_SUBPROGRAMS RV NO_DIRECT_BOOLEAN_OPERATORS RV NO_DISPATCH RV NO_EXCEPTIONS RV NO_FINALIZATION RV NO_NESTED_FINALIZATION RV NO_RECURSION RV NO_STANDARD_STORAGE_POOLS RV NO_STREAMS RV NO_UNCHECKED_ACCESS RV NO_DEFAULT_INITIALIZATION RV NO_DYNAMIC_SIZED_OBJECTS RV NO_IMPLEMENTATION_ATTRIBUTES RV NO_IMPLEMENTATION_PRAGMAS RV NO_IMPLICIT_ALIASING RV SPARK_05 I don't think any of those are non-Ravenscar?