Skip to content

Latest commit

 

History

History
63 lines (58 loc) · 7.86 KB

README.org

File metadata and controls

63 lines (58 loc) · 7.86 KB

Non-mutating algorithms

This directory contains the specification and implementation files for the following algorithms: Find, Find_First_Of, Adjacent_Find, Equal, Search, Search_N, Find_End and Count. These algorithms deal with arrays, but do not modify their parameters.

As usual, ghost functions used in specifications are located in the spec directory at project root.

The functions and the corresponding files are presented in the following table (click on the links to have more details on the specification/implementation of each function):

functionfilescomments
Findnaive_find_p.adsa first naive version of Find
naive_find_p.adb
naive_find_contract_pb.adsa simple example of contract with completeness/disjointedness problems
../spec/has_value_p.adsthe specification of the Has_Value predicate
find_p.adsthe final version of Find
find_p.adb
Find_First_Of../spec/has_value_of_p.ads
find_first_of_p.ads
find_first_of_p.adb
Adjacent_Find../spec/has_equal_neighbors_p.ads
adjacent_find_p.ads
adjacent_find_p.adb
Equal and Mismatch../spec/equal_ranges_p.ads
mismatch_p.ads
mismatch_p.adb
equal_p.ads
equal_p.adb
equal_rev_p.adsanother specification and implementation of Equal
Searchsearch_wo_ghost.adsa first specification and implementation without ghost functions
search_wo_ghost.adb
search_with_ghost.adsa try to “naively” use ghost functions
search_with_ghost.adb
../spec/has_sub_range_p.adsthe correct specification and implementation (thanks to Yannick Moy)
search_p.ads
search_p.adb
Search_N../spec/has_constant_subrange_p.ads
search_n_p.ads
search_n_p.adb
Find_Endfind_end_p.ads
find_end_p.adb
../spec/has_subrange_p.ads
Countcount_p.ads
count_p.adb
../spec/occ_p.ads