diff --git a/courses/advanced_exception_analysis/labs/010_advanced_exception_analysis.lab.rst b/courses/advanced_exception_analysis/labs/010_advanced_exception_analysis.lab.rst index 1a7f86e75..8feec221e 100644 --- a/courses/advanced_exception_analysis/labs/010_advanced_exception_analysis.lab.rst +++ b/courses/advanced_exception_analysis/labs/010_advanced_exception_analysis.lab.rst @@ -140,15 +140,15 @@ How Did We Get Here? - Solution loop declare Pieces : Strings_T := Split (Get_Line (File)); - Element : Element_T; + Component : Component_T; begin - Element.Line_Number := Integer (Line (File) - 1); - Element.Category := Convert (Pieces (1).all); - Element.Description := Pieces (2); - Element.Quantity := Convert (Pieces (3).all); - Element.Cost := Convert (Pieces (4).all); - Database_Count := Database_Count + 1; - Database (Database_Count) := Element; + Component.Line_Number := Integer (Line (File) - 1); + Component.Category := Convert (Pieces (1).all); + Component.Description := Pieces (2); + Component.Quantity := Convert (Pieces (3).all); + Component.Cost := Convert (Pieces (4).all); + Database_Count := Database_Count + 1; + Database (Database_Count) := Component; exception when The_Err : others => Put_Line ("Load failure: " & Exception_Name (The_Err)); diff --git a/courses/advanced_exception_analysis/labs/source/src/parser.adb b/courses/advanced_exception_analysis/labs/source/src/parser.adb index 33b2ec972..a9593c5be 100644 --- a/courses/advanced_exception_analysis/labs/source/src/parser.adb +++ b/courses/advanced_exception_analysis/labs/source/src/parser.adb @@ -5,7 +5,7 @@ with Strings; use Strings; package body Parser is - type Element_T is record + type Component_T is record Line_Number : Integer; Category : Category_T; Description : String_T; @@ -13,7 +13,7 @@ package body Parser is Cost : Cost_T; end record; - Database : array (1 .. 10) of Element_T; + Database : array (1 .. 10) of Component_T; Database_Count : Integer := 0; procedure Load (Filename : String) is @@ -23,29 +23,29 @@ package body Parser is while not End_Of_File (File) loop declare - Pieces : Strings_T := Split (Get_Line (File)); - Element : Element_T; + Pieces : Strings_T := Split (Get_Line (File)); + Component : Component_T; begin - Element.Line_Number := Integer (Line (File) - 1); - Element.Category := Convert (Pieces (1).all); - Element.Description := Pieces (2); - Element.Quantity := Convert (Pieces (3).all); - Element.Cost := Convert (Pieces (4).all); - Database_Count := Database_Count + 1; - Database (Database_Count) := Element; + Component.Line_Number := Integer (Line (File) - 1); + Component.Category := Convert (Pieces (1).all); + Component.Description := Pieces (2); + Component.Quantity := Convert (Pieces (3).all); + Component.Cost := Convert (Pieces (4).all); + Database_Count := Database_Count + 1; + Database (Database_Count) := Component; end; end loop; end Load; procedure Print is begin - for Element of Database (1 .. Database_Count) + for Component of Database (1 .. Database_Count) loop - Put (Element.Line_Number'Image & ": "); - Put (Element.Description.all & " ("); - Put (Convert (Element.Category) & ") "); - Put (Convert (Element.Quantity) & " at $"); - Put_Line (Convert (Element.Cost)); + Put (Component.Line_Number'Image & ": "); + Put (Component.Description.all & " ("); + Put (Convert (Component.Category) & ") "); + Put (Convert (Component.Quantity) & " at $"); + Put_Line (Convert (Component.Cost)); end loop; end Print; diff --git a/courses/fundamentals_of_ada/230_interfacing_with_c/04-complex_data_types.rst b/courses/fundamentals_of_ada/230_interfacing_with_c/04-complex_data_types.rst index 0064a2107..6b1650b94 100644 --- a/courses/fundamentals_of_ada/230_interfacing_with_c/04-complex_data_types.rst +++ b/courses/fundamentals_of_ada/230_interfacing_with_c/04-complex_data_types.rst @@ -66,7 +66,7 @@ Arrays Interfacing Arrays From Ada to C ---------------------- -* An Ada array is a composite data structure containing 2 components: Bounds and Components +* An Ada array is a composite data structure containing 2 parts: Bounds and Components - **Fat pointers** diff --git a/courses/fundamentals_of_ada/240_tasking/22-task_safe_interfaces.rst b/courses/fundamentals_of_ada/240_tasking/22-task_safe_interfaces.rst index 6af1d2586..2bfbbeabf 100644 --- a/courses/fundamentals_of_ada/240_tasking/22-task_safe_interfaces.rst +++ b/courses/fundamentals_of_ada/240_tasking/22-task_safe_interfaces.rst @@ -92,7 +92,7 @@ Standard Library Queues Implementations * Priority implementations - :ada:`Unbounded_Priority_Queues` - - :ada:`Bounded_Priotiry_Queues` + - :ada:`Bounded_Priority_Queues` - As :ada:`protected` types - Elements provide :ada:`Get_Priority` diff --git a/courses/gnat_project_facility/020_building_with_gprbuild.rst b/courses/gnat_project_facility/020_building_with_gprbuild.rst index b926b2b32..35e2a4ee7 100644 --- a/courses/gnat_project_facility/020_building_with_gprbuild.rst +++ b/courses/gnat_project_facility/020_building_with_gprbuild.rst @@ -71,7 +71,7 @@ Command Line GPRbuild Command Line ----------------------- -* Made up of three elements +* Made up of three components * Main project file (required) * Switches (optional) diff --git a/courses/gnat_studio/010_gnat_studio.rst b/courses/gnat_studio/010_gnat_studio.rst index e066c67f4..9527efebe 100644 --- a/courses/gnat_studio/010_gnat_studio.rst +++ b/courses/gnat_studio/010_gnat_studio.rst @@ -391,7 +391,7 @@ Data Window + Name of the expression or variable - + Components / elements can be expanded + + Components / components can be expanded + Value + Type (Ada type definition) diff --git a/courses/gnat_studio/labs/source/struct/values-operations.adb b/courses/gnat_studio/labs/source/struct/values-operations.adb index 652dd3870..6fe82f086 100644 --- a/courses/gnat_studio/labs/source/struct/values-operations.adb +++ b/courses/gnat_studio/labs/source/struct/values-operations.adb @@ -52,7 +52,7 @@ package body Values.Operations is Result := V1.E - V2.E; end case; - -- Create an integer Value by setting the field "E" of the record + -- Create an integer Value by setting the component "E" of the record -- to Result. Stack.Push (new Value_Info'(E => Result)); diff --git a/courses/gnat_studio/labs/source/struct/values.adb b/courses/gnat_studio/labs/source/struct/values.adb index 82fb84d0c..e0bdf632a 100644 --- a/courses/gnat_studio/labs/source/struct/values.adb +++ b/courses/gnat_studio/labs/source/struct/values.adb @@ -30,8 +30,8 @@ package body Values is end if; return new Value_Info'(E => Int_Val); - -- Allocate a new Value_Info (which is a record with one field) - -- on the heap and initialize its only field "E" to be "Int_Val". + -- Allocate a new Value_Info (which is a record with one component) + -- on the heap and initialize its only component "E" to be "Int_Val". -- NOTE: the ' in Value_Info'(...) must be there. end Read; diff --git a/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values-operations.adb b/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values-operations.adb index 59de0a912..8713cf188 100644 --- a/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values-operations.adb +++ b/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values-operations.adb @@ -54,7 +54,7 @@ package body Values.Operations is Result := V1.E - V2.E; end case; - -- Create an integer Value by setting the field "E" of the record + -- Create an integer Value by setting the component "E" of the record -- to Result. Stack.Push (new Value_Info'(E => Result)); diff --git a/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values.adb b/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values.adb index 14698fb47..eaadfffa9 100644 --- a/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values.adb +++ b/courses/gnatdas/labs/cover_030_advanced_topics/utils/src/values.adb @@ -32,8 +32,8 @@ package body Values is end if; return new Value_Info'(E => Int_Val); - -- Allocate a new Value_Info (which is a record with one field) - -- on the heap and initialize its only field "E" to be "Int_Val". + -- Allocate a new Value_Info (which is a record with one component) + -- on the heap and initialize its only component "E" to be "Int_Val". -- NOTE: the ' in Value_Info'(...) must be there. end Read; diff --git a/courses/gnatsas/labs/check_040_lkql.lab.rst b/courses/gnatsas/labs/check_040_lkql.lab.rst index 495fcca3b..7a30494a0 100644 --- a/courses/gnatsas/labs/check_040_lkql.lab.rst +++ b/courses/gnatsas/labs/check_040_lkql.lab.rst @@ -159,7 +159,7 @@ Step 3 - Implement First Criteria 1. Implement the first criteria: **No use of any arithmetic or bitwise operator on the type**. - a. Need to fetch all operators - use global :lkql:`select` with :lkql:`BinOp` and :lkql:`UnOp` node kind patterns. (Field :lkql:`f_op` contains the kind of the operator.) + a. Need to fetch all operators - use global :lkql:`select` with :lkql:`BinOp` and :lkql:`UnOp` node kind patterns. (Component :lkql:`f_op` contains the kind of the operator.) .. code:: lkql @@ -247,9 +247,9 @@ Step 6 - Improve Types Filter 1. Update the :lkql:`types` function to also return types used as source type in conversions - * LAL field **f_suffix** + * LAL component **f_suffix** - * Returns **ParamAssocList** with a single element - source expression + * Returns **ParamAssocList** with a single component - source expression * Use on type conversion nodes to get source of conversions .. code:: lkql diff --git a/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.adb b/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.adb index a2434e8de..72d39e764 100644 --- a/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.adb +++ b/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.adb @@ -3,15 +3,15 @@ package body Coupling_Metrics_Dependency is function Set (A, B : Integer) return Record_T is - ((Field1 => A, - Field2 => B)); + ((Component1 => A, + Component2 => B)); function Get (A : Record_T) - return Integer is (A.Field1 * A.Field2); + return Integer is (A.Component1 * A.Component2); function Add (A, B : Record_T) return Record_T is - ((Field1 => A.Field1 + B.Field1, - Field2 => A.Field2 + B.Field2)); + ((Component1 => A.Component1 + B.Component1, + Component2 => A.Component2 + B.Component2)); end Coupling_Metrics_Dependency; diff --git a/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.ads b/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.ads index 474a4af65..f2c0a7c01 100644 --- a/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.ads +++ b/courses/gnatsas/labs/metric_010_overview/coupling_metrics_dependency.ads @@ -13,7 +13,7 @@ package Coupling_Metrics_Dependency is private type Record_T is tagged record - Field1, Field2 : Integer; + Component1, Component2 : Integer; end record; end Coupling_Metrics_Dependency; diff --git a/courses/gnatsas/labs/sas_060_tutorial/struct/values-operations.adb b/courses/gnatsas/labs/sas_060_tutorial/struct/values-operations.adb index 652dd3870..6fe82f086 100644 --- a/courses/gnatsas/labs/sas_060_tutorial/struct/values-operations.adb +++ b/courses/gnatsas/labs/sas_060_tutorial/struct/values-operations.adb @@ -52,7 +52,7 @@ package body Values.Operations is Result := V1.E - V2.E; end case; - -- Create an integer Value by setting the field "E" of the record + -- Create an integer Value by setting the component "E" of the record -- to Result. Stack.Push (new Value_Info'(E => Result)); diff --git a/courses/gnatsas/labs/sas_060_tutorial/struct/values.adb b/courses/gnatsas/labs/sas_060_tutorial/struct/values.adb index 82fb84d0c..e0bdf632a 100644 --- a/courses/gnatsas/labs/sas_060_tutorial/struct/values.adb +++ b/courses/gnatsas/labs/sas_060_tutorial/struct/values.adb @@ -30,8 +30,8 @@ package body Values is end if; return new Value_Info'(E => Int_Val); - -- Allocate a new Value_Info (which is a record with one field) - -- on the heap and initialize its only field "E" to be "Int_Val". + -- Allocate a new Value_Info (which is a record with one component) + -- on the heap and initialize its only component "E" to be "Int_Val". -- NOTE: the ' in Value_Info'(...) must be there. end Read; diff --git a/courses/gnatsas/metric_010_overview.rst b/courses/gnatsas/metric_010_overview.rst index c23449fd8..ab8f7d85d 100644 --- a/courses/gnatsas/metric_010_overview.rst +++ b/courses/gnatsas/metric_010_overview.rst @@ -879,7 +879,7 @@ Coupling Metrics Code Example function Add (A, B : Record_T) return Record_T; private type Record_T is tagged record - Field1, Field2 : Integer; + Component1, Component2 : Integer; end record; end Coupling_Metrics_Dependency; diff --git a/courses/spark_for_ada_programmers/10_advanced_proof.rst b/courses/spark_for_ada_programmers/10_advanced_proof.rst index cbb9fb6cf..c612979f9 100644 --- a/courses/spark_for_ada_programmers/10_advanced_proof.rst +++ b/courses/spark_for_ada_programmers/10_advanced_proof.rst @@ -459,12 +459,12 @@ Classical Loop Invariants * Known best loop invariants for some loops - Initialization loops - initialize the collection - - Mapping loops - map each element of the collection - - Validation loops - check each element of the collection - - Counting loops - count elements with a property - - Search loops - search element with a property - - Maximize loops - search element that maximizes a property - - Update loops - update each element of the collection + - Mapping loops - map each component of the collection + - Validation loops - check each component of the collection + - Counting loops - count components with a property + - Search loops - search component with a property + - Maximize loops - search component that maximizes a property + - Update loops - update each component of the collection | @@ -596,11 +596,11 @@ Bounded Formal Containers - Discriminant :ada:`Capacity` fixes maximum size -* Element type must have known size (:dfn:`definite` type) +* Component type must have known size (:dfn:`definite` type) * Container type itself is definite - - Bounded container can be element of another formal container + - Bounded container can be component of another formal container ----------------------------- Unbounded Formal Containers @@ -612,16 +612,16 @@ Unbounded Formal Containers * Use dynamic memory allocation - - For each element in the container + - For each component in the container - For growing the container * Use controlled types for dynamic memory reclamation -* Element type may have unknown size (:dfn:`indefinite` type) +* Component type may have unknown size (:dfn:`indefinite` type) * Container type itself is definite - - Unbounded container can be element of another formal container + - Unbounded container can be component of another formal container ------------------------------ Loops Over Formal Containers @@ -645,7 +645,7 @@ Loops Over Formal Containers V.Replace_Element (J, 0); end loop; -* Iteration over elements (no update!) +* Iteration over components (no update!) .. code:: ada @@ -670,13 +670,13 @@ Loop Invariants Over Formal Containers + Functional model of the container + Mapping from cursors to positions - + Sequence of elements/keys of the container + + Sequence of components/keys of the container | -* Iteration over elements +* Iteration over components - - Impossible to access previous elements + - Impossible to access previous components - Use iteration over positions instead ----------------------------------- @@ -696,16 +696,16 @@ Formal Model of Formal Containers - Given by function :ada:`Model` - Returns a different type - + A sequence of elements for formal lists - + A set of elements for formal sets - + A map from keys to elements for maps + + A sequence of components for formal lists + + A set of components for formal sets + + A map from keys to components for maps * Mapping from cursors to positions - Given by function :ada:`Positions` - Positions in the iteration sequence -* Sequence of elements/keys of the container +* Sequence of components/keys of the container - Corresponds to the iteration sequence - Given by different functions @@ -732,7 +732,7 @@ Difficulties with Loops Over Formal Containers * Container structure may be modified in the loop - - When inserting or deleting elements + - When inserting or deleting components - In general, need to know position of corresponding cursor + Relative to current cursor: e.g. previous/next cursor @@ -756,7 +756,7 @@ Functional Containers - No bounds on cardinality - No cursors for iteration - - No order of elements in sets and maps + - No order of components in sets and maps - Functional: cannot modify them, rather create a new one * They are easy to handle for proof diff --git a/courses/spark_for_ada_programmers/14_state_abstraction.rst b/courses/spark_for_ada_programmers/14_state_abstraction.rst index 1d835c062..6a57c8e4d 100644 --- a/courses/spark_for_ada_programmers/14_state_abstraction.rst +++ b/courses/spark_for_ada_programmers/14_state_abstraction.rst @@ -283,7 +283,7 @@ Constants with Variable Input Refined_State => (The_Stack => (Content, Top, Max)) is Max : constant Natural := External_Variable; - Content : Element_Array (1 .. Max); + Content : Component_Array (1 .. Max); Top : Natural; -- Max has variable input. It must appear as a -- constituent of The_Stack @@ -308,14 +308,14 @@ Data Dependencies package Stack with Abstract_State => (Top_State, Content_State) is - procedure Pop (E : out Element) with + procedure Pop (E : out Component) with Global => (Input => Content_State, In_Out => Top_State); package Stack with Abstract_State => The_Stack is - procedure Pop (E : out Element) with + procedure Pop (E : out Component) with Global => (In_Out => The_Stack); ------------------- @@ -329,14 +329,14 @@ Flow Dependencies package Stack with Abstract_State => (Top_State, Content_State) is - procedure Pop (E : out Element) with + procedure Pop (E : out Component) with Depends => (Top_State => Top_State, E => (Content_State, Top_State)); package Stack with Abstract_State => The_Stack is - procedure Pop (E : out Element) with + procedure Pop (E : out Component) with Depends => ((The_Stack, E) => The_Stack); ----------------------- diff --git a/courses/spark_for_ada_programmers/6_proof.rst b/courses/spark_for_ada_programmers/6_proof.rst index 6f92ff047..f4abfd921 100644 --- a/courses/spark_for_ada_programmers/6_proof.rst +++ b/courses/spark_for_ada_programmers/6_proof.rst @@ -219,8 +219,8 @@ Run-Time Errors Are Pervasive * ``I+J`` might overflow the base type of the index range's subtype * ``I+J`` might be outside the index range's subtype - * ``P/Q`` might overflow the base type of the element type - * ``P/Q`` might be outside the element subtype + * ``P/Q`` might overflow the base type of the component type + * ``P/Q`` might be outside the component subtype * ``Q`` might be zero ------------------------------- @@ -593,7 +593,7 @@ Cost/Benefit Analysis * Not all provable properties are worth proving! * Difficulty of proof (cost) not correlated with benefit -* e.g. proving that a sorting algorithm preserves the elements +* e.g. proving that a sorting algorithm preserves the components - Trivial by review if the only operation is :ada:`Swap` - May require many **annotations** for proof diff --git a/courses/spark_for_ada_programmers/7_specification_language.rst b/courses/spark_for_ada_programmers/7_specification_language.rst index e34923602..4e044bcfe 100644 --- a/courses/spark_for_ada_programmers/7_specification_language.rst +++ b/courses/spark_for_ada_programmers/7_specification_language.rst @@ -73,7 +73,7 @@ Simple Expressions Pre => T'Length > 0, Post => -- if T is of length 1 ... -- else if T is of length 2 ... - -- else for all elements ... + -- else for all components ... -------------------- Richer Expressions @@ -86,8 +86,8 @@ Richer Expressions * Expressions over a **collection** (range or array or...) - - *universally quantified expression* for properties over **all** elements - - *existentially quantified expression* for properties over **one** element + - *universally quantified expression* for properties over **all** components + - *existentially quantified expression* for properties over **one** component * New forms of **aggregates** @@ -255,7 +255,7 @@ General Iteration Mechanism type Container is private with Iterable => (First => First, Next => Next, - Has_Element => Has_Element + Has_Element => Element Element => Element); * :dfn:`Iteration over positions` uses :ada:`for .. in` syntax @@ -263,10 +263,10 @@ General Iteration Mechanism - Uses cursor type with :ada:`First`, :ada:`Next` and :ada:`Has_Element` - Function :ada:`Element` is **not** required -* :dfn:`Iteration over elements` uses :ada:`for .. of` syntax +* :dfn:`Iteration over components` uses :ada:`for .. of` syntax - Based on the previous iteration - - Function :ada:`Element` retrieves the **element** for a given cursor + - Function :ada:`Element` retrieves the **component** for a given cursor ---------------------------------- Iteration Over Formal Containers @@ -286,14 +286,14 @@ Iteration Over Formal Containers * Iteration over positions - - Access to **element** through function :ada:`Element` + - Access to **component** through function :ada:`Element` - For maps, access to **key** through function :ada:`Key` -* Iteration over elements +* Iteration over components - For maps, really an iteration over **keys** - - Use another function :ada:`Element` to get **element** + - Use another function :ada:`Element` to get **component** ------------------------------- Iteration Over Formal Vectors @@ -308,7 +308,7 @@ Iteration Over Formal Vectors V.Replace_Element (J, 0); end loop; pragma Assert - (for all J in V.First_Index .. V.Last_Index => V.Element (J) = 0); + (for all J in V.First_Index .. V.Last_Index => V.Component (J) = 0); * Iteration over positions @@ -319,7 +319,7 @@ Iteration Over Formal Vectors end loop; pragma Assert (for all J in V => V.Element (J) = 0); -* Iteration over elements (**no update**!) +* Iteration over components (**no update**!) .. code:: ada diff --git a/courses/spark_for_ada_programmers/labs/10_advanced_proof.lab.rst b/courses/spark_for_ada_programmers/labs/10_advanced_proof.lab.rst index cc061e2f4..30eca8739 100644 --- a/courses/spark_for_ada_programmers/labs/10_advanced_proof.lab.rst +++ b/courses/spark_for_ada_programmers/labs/10_advanced_proof.lab.rst @@ -78,4 +78,4 @@ Formal Container Loops - Add a loop invariant in :ada:`Init_List` + Hint: the position of cursor :ada:`Cu` in :ada:`L` is :ada:`Positions (L).Get (Cu)` - + Hint: the sequence of elements for :ada:`L` is :ada:`Model (L)` + + Hint: the sequence of components for :ada:`L` is :ada:`Model (L)` diff --git a/courses/spark_for_ada_programmers/labs/6_proof.lab.rst b/courses/spark_for_ada_programmers/labs/6_proof.lab.rst index 79351e9d1..8ddc7e123 100644 --- a/courses/spark_for_ada_programmers/labs/6_proof.lab.rst +++ b/courses/spark_for_ada_programmers/labs/6_proof.lab.rst @@ -67,7 +67,7 @@ Functional Specifications (2/2) (depending on the value of the discriminant) is 1. - Add similarly a postcondition to procedures :ada:`Init_The_Table` and - :ada:`Init_Table` stating that the value of the first and last elements + :ada:`Init_Table` stating that the value of the first and last components are 1 and 2. + Hint: you may have to strengthen the precondition of :ada:`Init_Table`. diff --git a/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer1/sort.adb b/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer1/sort.adb index 82c8c1b3a..9e0511c36 100644 --- a/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer1/sort.adb +++ b/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer1/sort.adb @@ -23,7 +23,7 @@ package body Sort is Permutation (Y) := Temp_Index; end Swap; - -- Finds the index of the smallest element in the slice Values (From .. To) + -- Finds the index of the smallest component in the slice Values (From .. To) function Index_Of_Minimum (Values : Nat_Array; From, To : Index) return Index with Pre => To in From .. Values'Last, diff --git a/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer2/sort.adb b/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer2/sort.adb index 695889ff3..ba083782b 100644 --- a/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer2/sort.adb +++ b/courses/spark_for_ada_programmers/labs/answers/13_autoactive_proof/answer2/sort.adb @@ -45,7 +45,7 @@ package body Sort is Prove_Perm; end Swap; - -- Finds the index of the smallest element in the array + -- Finds the index of the smallest component in the array function Index_Of_Minimum (Values : Nat_Array; From, To : Index) return Index with Pre => To in From .. Values'Last, diff --git a/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.adb b/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.adb index ecb72dcaa..bf5600602 100644 --- a/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.adb +++ b/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.adb @@ -17,7 +17,7 @@ package body String_Fixed with SPARK_Mode is when Inside => Belongs'Result = Is_In (Element, Set), when Outside => Belongs'Result = not Is_In (Element, Set)); pragma Inline (Belongs); - -- Determines if the given element is in (Test = Inside) or not in + -- Determines if the given component is in (Test = Inside) or not in -- (Test = Outside) the given character set. ------------- diff --git a/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.ads b/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.ads index 9f6eee406..30e76360a 100644 --- a/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.ads +++ b/courses/spark_for_ada_programmers/labs/answers/990_spark_example_project/string_fixed.ads @@ -341,7 +341,7 @@ is Post => "*"'Result'Length = Left and then (for all E of "*"'Result => E = Right); -- This function replicates a character a specified number of times. It - -- returns a string whose length is Left and each of whose elements is + -- returns a string whose length is Left and each of whose components is -- Right. end String_Fixed; diff --git a/courses/spark_for_ada_programmers/labs/source/13_autoactive_proof/sort.adb b/courses/spark_for_ada_programmers/labs/source/13_autoactive_proof/sort.adb index 90bc99cd9..ea53214e7 100644 --- a/courses/spark_for_ada_programmers/labs/source/13_autoactive_proof/sort.adb +++ b/courses/spark_for_ada_programmers/labs/source/13_autoactive_proof/sort.adb @@ -10,7 +10,7 @@ package body Sort is Values (Y) := Temp; end Swap; - -- Finds the index of the smallest element in the slice Values (From .. To) + -- Finds the index of the smallest component in the slice Values (From .. To) function Index_Of_Minimum (Values : Nat_Array; From, To : Index) return Index is Min : Index := From; begin diff --git a/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.adb b/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.adb index 66ebf86e6..01c6d498b 100644 --- a/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.adb +++ b/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.adb @@ -13,7 +13,7 @@ package body String_Fixed with SPARK_Mode is Set : Maps.Character_Set; Test : Membership) return Boolean; pragma Inline (Belongs); - -- Determines if the given element is in (Test = Inside) or not in + -- Determines if the given component is in (Test = Inside) or not in -- (Test = Outside) the given character set. ------------- diff --git a/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.ads b/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.ads index 33d177573..65f639b60 100644 --- a/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.ads +++ b/courses/spark_for_ada_programmers/labs/source/990_spark_example_project/string_fixed.ads @@ -137,7 +137,7 @@ package String_Fixed with SPARK_Mode is (Left : Natural; Right : Character) return String; -- This function replicates a character a specified number of times. It - -- returns a string whose length is Left and each of whose elements is + -- returns a string whose length is Left and each of whose components is -- Right. end String_Fixed; diff --git a/courses/static_analysis_via_compiler/010_static_analysis_via_compiler.rst b/courses/static_analysis_via_compiler/010_static_analysis_via_compiler.rst index 2707a6b8a..6b214d811 100644 --- a/courses/static_analysis_via_compiler/010_static_analysis_via_compiler.rst +++ b/courses/static_analysis_via_compiler/010_static_analysis_via_compiler.rst @@ -756,7 +756,7 @@ Sound Engineering Example type Tagged_T is tagged null record; procedure Primitive (R : in Tagged_T); type Child_T is new Tagged_T with record - Field : Natural; + Component : Natural; end record; procedure Primitive (R : in Child_T); end Example; @@ -770,7 +770,7 @@ Sound Engineering Example begin Lup : while (Count > 0) and (Count < 100) loop - Count := Count + R.Field; + Count := Count + R.Component; exit when Count = 50; end loop Lup; end Primitive; @@ -1129,10 +1129,10 @@ GNAT Initialization Restrictions pragma Restrictions (No_Default_Initialization); procedure Demo is type Record_T is record - Field : Integer := 42; + Component : Integer := 42; end record; Bad : Record_T; - Good : Record_T := (Field => 42); + Good : Record_T := (Component => 42); .. container:: latex_environment tiny diff --git a/marketing/ada_4_hours/060_record_types.rst b/marketing/ada_4_hours/060_record_types.rst index f17573143..c4dfaf947 100644 --- a/marketing/ada_4_hours/060_record_types.rst +++ b/marketing/ada_4_hours/060_record_types.rst @@ -55,8 +55,8 @@ Syntax and Examples .. code:: Ada type Record1_T is record - Field1 : integer; - Field2 : boolean; + Component1 : integer; + Component2 : boolean; end record; * Records can be **discriminated** as well diff --git a/marketing/ada_4_hours/180_polymorphism.rst b/marketing/ada_4_hours/180_polymorphism.rst index dd179b7c3..e5395be18 100644 --- a/marketing/ada_4_hours/180_polymorphism.rst +++ b/marketing/ada_4_hours/180_polymorphism.rst @@ -56,7 +56,7 @@ Classes * Objects of type :ada:`T'Class` have at least the properties of T - - Fields of `T` + - Components of `T` - Primitives of `T` ---------------- diff --git a/marketing/ada_4_hours/280_low_level_programming.rst b/marketing/ada_4_hours/280_low_level_programming.rst index 6de07126f..c1e7cea11 100644 --- a/marketing/ada_4_hours/280_low_level_programming.rst +++ b/marketing/ada_4_hours/280_low_level_programming.rst @@ -138,7 +138,7 @@ Record Representation Clauses - Driver mapped on the address space, communication protocol... - * Fields represented as + * Components represented as .. code:: Ada diff --git a/marketing/ada_8_hours/060_record_types.rst b/marketing/ada_8_hours/060_record_types.rst index 6340ecb0c..edea77677 100644 --- a/marketing/ada_8_hours/060_record_types.rst +++ b/marketing/ada_8_hours/060_record_types.rst @@ -55,8 +55,8 @@ Syntax and Examples .. code:: Ada type Record1_T is record - Field1 : integer; - Field2 : boolean; + Component1 : integer; + Component2 : boolean; end record; * Records can be **discriminated** as well diff --git a/marketing/ada_8_hours/095_library_units.rst b/marketing/ada_8_hours/095_library_units.rst index e695bd55f..a318f57ae 100644 --- a/marketing/ada_8_hours/095_library_units.rst +++ b/marketing/ada_8_hours/095_library_units.rst @@ -168,7 +168,7 @@ What To Import with A; package B is type Something is record - Field : A.Something; + Component : A.Something; end record; end B; @@ -176,5 +176,5 @@ What To Import procedure Foo is X : B.Something; begin - X.Field := ... + X.Component := ... diff --git a/marketing/ada_8_hours/180_polymorphism.rst b/marketing/ada_8_hours/180_polymorphism.rst index f4da2d8d0..9b444e072 100644 --- a/marketing/ada_8_hours/180_polymorphism.rst +++ b/marketing/ada_8_hours/180_polymorphism.rst @@ -56,7 +56,7 @@ Classes * Objects of type :ada:`T'Class` have at least the properties of T - - Fields of `T` + - Components of `T` - Primitives of `T` ----------------- diff --git a/marketing/ada_8_hours/adv_280_low_level_programming.rst b/marketing/ada_8_hours/adv_280_low_level_programming.rst index 2014fcc77..f73d293c0 100644 --- a/marketing/ada_8_hours/adv_280_low_level_programming.rst +++ b/marketing/ada_8_hours/adv_280_low_level_programming.rst @@ -181,7 +181,7 @@ Record Representation Clauses - Driver mapped on the address space, communication protocol... - * Fields represented as + * Components represented as .. code:: Ada