Age | Commit message (Collapse) | Author | Files | Lines |
|
2020-06-02 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
* ada_get_targ.adb: Bump copyright year.
* adabkend.adb: Likewise.
* adabkend.ads: Likewise.
* adadecode.c: Likewise.
* adadecode.h: Likewise.
* adaint.c: Likewise.
* adaint.h: Likewise.
* affinity.c: Likewise.
* ali-util.adb: Likewise.
* ali-util.ads: Likewise.
* ali.adb: Likewise.
* ali.ads: Likewise.
* alloc.ads: Likewise.
* argv-lynxos178-raven-cert.c: Likewise.
* argv.c: Likewise.
* aspects.adb: Likewise.
* aspects.ads: Likewise.
* atree.adb: Likewise.
* atree.ads: Likewise.
* atree.h: Likewise.
* aux-io.c: Likewise.
* back_end.adb: Likewise.
* back_end.ads: Likewise.
* bcheck.adb: Likewise.
* bcheck.ads: Likewise.
* binde.adb: Likewise.
* binde.ads: Likewise.
* binderr.adb: Likewise.
* binderr.ads: Likewise.
* bindgen.adb: Likewise.
* bindgen.ads: Likewise.
* bindo-augmentors.adb: Likewise.
* bindo-augmentors.ads: Likewise.
* bindo-builders.adb: Likewise.
* bindo-builders.ads: Likewise.
* bindo-diagnostics.adb: Likewise.
* bindo-diagnostics.ads: Likewise.
* bindo-elaborators.adb: Likewise.
* bindo-elaborators.ads: Likewise.
* bindo-graphs.adb: Likewise.
* bindo-graphs.ads: Likewise.
* bindo-units.adb: Likewise.
* bindo-units.ads: Likewise.
* bindo-validators.adb: Likewise.
* bindo-validators.ads: Likewise.
* bindo-writers.adb: Likewise.
* bindo-writers.ads: Likewise.
* bindo.adb: Likewise.
* bindo.ads: Likewise.
* bindusg.adb: Likewise.
* bindusg.ads: Likewise.
* butil.adb: Likewise.
* butil.ads: Likewise.
* cal.c: Likewise.
* casing.adb: Likewise.
* casing.ads: Likewise.
* ceinfo.adb: Likewise.
* checks.adb: Likewise.
* checks.ads: Likewise.
* cio.c: Likewise.
* clean.adb: Likewise.
* clean.ads: Likewise.
* comperr.adb: Likewise.
* comperr.ads: Likewise.
* contracts.adb: Likewise.
* contracts.ads: Likewise.
* csets.adb: Likewise.
* csets.ads: Likewise.
* csinfo.adb: Likewise.
* cstand.adb: Likewise.
* cstand.ads: Likewise.
* cstreams.c: Likewise.
* ctrl_c.c: Likewise.
* debug.adb: Likewise.
* debug.ads: Likewise.
* debug_a.adb: Likewise.
* debug_a.ads: Likewise.
* einfo.adb: Likewise.
* einfo.ads: Likewise.
* elists.adb: Likewise.
* elists.ads: Likewise.
* elists.h: Likewise.
* env.c: Likewise.
* env.h: Likewise.
* err_vars.ads: Likewise.
* errno.c: Likewise.
* errout.adb: Likewise.
* errout.ads: Likewise.
* erroutc.adb: Likewise.
* erroutc.ads: Likewise.
* errutil.adb: Likewise.
* errutil.ads: Likewise.
* eval_fat.adb: Likewise.
* eval_fat.ads: Likewise.
* exit.c: Likewise.
* exp_aggr.adb: Likewise.
* exp_aggr.ads: Likewise.
* exp_atag.adb: Likewise.
* exp_atag.ads: Likewise.
* exp_attr.adb: Likewise.
* exp_attr.ads: Likewise.
* exp_cg.adb: Likewise.
* exp_cg.ads: Likewise.
* exp_ch10.ads: Likewise.
* exp_ch11.adb: Likewise.
* exp_ch11.ads: Likewise.
* exp_ch12.adb: Likewise.
* exp_ch12.ads: Likewise.
* exp_ch13.adb: Likewise.
* exp_ch13.ads: Likewise.
* exp_ch2.adb: Likewise.
* exp_ch2.ads: Likewise.
* exp_ch3.adb: Likewise.
* exp_ch3.ads: Likewise.
* exp_ch4.adb: Likewise.
* exp_ch4.ads: Likewise.
* exp_ch5.adb: Likewise.
* exp_ch5.ads: Likewise.
* exp_ch6.adb: Likewise.
* exp_ch6.ads: Likewise.
* exp_ch7.adb: Likewise.
* exp_ch7.ads: Likewise.
* exp_ch8.adb: Likewise.
* exp_ch8.ads: Likewise.
* exp_ch9.adb: Likewise.
* exp_ch9.ads: Likewise.
* exp_code.adb: Likewise.
* exp_code.ads: Likewise.
* exp_dbug.adb: Likewise.
* exp_dbug.ads: Likewise.
* exp_disp.adb: Likewise.
* exp_disp.ads: Likewise.
* exp_dist.adb: Likewise.
* exp_dist.ads: Likewise.
* exp_fixd.adb: Likewise.
* exp_fixd.ads: Likewise.
* exp_imgv.adb: Likewise.
* exp_imgv.ads: Likewise.
* exp_intr.adb: Likewise.
* exp_intr.ads: Likewise.
* exp_pakd.adb: Likewise.
* exp_pakd.ads: Likewise.
* exp_prag.adb: Likewise.
* exp_prag.ads: Likewise.
* exp_sel.adb: Likewise.
* exp_sel.ads: Likewise.
* exp_smem.adb: Likewise.
* exp_smem.ads: Likewise.
* exp_spark.adb: Likewise.
* exp_spark.ads: Likewise.
* exp_strm.adb: Likewise.
* exp_strm.ads: Likewise.
* exp_tss.adb: Likewise.
* exp_tss.ads: Likewise.
* exp_unst.adb: Likewise.
* exp_unst.ads: Likewise.
* exp_util.adb: Likewise.
* exp_util.ads: Likewise.
* expander.adb: Likewise.
* expander.ads: Likewise.
* expect.c: Likewise.
* fe.h: Likewise.
* final.c: Likewise.
* fmap.adb: Likewise.
* fmap.ads: Likewise.
* fname-sf.adb: Likewise.
* fname-sf.ads: Likewise.
* fname-uf.adb: Likewise.
* fname-uf.ads: Likewise.
* fname.adb: Likewise.
* fname.ads: Likewise.
* freeze.adb: Likewise.
* freeze.ads: Likewise.
* frontend.adb: Likewise.
* frontend.ads: Likewise.
* get_scos.adb: Likewise.
* get_scos.ads: Likewise.
* get_targ.adb: Likewise.
* get_targ.ads: Likewise.
* ghost.adb: Likewise.
* ghost.ads: Likewise.
* gnat1drv.adb: Likewise.
* gnat1drv.ads: Likewise.
* gnatbind.adb: Likewise.
* gnatbind.ads: Likewise.
* gnatchop.adb: Likewise.
* gnatclean.adb: Likewise.
* gnatcmd.adb: Likewise.
* gnatcmd.ads: Likewise.
* gnatdll.adb: Likewise.
* gnatfind.adb: Likewise.
* gnatkr.adb: Likewise.
* gnatkr.ads: Likewise.
* gnatlink.adb: Likewise.
* gnatlink.ads: Likewise.
* gnatls.adb: Likewise.
* gnatls.ads: Likewise.
* gnatmake.adb: Likewise.
* gnatmake.ads: Likewise.
* gnatname.adb: Likewise.
* gnatname.ads: Likewise.
* gnatprep.adb: Likewise.
* gnatprep.ads: Likewise.
* gnatvsn.adb: Likewise.
* gnatxref.adb: Likewise.
* gprep.adb: Likewise.
* gprep.ads: Likewise.
* gsocket.h: Likewise.
* hostparm.ads: Likewise.
* impunit.adb: Likewise.
* impunit.ads: Likewise.
* indepsw-aix.adb: Likewise.
* indepsw-darwin.adb: Likewise.
* indepsw-gnu.adb: Likewise.
* indepsw.adb: Likewise.
* indepsw.ads: Likewise.
* init.c: Likewise.
* initialize.c: Likewise.
* inline.adb: Likewise.
* inline.ads: Likewise.
* itypes.adb: Likewise.
* itypes.ads: Likewise.
* krunch.adb: Likewise.
* krunch.ads: Likewise.
* layout.adb: Likewise.
* layout.ads: Likewise.
* lib-list.adb: Likewise.
* lib-load.adb: Likewise.
* lib-load.ads: Likewise.
* lib-sort.adb: Likewise.
* lib-util.adb: Likewise.
* lib-util.ads: Likewise.
* lib-writ.adb: Likewise.
* lib-writ.ads: Likewise.
* lib-xref-spark_specific.adb: Likewise.
* lib-xref.adb: Likewise.
* lib-xref.ads: Likewise.
* lib.adb: Likewise.
* lib.ads: Likewise.
* libgnarl/a-astaco.adb: Likewise.
* libgnarl/a-dispat.adb: Likewise.
* libgnarl/a-dynpri.adb: Likewise.
* libgnarl/a-etgrbu.ads: Likewise.
* libgnarl/a-exetim__darwin.adb: Likewise.
* libgnarl/a-exetim__default.ads: Likewise.
* libgnarl/a-exetim__mingw.adb: Likewise.
* libgnarl/a-exetim__mingw.ads: Likewise.
* libgnarl/a-exetim__posix.adb: Likewise.
* libgnarl/a-interr.adb: Likewise.
* libgnarl/a-interr.ads: Likewise.
* libgnarl/a-intnam.ads: Likewise.
* libgnarl/a-intnam__aix.ads: Likewise.
* libgnarl/a-intnam__darwin.ads: Likewise.
* libgnarl/a-intnam__dragonfly.ads: Likewise.
* libgnarl/a-intnam__dummy.ads: Likewise.
* libgnarl/a-intnam__freebsd.ads: Likewise.
* libgnarl/a-intnam__hpux.ads: Likewise.
* libgnarl/a-intnam__linux.ads: Likewise.
* libgnarl/a-intnam__lynxos.ads: Likewise.
* libgnarl/a-intnam__mingw.ads: Likewise.
* libgnarl/a-intnam__qnx.ads: Likewise.
* libgnarl/a-intnam__rtems.ads: Likewise.
* libgnarl/a-intnam__solaris.ads: Likewise.
* libgnarl/a-intnam__vxworks.ads: Likewise.
* libgnarl/a-reatim.adb: Likewise.
* libgnarl/a-reatim.ads: Likewise.
* libgnarl/a-retide.adb: Likewise.
* libgnarl/a-retide.ads: Likewise.
* libgnarl/a-rttiev.adb: Likewise.
* libgnarl/a-rttiev.ads: Likewise.
* libgnarl/a-synbar.adb: Likewise.
* libgnarl/a-synbar.ads: Likewise.
* libgnarl/a-synbar__posix.adb: Likewise.
* libgnarl/a-synbar__posix.ads: Likewise.
* libgnarl/a-sytaco.adb: Likewise.
* libgnarl/a-sytaco.ads: Likewise.
* libgnarl/a-tasatt.adb: Likewise.
* libgnarl/a-tasatt.ads: Likewise.
* libgnarl/a-taside.adb: Likewise.
* libgnarl/a-taside.ads: Likewise.
* libgnarl/a-taster.adb: Likewise.
* libgnarl/g-boubuf.adb: Likewise.
* libgnarl/g-boubuf.ads: Likewise.
* libgnarl/g-boumai.ads: Likewise.
* libgnarl/g-semaph.adb: Likewise.
* libgnarl/g-semaph.ads: Likewise.
* libgnarl/g-signal.adb: Likewise.
* libgnarl/g-signal.ads: Likewise.
* libgnarl/g-tastus.ads: Likewise.
* libgnarl/g-thread.adb: Likewise.
* libgnarl/g-thread.ads: Likewise.
* libgnarl/i-vxinco.adb: Likewise.
* libgnarl/i-vxinco.ads: Likewise.
* libgnarl/s-inmaop.ads: Likewise.
* libgnarl/s-inmaop__dummy.adb: Likewise.
* libgnarl/s-inmaop__posix.adb: Likewise.
* libgnarl/s-inmaop__vxworks.adb: Likewise.
* libgnarl/s-interr.adb: Likewise.
* libgnarl/s-interr.ads: Likewise.
* libgnarl/s-interr__dummy.adb: Likewise.
* libgnarl/s-interr__hwint.adb: Likewise.
* libgnarl/s-interr__sigaction.adb: Likewise.
* libgnarl/s-interr__vxworks.adb: Likewise.
* libgnarl/s-intman.ads: Likewise.
* libgnarl/s-intman__android.adb: Likewise.
* libgnarl/s-intman__dummy.adb: Likewise.
* libgnarl/s-intman__lynxos.adb: Likewise.
* libgnarl/s-intman__mingw.adb: Likewise.
* libgnarl/s-intman__posix.adb: Likewise.
* libgnarl/s-intman__qnx.adb: Likewise.
* libgnarl/s-intman__solaris.adb: Likewise.
* libgnarl/s-intman__susv3.adb: Likewise.
* libgnarl/s-intman__vxworks.adb: Likewise.
* libgnarl/s-intman__vxworks.ads: Likewise.
* libgnarl/s-linux.ads: Likewise.
* libgnarl/s-linux__alpha.ads: Likewise.
* libgnarl/s-linux__android.ads: Likewise.
* libgnarl/s-linux__hppa.ads: Likewise.
* libgnarl/s-linux__mips.ads: Likewise.
* libgnarl/s-linux__riscv.ads: Likewise.
* libgnarl/s-linux__sparc.ads: Likewise.
* libgnarl/s-linux__x32.ads: Likewise.
* libgnarl/s-mudido.adb: Likewise.
* libgnarl/s-mudido__affinity.adb: Likewise.
* libgnarl/s-osinte__aix.adb: Likewise.
* libgnarl/s-osinte__aix.ads: Likewise.
* libgnarl/s-osinte__android.adb: Likewise.
* libgnarl/s-osinte__android.ads: Likewise.
* libgnarl/s-osinte__darwin.adb: Likewise.
* libgnarl/s-osinte__darwin.ads: Likewise.
* libgnarl/s-osinte__dragonfly.adb: Likewise.
* libgnarl/s-osinte__dragonfly.ads: Likewise.
* libgnarl/s-osinte__dummy.ads: Likewise.
* libgnarl/s-osinte__freebsd.adb: Likewise.
* libgnarl/s-osinte__freebsd.ads: Likewise.
* libgnarl/s-osinte__gnu.adb: Likewise.
* libgnarl/s-osinte__gnu.ads: Likewise.
* libgnarl/s-osinte__hpux-dce.adb: Likewise.
* libgnarl/s-osinte__hpux-dce.ads: Likewise.
* libgnarl/s-osinte__hpux.ads: Likewise.
* libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
* libgnarl/s-osinte__linux.ads: Likewise.
* libgnarl/s-osinte__lynxos178.adb: Likewise.
* libgnarl/s-osinte__lynxos178e.ads: Likewise.
* libgnarl/s-osinte__mingw.ads: Likewise.
* libgnarl/s-osinte__posix.adb: Likewise.
* libgnarl/s-osinte__qnx.adb: Likewise.
* libgnarl/s-osinte__qnx.ads: Likewise.
* libgnarl/s-osinte__rtems.adb: Likewise.
* libgnarl/s-osinte__rtems.ads: Likewise.
* libgnarl/s-osinte__solaris.adb: Likewise.
* libgnarl/s-osinte__solaris.ads: Likewise.
* libgnarl/s-osinte__vxworks.adb: Likewise.
* libgnarl/s-osinte__vxworks.ads: Likewise.
* libgnarl/s-osinte__x32.adb: Likewise.
* libgnarl/s-proinf.adb: Likewise.
* libgnarl/s-proinf.ads: Likewise.
* libgnarl/s-qnx.ads: Likewise.
* libgnarl/s-solita.adb: Likewise.
* libgnarl/s-solita.ads: Likewise.
* libgnarl/s-stusta.adb: Likewise.
* libgnarl/s-stusta.ads: Likewise.
* libgnarl/s-taasde.adb: Likewise.
* libgnarl/s-taasde.ads: Likewise.
* libgnarl/s-tadeca.adb: Likewise.
* libgnarl/s-tadeca.ads: Likewise.
* libgnarl/s-tadert.adb: Likewise.
* libgnarl/s-tadert.ads: Likewise.
* libgnarl/s-taenca.adb: Likewise.
* libgnarl/s-taenca.ads: Likewise.
* libgnarl/s-taprob.adb: Likewise.
* libgnarl/s-taprob.ads: Likewise.
* libgnarl/s-taprop.ads: Likewise.
* libgnarl/s-taprop__dummy.adb: Likewise.
* libgnarl/s-taprop__hpux-dce.adb: Likewise.
* libgnarl/s-taprop__linux.adb: Likewise.
* libgnarl/s-taprop__mingw.adb: Likewise.
* libgnarl/s-taprop__posix.adb: Likewise.
* libgnarl/s-taprop__qnx.adb: Likewise.
* libgnarl/s-taprop__solaris.adb: Likewise.
* libgnarl/s-taprop__vxworks.adb: Likewise.
* libgnarl/s-tarest.adb: Likewise.
* libgnarl/s-tarest.ads: Likewise.
* libgnarl/s-tasdeb.adb: Likewise.
* libgnarl/s-tasdeb.ads: Likewise.
* libgnarl/s-tasinf.adb: Likewise.
* libgnarl/s-tasinf.ads: Likewise.
* libgnarl/s-tasinf__linux.adb: Likewise.
* libgnarl/s-tasinf__linux.ads: Likewise.
* libgnarl/s-tasinf__mingw.adb: Likewise.
* libgnarl/s-tasinf__mingw.ads: Likewise.
* libgnarl/s-tasinf__solaris.adb: Likewise.
* libgnarl/s-tasinf__solaris.ads: Likewise.
* libgnarl/s-tasinf__vxworks.ads: Likewise.
* libgnarl/s-tasini.adb: Likewise.
* libgnarl/s-tasini.ads: Likewise.
* libgnarl/s-taskin.adb: Likewise.
* libgnarl/s-taskin.ads: Likewise.
* libgnarl/s-taspri__dummy.ads: Likewise.
* libgnarl/s-taspri__hpux-dce.ads: Likewise.
* libgnarl/s-taspri__lynxos.ads: Likewise.
* libgnarl/s-taspri__mingw.ads: Likewise.
* libgnarl/s-taspri__posix-noaltstack.ads: Likewise.
* libgnarl/s-taspri__posix.ads: Likewise.
* libgnarl/s-taspri__solaris.ads: Likewise.
* libgnarl/s-taspri__vxworks.ads: Likewise.
* libgnarl/s-tasque.adb: Likewise.
* libgnarl/s-tasque.ads: Likewise.
* libgnarl/s-tasren.adb: Likewise.
* libgnarl/s-tasren.ads: Likewise.
* libgnarl/s-tasres.ads: Likewise.
* libgnarl/s-tassta.adb: Likewise.
* libgnarl/s-tassta.ads: Likewise.
* libgnarl/s-tasuti.adb: Likewise.
* libgnarl/s-tasuti.ads: Likewise.
* libgnarl/s-tataat.adb: Likewise.
* libgnarl/s-tataat.ads: Likewise.
* libgnarl/s-tpinop.adb: Likewise.
* libgnarl/s-tpinop.ads: Likewise.
* libgnarl/s-tpoaal.adb: Likewise.
* libgnarl/s-tpoben.adb: Likewise.
* libgnarl/s-tpoben.ads: Likewise.
* libgnarl/s-tpobmu.adb: Likewise.
* libgnarl/s-tpobmu.ads: Likewise.
* libgnarl/s-tpobop.adb: Likewise.
* libgnarl/s-tpobop.ads: Likewise.
* libgnarl/s-tpopmo.adb: Likewise.
* libgnarl/s-tpopsp__posix-foreign.adb: Likewise.
* libgnarl/s-tpopsp__posix.adb: Likewise.
* libgnarl/s-tpopsp__solaris.adb: Likewise.
* libgnarl/s-tpopsp__tls.adb: Likewise.
* libgnarl/s-tpopsp__vxworks-rtp.adb: Likewise.
* libgnarl/s-tpopsp__vxworks-tls.adb: Likewise.
* libgnarl/s-tpopsp__vxworks.adb: Likewise.
* libgnarl/s-tporft.adb: Likewise.
* libgnarl/s-tposen.adb: Likewise.
* libgnarl/s-tposen.ads: Likewise.
* libgnarl/s-vxwext.adb: Likewise.
* libgnarl/s-vxwext.ads: Likewise.
* libgnarl/s-vxwext__kernel-smp.adb: Likewise.
* libgnarl/s-vxwext__kernel.adb: Likewise.
* libgnarl/s-vxwext__kernel.ads: Likewise.
* libgnarl/s-vxwext__noints.adb: Likewise.
* libgnarl/s-vxwext__rtp-smp.adb: Likewise.
* libgnarl/s-vxwext__rtp.adb: Likewise.
* libgnarl/s-vxwext__rtp.ads: Likewise.
* libgnarl/s-vxwext__vthreads.ads: Likewise.
* libgnarl/s-vxwork__aarch64.ads: Likewise.
* libgnarl/s-vxwork__arm.ads: Likewise.
* libgnarl/s-vxwork__ppc.ads: Likewise.
* libgnarl/s-vxwork__x86.ads: Likewise.
* libgnarl/thread.c: Likewise.
* libgnat/a-assert.adb: Likewise.
* libgnat/a-assert.ads: Likewise.
* libgnat/a-btgbso.adb: Likewise.
* libgnat/a-btgbso.ads: Likewise.
* libgnat/a-calari.adb: Likewise.
* libgnat/a-calari.ads: Likewise.
* libgnat/a-calcon.adb: Likewise.
* libgnat/a-calcon.ads: Likewise.
* libgnat/a-caldel.adb: Likewise.
* libgnat/a-caldel.ads: Likewise.
* libgnat/a-calend.adb: Likewise.
* libgnat/a-calend.ads: Likewise.
* libgnat/a-calfor.adb: Likewise.
* libgnat/a-calfor.ads: Likewise.
* libgnat/a-catizo.adb: Likewise.
* libgnat/a-cbdlli.adb: Likewise.
* libgnat/a-cbdlli.ads: Likewise.
* libgnat/a-cbhama.adb: Likewise.
* libgnat/a-cbhama.ads: Likewise.
* libgnat/a-cbhase.adb: Likewise.
* libgnat/a-cbhase.ads: Likewise.
* libgnat/a-cbmutr.adb: Likewise.
* libgnat/a-cbmutr.ads: Likewise.
* libgnat/a-cborma.adb: Likewise.
* libgnat/a-cborma.ads: Likewise.
* libgnat/a-cborse.adb: Likewise.
* libgnat/a-cborse.ads: Likewise.
* libgnat/a-cbprqu.adb: Likewise.
* libgnat/a-cbprqu.ads: Likewise.
* libgnat/a-cbsyqu.adb: Likewise.
* libgnat/a-cbsyqu.ads: Likewise.
* libgnat/a-cdlili.adb: Likewise.
* libgnat/a-cdlili.ads: Likewise.
* libgnat/a-cfdlli.adb: Likewise.
* libgnat/a-cfdlli.ads: Likewise.
* libgnat/a-cfhama.adb: Likewise.
* libgnat/a-cfhama.ads: Likewise.
* libgnat/a-cfhase.adb: Likewise.
* libgnat/a-cfhase.ads: Likewise.
* libgnat/a-cfinve.adb: Likewise.
* libgnat/a-cfinve.ads: Likewise.
* libgnat/a-cforma.adb: Likewise.
* libgnat/a-cforma.ads: Likewise.
* libgnat/a-cforse.adb: Likewise.
* libgnat/a-cforse.ads: Likewise.
* libgnat/a-cgaaso.adb: Likewise.
* libgnat/a-cgaaso.ads: Likewise.
* libgnat/a-cgarso.adb: Likewise.
* libgnat/a-cgcaso.adb: Likewise.
* libgnat/a-chacon.adb: Likewise.
* libgnat/a-chacon.ads: Likewise.
* libgnat/a-chahan.adb: Likewise.
* libgnat/a-chahan.ads: Likewise.
* libgnat/a-chlat9.ads: Likewise.
* libgnat/a-chtgbk.adb: Likewise.
* libgnat/a-chtgbk.ads: Likewise.
* libgnat/a-chtgbo.adb: Likewise.
* libgnat/a-chtgbo.ads: Likewise.
* libgnat/a-chtgke.adb: Likewise.
* libgnat/a-chtgke.ads: Likewise.
* libgnat/a-chtgop.adb: Likewise.
* libgnat/a-chtgop.ads: Likewise.
* libgnat/a-chzla1.ads: Likewise.
* libgnat/a-chzla9.ads: Likewise.
* libgnat/a-cidlli.adb: Likewise.
* libgnat/a-cidlli.ads: Likewise.
* libgnat/a-cihama.adb: Likewise.
* libgnat/a-cihama.ads: Likewise.
* libgnat/a-cihase.adb: Likewise.
* libgnat/a-cihase.ads: Likewise.
* libgnat/a-cimutr.adb: Likewise.
* libgnat/a-cimutr.ads: Likewise.
* libgnat/a-ciorma.adb: Likewise.
* libgnat/a-ciorma.ads: Likewise.
* libgnat/a-ciormu.adb: Likewise.
* libgnat/a-ciormu.ads: Likewise.
* libgnat/a-ciorse.adb: Likewise.
* libgnat/a-ciorse.ads: Likewise.
* libgnat/a-clrefi.adb: Likewise.
* libgnat/a-clrefi.ads: Likewise.
* libgnat/a-coboho.adb: Likewise.
* libgnat/a-coboho.ads: Likewise.
* libgnat/a-cobove.adb: Likewise.
* libgnat/a-cobove.ads: Likewise.
* libgnat/a-cofove.adb: Likewise.
* libgnat/a-cofove.ads: Likewise.
* libgnat/a-cofuba.adb: Likewise.
* libgnat/a-cofuba.ads: Likewise.
* libgnat/a-cofuma.adb: Likewise.
* libgnat/a-cofuma.ads: Likewise.
* libgnat/a-cofuse.adb: Likewise.
* libgnat/a-cofuse.ads: Likewise.
* libgnat/a-cofuve.adb: Likewise.
* libgnat/a-cofuve.ads: Likewise.
* libgnat/a-cogeso.adb: Likewise.
* libgnat/a-cogeso.ads: Likewise.
* libgnat/a-cohama.adb: Likewise.
* libgnat/a-cohama.ads: Likewise.
* libgnat/a-cohase.adb: Likewise.
* libgnat/a-cohase.ads: Likewise.
* libgnat/a-cohata.ads: Likewise.
* libgnat/a-coinho.adb: Likewise.
* libgnat/a-coinho.ads: Likewise.
* libgnat/a-coinho__shared.adb: Likewise.
* libgnat/a-coinho__shared.ads: Likewise.
* libgnat/a-coinve.adb: Likewise.
* libgnat/a-coinve.ads: Likewise.
* libgnat/a-colien.adb: Likewise.
* libgnat/a-colien.ads: Likewise.
* libgnat/a-colire.adb: Likewise.
* libgnat/a-colire.ads: Likewise.
* libgnat/a-comlin.adb: Likewise.
* libgnat/a-comlin.ads: Likewise.
* libgnat/a-comutr.adb: Likewise.
* libgnat/a-comutr.ads: Likewise.
* libgnat/a-conhel.adb: Likewise.
* libgnat/a-conhel.ads: Likewise.
* libgnat/a-convec.adb: Likewise.
* libgnat/a-convec.ads: Likewise.
* libgnat/a-coorma.adb: Likewise.
* libgnat/a-coorma.ads: Likewise.
* libgnat/a-coormu.adb: Likewise.
* libgnat/a-coormu.ads: Likewise.
* libgnat/a-coorse.adb: Likewise.
* libgnat/a-coorse.ads: Likewise.
* libgnat/a-coprnu.adb: Likewise.
* libgnat/a-coprnu.ads: Likewise.
* libgnat/a-crbltr.ads: Likewise.
* libgnat/a-crbtgk.adb: Likewise.
* libgnat/a-crbtgk.ads: Likewise.
* libgnat/a-crbtgo.adb: Likewise.
* libgnat/a-crbtgo.ads: Likewise.
* libgnat/a-crdlli.adb: Likewise.
* libgnat/a-crdlli.ads: Likewise.
* libgnat/a-csquin.ads: Likewise.
* libgnat/a-cuprqu.adb: Likewise.
* libgnat/a-cuprqu.ads: Likewise.
* libgnat/a-cusyqu.adb: Likewise.
* libgnat/a-cusyqu.ads: Likewise.
* libgnat/a-cwila1.ads: Likewise.
* libgnat/a-cwila9.ads: Likewise.
* libgnat/a-decima.adb: Likewise.
* libgnat/a-decima.ads: Likewise.
* libgnat/a-dhfina.adb: Likewise.
* libgnat/a-dhfina.ads: Likewise.
* libgnat/a-diocst.adb: Likewise.
* libgnat/a-diocst.ads: Likewise.
* libgnat/a-direct.adb: Likewise.
* libgnat/a-direct.ads: Likewise.
* libgnat/a-direio.adb: Likewise.
* libgnat/a-direio.ads: Likewise.
* libgnat/a-dirval.adb: Likewise.
* libgnat/a-dirval.ads: Likewise.
* libgnat/a-dirval__mingw.adb: Likewise.
* libgnat/a-einuoc.adb: Likewise.
* libgnat/a-einuoc.ads: Likewise.
* libgnat/a-elchha.adb: Likewise.
* libgnat/a-elchha.ads: Likewise.
* libgnat/a-elchha__vxworks-ppc-full.adb: Likewise.
* libgnat/a-envvar.adb: Likewise.
* libgnat/a-excach.adb: Likewise.
* libgnat/a-except.adb: Likewise.
* libgnat/a-except.ads: Likewise.
* libgnat/a-excpol.adb: Likewise.
* libgnat/a-excpol__abort.adb: Likewise.
* libgnat/a-exctra.adb: Likewise.
* libgnat/a-exctra.ads: Likewise.
* libgnat/a-exexda.adb: Likewise.
* libgnat/a-exexpr.adb: Likewise.
* libgnat/a-exextr.adb: Likewise.
* libgnat/a-exstat.adb: Likewise.
* libgnat/a-finali.adb: Likewise.
* libgnat/a-finali.ads: Likewise.
* libgnat/a-locale.adb: Likewise.
* libgnat/a-locale.ads: Likewise.
* libgnat/a-nbnbin.adb: Likewise.
* libgnat/a-nbnbin__gmp.adb: Likewise.
* libgnat/a-nbnbre.adb: Likewise.
* libgnat/a-ngcefu.adb: Likewise.
* libgnat/a-ngcoar.adb: Likewise.
* libgnat/a-ngcoty.adb: Likewise.
* libgnat/a-ngcoty.ads: Likewise.
* libgnat/a-ngelfu.adb: Likewise.
* libgnat/a-ngelfu.ads: Likewise.
* libgnat/a-ngrear.adb: Likewise.
* libgnat/a-ngrear.ads: Likewise.
* libgnat/a-nudira.adb: Likewise.
* libgnat/a-nudira.ads: Likewise.
* libgnat/a-nuflra.adb: Likewise.
* libgnat/a-nuflra.ads: Likewise.
* libgnat/a-numaux.ads: Likewise.
* libgnat/a-numaux__darwin.adb: Likewise.
* libgnat/a-numaux__darwin.ads: Likewise.
* libgnat/a-numaux__libc-x86.ads: Likewise.
* libgnat/a-numaux__vxworks.ads: Likewise.
* libgnat/a-numaux__x86.adb: Likewise.
* libgnat/a-numaux__x86.ads: Likewise.
* libgnat/a-rbtgbk.adb: Likewise.
* libgnat/a-rbtgbk.ads: Likewise.
* libgnat/a-rbtgbo.adb: Likewise.
* libgnat/a-rbtgbo.ads: Likewise.
* libgnat/a-rbtgso.adb: Likewise.
* libgnat/a-rbtgso.ads: Likewise.
* libgnat/a-sbecin.adb: Likewise.
* libgnat/a-sbecin.ads: Likewise.
* libgnat/a-sbhcin.adb: Likewise.
* libgnat/a-sbhcin.ads: Likewise.
* libgnat/a-sblcin.adb: Likewise.
* libgnat/a-sblcin.ads: Likewise.
* libgnat/a-secain.adb: Likewise.
* libgnat/a-secain.ads: Likewise.
* libgnat/a-sequio.adb: Likewise.
* libgnat/a-sequio.ads: Likewise.
* libgnat/a-sfecin.ads: Likewise.
* libgnat/a-sfhcin.ads: Likewise.
* libgnat/a-sflcin.ads: Likewise.
* libgnat/a-shcain.adb: Likewise.
* libgnat/a-shcain.ads: Likewise.
* libgnat/a-siocst.adb: Likewise.
* libgnat/a-siocst.ads: Likewise.
* libgnat/a-slcain.adb: Likewise.
* libgnat/a-slcain.ads: Likewise.
* libgnat/a-ssicst.adb: Likewise.
* libgnat/a-ssicst.ads: Likewise.
* libgnat/a-stboha.adb: Likewise.
* libgnat/a-stmaco.ads: Likewise.
* libgnat/a-storio.adb: Likewise.
* libgnat/a-strbou.adb: Likewise.
* libgnat/a-strbou.ads: Likewise.
* libgnat/a-stream.adb: Likewise.
* libgnat/a-stream.ads: Likewise.
* libgnat/a-strfix.adb: Likewise.
* libgnat/a-strhas.adb: Likewise.
* libgnat/a-strmap.adb: Likewise.
* libgnat/a-strmap.ads: Likewise.
* libgnat/a-strsea.adb: Likewise.
* libgnat/a-strsea.ads: Likewise.
* libgnat/a-strsup.adb: Likewise.
* libgnat/a-strsup.ads: Likewise.
* libgnat/a-strunb.adb: Likewise.
* libgnat/a-strunb.ads: Likewise.
* libgnat/a-strunb__shared.adb: Likewise.
* libgnat/a-strunb__shared.ads: Likewise.
* libgnat/a-ststio.adb: Likewise.
* libgnat/a-ststio.ads: Likewise.
* libgnat/a-stunau.adb: Likewise.
* libgnat/a-stunau.ads: Likewise.
* libgnat/a-stunau__shared.adb: Likewise.
* libgnat/a-stunha.adb: Likewise.
* libgnat/a-stuten.adb: Likewise.
* libgnat/a-stwibo.adb: Likewise.
* libgnat/a-stwibo.ads: Likewise.
* libgnat/a-stwifi.adb: Likewise.
* libgnat/a-stwiha.adb: Likewise.
* libgnat/a-stwima.adb: Likewise.
* libgnat/a-stwima.ads: Likewise.
* libgnat/a-stwise.adb: Likewise.
* libgnat/a-stwise.ads: Likewise.
* libgnat/a-stwisu.adb: Likewise.
* libgnat/a-stwisu.ads: Likewise.
* libgnat/a-stwiun.adb: Likewise.
* libgnat/a-stwiun.ads: Likewise.
* libgnat/a-stwiun__shared.adb: Likewise.
* libgnat/a-stwiun__shared.ads: Likewise.
* libgnat/a-stzbou.adb: Likewise.
* libgnat/a-stzbou.ads: Likewise.
* libgnat/a-stzfix.adb: Likewise.
* libgnat/a-stzhas.adb: Likewise.
* libgnat/a-stzmap.adb: Likewise.
* libgnat/a-stzmap.ads: Likewise.
* libgnat/a-stzsea.adb: Likewise.
* libgnat/a-stzsea.ads: Likewise.
* libgnat/a-stzsup.adb: Likewise.
* libgnat/a-stzsup.ads: Likewise.
* libgnat/a-stzunb.adb: Likewise.
* libgnat/a-stzunb.ads: Likewise.
* libgnat/a-stzunb__shared.adb: Likewise.
* libgnat/a-stzunb__shared.ads: Likewise.
* libgnat/a-suecin.adb: Likewise.
* libgnat/a-suecin.ads: Likewise.
* libgnat/a-suenco.adb: Likewise.
* libgnat/a-suenst.adb: Likewise.
* libgnat/a-suewst.adb: Likewise.
* libgnat/a-suezst.adb: Likewise.
* libgnat/a-suhcin.adb: Likewise.
* libgnat/a-suhcin.ads: Likewise.
* libgnat/a-sulcin.adb: Likewise.
* libgnat/a-sulcin.ads: Likewise.
* libgnat/a-suteio.adb: Likewise.
* libgnat/a-suteio.ads: Likewise.
* libgnat/a-suteio__shared.adb: Likewise.
* libgnat/a-swbwha.adb: Likewise.
* libgnat/a-swmwco.ads: Likewise.
* libgnat/a-swunau.adb: Likewise.
* libgnat/a-swunau.ads: Likewise.
* libgnat/a-swunau__shared.adb: Likewise.
* libgnat/a-swuwha.adb: Likewise.
* libgnat/a-swuwti.adb: Likewise.
* libgnat/a-swuwti.ads: Likewise.
* libgnat/a-swuwti__shared.adb: Likewise.
* libgnat/a-szbzha.adb: Likewise.
* libgnat/a-szmzco.ads: Likewise.
* libgnat/a-szunau.adb: Likewise.
* libgnat/a-szunau.ads: Likewise.
* libgnat/a-szunau__shared.adb: Likewise.
* libgnat/a-szuzha.adb: Likewise.
* libgnat/a-szuzti.adb: Likewise.
* libgnat/a-szuzti.ads: Likewise.
* libgnat/a-szuzti__shared.adb: Likewise.
* libgnat/a-tags.adb: Likewise.
* libgnat/a-tags.ads: Likewise.
* libgnat/a-teioed.adb: Likewise.
* libgnat/a-teioed.ads: Likewise.
* libgnat/a-textio.adb: Likewise.
* libgnat/a-textio.ads: Likewise.
* libgnat/a-tiboio.adb: Likewise.
* libgnat/a-ticoau.adb: Likewise.
* libgnat/a-ticoau.ads: Likewise.
* libgnat/a-ticoio.adb: Likewise.
* libgnat/a-ticoio.ads: Likewise.
* libgnat/a-tideau.adb: Likewise.
* libgnat/a-tideau.ads: Likewise.
* libgnat/a-tideio.adb: Likewise.
* libgnat/a-tideio.ads: Likewise.
* libgnat/a-tienau.adb: Likewise.
* libgnat/a-tienau.ads: Likewise.
* libgnat/a-tienio.adb: Likewise.
* libgnat/a-tifiio.adb: Likewise.
* libgnat/a-tiflau.adb: Likewise.
* libgnat/a-tiflau.ads: Likewise.
* libgnat/a-tiflio.adb: Likewise.
* libgnat/a-tiflio.ads: Likewise.
* libgnat/a-tigeau.adb: Likewise.
* libgnat/a-tigeau.ads: Likewise.
* libgnat/a-tigeli.adb: Likewise.
* libgnat/a-tiinau.adb: Likewise.
* libgnat/a-tiinau.ads: Likewise.
* libgnat/a-tiinio.adb: Likewise.
* libgnat/a-tiinio.ads: Likewise.
* libgnat/a-timoau.adb: Likewise.
* libgnat/a-timoau.ads: Likewise.
* libgnat/a-timoio.adb: Likewise.
* libgnat/a-timoio.ads: Likewise.
* libgnat/a-tiocst.adb: Likewise.
* libgnat/a-tiocst.ads: Likewise.
* libgnat/a-tirsfi.adb: Likewise.
* libgnat/a-tirsfi.ads: Likewise.
* libgnat/a-titest.adb: Likewise.
* libgnat/a-undesu.adb: Likewise.
* libgnat/a-wichha.adb: Likewise.
* libgnat/a-wichun.adb: Likewise.
* libgnat/a-wichun.ads: Likewise.
* libgnat/a-witeio.adb: Likewise.
* libgnat/a-witeio.ads: Likewise.
* libgnat/a-wrstfi.adb: Likewise.
* libgnat/a-wrstfi.ads: Likewise.
* libgnat/a-wtcoau.adb: Likewise.
* libgnat/a-wtcoau.ads: Likewise.
* libgnat/a-wtcoio.adb: Likewise.
* libgnat/a-wtcstr.adb: Likewise.
* libgnat/a-wtcstr.ads: Likewise.
* libgnat/a-wtdeau.adb: Likewise.
* libgnat/a-wtdeau.ads: Likewise.
* libgnat/a-wtdeio.adb: Likewise.
* libgnat/a-wtedit.adb: Likewise.
* libgnat/a-wtedit.ads: Likewise.
* libgnat/a-wtenau.adb: Likewise.
* libgnat/a-wtenau.ads: Likewise.
* libgnat/a-wtenio.adb: Likewise.
* libgnat/a-wtfiio.adb: Likewise.
* libgnat/a-wtflau.adb: Likewise.
* libgnat/a-wtflau.ads: Likewise.
* libgnat/a-wtflio.adb: Likewise.
* libgnat/a-wtgeau.adb: Likewise.
* libgnat/a-wtgeau.ads: Likewise.
* libgnat/a-wtinau.adb: Likewise.
* libgnat/a-wtinau.ads: Likewise.
* libgnat/a-wtinio.adb: Likewise.
* libgnat/a-wtmoau.adb: Likewise.
* libgnat/a-wtmoau.ads: Likewise.
* libgnat/a-wtmoio.adb: Likewise.
* libgnat/a-wtmoio.ads: Likewise.
* libgnat/a-wttest.adb: Likewise.
* libgnat/a-wwboio.adb: Likewise.
* libgnat/a-zchhan.adb: Likewise.
* libgnat/a-zchuni.adb: Likewise.
* libgnat/a-zchuni.ads: Likewise.
* libgnat/a-zrstfi.adb: Likewise.
* libgnat/a-zrstfi.ads: Likewise.
* libgnat/a-ztcoau.adb: Likewise.
* libgnat/a-ztcoio.adb: Likewise.
* libgnat/a-ztcstr.adb: Likewise.
* libgnat/a-ztcstr.ads: Likewise.
* libgnat/a-ztdeau.adb: Likewise.
* libgnat/a-ztdeau.ads: Likewise.
* libgnat/a-ztdeio.adb: Likewise.
* libgnat/a-ztedit.adb: Likewise.
* libgnat/a-ztedit.ads: Likewise.
* libgnat/a-ztenau.adb: Likewise.
* libgnat/a-ztenau.ads: Likewise.
* libgnat/a-ztenio.adb: Likewise.
* libgnat/a-ztexio.adb: Likewise.
* libgnat/a-ztexio.ads: Likewise.
* libgnat/a-ztfiio.adb: Likewise.
* libgnat/a-ztflau.adb: Likewise.
* libgnat/a-ztflau.ads: Likewise.
* libgnat/a-ztflio.adb: Likewise.
* libgnat/a-ztgeau.adb: Likewise.
* libgnat/a-ztgeau.ads: Likewise.
* libgnat/a-ztinau.adb: Likewise.
* libgnat/a-ztinau.ads: Likewise.
* libgnat/a-ztinio.adb: Likewise.
* libgnat/a-ztmoau.adb: Likewise.
* libgnat/a-ztmoau.ads: Likewise.
* libgnat/a-ztmoio.adb: Likewise.
* libgnat/a-zttest.adb: Likewise.
* libgnat/a-zzboio.adb: Likewise.
* libgnat/g-allein.ads: Likewise.
* libgnat/g-alleve.adb: Likewise.
* libgnat/g-alleve.ads: Likewise.
* libgnat/g-alleve__hard.adb: Likewise.
* libgnat/g-alleve__hard.ads: Likewise.
* libgnat/g-altcon.adb: Likewise.
* libgnat/g-altcon.ads: Likewise.
* libgnat/g-altive.ads: Likewise.
* libgnat/g-alveop.adb: Likewise.
* libgnat/g-alveop.ads: Likewise.
* libgnat/g-alvety.ads: Likewise.
* libgnat/g-alvevi.ads: Likewise.
* libgnat/g-arrspl.adb: Likewise.
* libgnat/g-arrspl.ads: Likewise.
* libgnat/g-awk.adb: Likewise.
* libgnat/g-awk.ads: Likewise.
* libgnat/g-binenv.adb: Likewise.
* libgnat/g-binenv.ads: Likewise.
* libgnat/g-brapre.ads: Likewise.
* libgnat/g-bubsor.adb: Likewise.
* libgnat/g-bubsor.ads: Likewise.
* libgnat/g-busora.adb: Likewise.
* libgnat/g-busora.ads: Likewise.
* libgnat/g-busorg.adb: Likewise.
* libgnat/g-busorg.ads: Likewise.
* libgnat/g-byorma.adb: Likewise.
* libgnat/g-byorma.ads: Likewise.
* libgnat/g-bytswa.adb: Likewise.
* libgnat/g-bytswa.ads: Likewise.
* libgnat/g-calend.adb: Likewise.
* libgnat/g-calend.ads: Likewise.
* libgnat/g-casuti.adb: Likewise.
* libgnat/g-casuti.ads: Likewise.
* libgnat/g-catiio.adb: Likewise.
* libgnat/g-catiio.ads: Likewise.
* libgnat/g-cgi.adb: Likewise.
* libgnat/g-cgi.ads: Likewise.
* libgnat/g-cgicoo.adb: Likewise.
* libgnat/g-cgicoo.ads: Likewise.
* libgnat/g-cgideb.adb: Likewise.
* libgnat/g-cgideb.ads: Likewise.
* libgnat/g-comlin.adb: Likewise.
* libgnat/g-comlin.ads: Likewise.
* libgnat/g-comver.adb: Likewise.
* libgnat/g-comver.ads: Likewise.
* libgnat/g-cppexc.adb: Likewise.
* libgnat/g-cppexc.ads: Likewise.
* libgnat/g-crc32.adb: Likewise.
* libgnat/g-crc32.ads: Likewise.
* libgnat/g-ctrl_c.adb: Likewise.
* libgnat/g-ctrl_c.ads: Likewise.
* libgnat/g-curexc.ads: Likewise.
* libgnat/g-debpoo.adb: Likewise.
* libgnat/g-debpoo.ads: Likewise.
* libgnat/g-debuti.adb: Likewise.
* libgnat/g-debuti.ads: Likewise.
* libgnat/g-decstr.adb: Likewise.
* libgnat/g-decstr.ads: Likewise.
* libgnat/g-deutst.ads: Likewise.
* libgnat/g-diopit.adb: Likewise.
* libgnat/g-diopit.ads: Likewise.
* libgnat/g-dirope.adb: Likewise.
* libgnat/g-dirope.ads: Likewise.
* libgnat/g-dynhta.adb: Likewise.
* libgnat/g-dynhta.ads: Likewise.
* libgnat/g-dyntab.adb: Likewise.
* libgnat/g-dyntab.ads: Likewise.
* libgnat/g-eacodu.adb: Likewise.
* libgnat/g-encstr.adb: Likewise.
* libgnat/g-encstr.ads: Likewise.
* libgnat/g-enutst.ads: Likewise.
* libgnat/g-excact.adb: Likewise.
* libgnat/g-excact.ads: Likewise.
* libgnat/g-except.ads: Likewise.
* libgnat/g-exctra.adb: Likewise.
* libgnat/g-exctra.ads: Likewise.
* libgnat/g-expect.adb: Likewise.
* libgnat/g-expect.ads: Likewise.
* libgnat/g-exptty.adb: Likewise.
* libgnat/g-exptty.ads: Likewise.
* libgnat/g-flocon.ads: Likewise.
* libgnat/g-forstr.adb: Likewise.
* libgnat/g-forstr.ads: Likewise.
* libgnat/g-graphs.adb: Likewise.
* libgnat/g-graphs.ads: Likewise.
* libgnat/g-heasor.adb: Likewise.
* libgnat/g-heasor.ads: Likewise.
* libgnat/g-hesora.adb: Likewise.
* libgnat/g-hesora.ads: Likewise.
* libgnat/g-hesorg.adb: Likewise.
* libgnat/g-hesorg.ads: Likewise.
* libgnat/g-htable.adb: Likewise.
* libgnat/g-htable.ads: Likewise.
* libgnat/g-io-put__vxworks.adb: Likewise.
* libgnat/g-io.adb: Likewise.
* libgnat/g-io.ads: Likewise.
* libgnat/g-io_aux.adb: Likewise.
* libgnat/g-io_aux.ads: Likewise.
* libgnat/g-lists.adb: Likewise.
* libgnat/g-lists.ads: Likewise.
* libgnat/g-locfil.adb: Likewise.
* libgnat/g-locfil.ads: Likewise.
* libgnat/g-mbdira.adb: Likewise.
* libgnat/g-mbdira.ads: Likewise.
* libgnat/g-mbflra.adb: Likewise.
* libgnat/g-mbflra.ads: Likewise.
* libgnat/g-md5.adb: Likewise.
* libgnat/g-md5.ads: Likewise.
* libgnat/g-memdum.adb: Likewise.
* libgnat/g-memdum.ads: Likewise.
* libgnat/g-moreex.adb: Likewise.
* libgnat/g-moreex.ads: Likewise.
* libgnat/g-os_lib.adb: Likewise.
* libgnat/g-os_lib.ads: Likewise.
* libgnat/g-pehage.adb: Likewise.
* libgnat/g-pehage.ads: Likewise.
* libgnat/g-rannum.adb: Likewise.
* libgnat/g-rannum.ads: Likewise.
* libgnat/g-regexp.adb: Likewise.
* libgnat/g-regexp.ads: Likewise.
* libgnat/g-regist.adb: Likewise.
* libgnat/g-regist.ads: Likewise.
* libgnat/g-regpat.adb: Likewise.
* libgnat/g-regpat.ads: Likewise.
* libgnat/g-rewdat.adb: Likewise.
* libgnat/g-rewdat.ads: Likewise.
* libgnat/g-sechas.adb: Likewise.
* libgnat/g-sechas.ads: Likewise.
* libgnat/g-sehamd.adb: Likewise.
* libgnat/g-sehamd.ads: Likewise.
* libgnat/g-sehash.adb: Likewise.
* libgnat/g-sehash.ads: Likewise.
* libgnat/g-sercom.adb: Likewise.
* libgnat/g-sercom.ads: Likewise.
* libgnat/g-sercom__linux.adb: Likewise.
* libgnat/g-sercom__mingw.adb: Likewise.
* libgnat/g-sestin.ads: Likewise.
* libgnat/g-sets.adb: Likewise.
* libgnat/g-sets.ads: Likewise.
* libgnat/g-sha1.adb: Likewise.
* libgnat/g-sha1.ads: Likewise.
* libgnat/g-sha224.ads: Likewise.
* libgnat/g-sha256.ads: Likewise.
* libgnat/g-sha384.ads: Likewise.
* libgnat/g-sha512.ads: Likewise.
* libgnat/g-shsh32.adb: Likewise.
* libgnat/g-shsh32.ads: Likewise.
* libgnat/g-shsh64.adb: Likewise.
* libgnat/g-shsh64.ads: Likewise.
* libgnat/g-shshco.adb: Likewise.
* libgnat/g-shshco.ads: Likewise.
* libgnat/g-soccon.ads: Likewise.
* libgnat/g-socket.adb: Likewise.
* libgnat/g-socket.ads: Likewise.
* libgnat/g-socket__dummy.adb: Likewise.
* libgnat/g-socket__dummy.ads: Likewise.
* libgnat/g-socthi.adb: Likewise.
* libgnat/g-socthi.ads: Likewise.
* libgnat/g-socthi__dummy.adb: Likewise.
* libgnat/g-socthi__dummy.ads: Likewise.
* libgnat/g-socthi__mingw.adb: Likewise.
* libgnat/g-socthi__mingw.ads: Likewise.
* libgnat/g-socthi__vxworks.adb: Likewise.
* libgnat/g-socthi__vxworks.ads: Likewise.
* libgnat/g-soliop.ads: Likewise.
* libgnat/g-soliop__lynxos.ads: Likewise.
* libgnat/g-soliop__mingw.ads: Likewise.
* libgnat/g-soliop__qnx.ads: Likewise.
* libgnat/g-soliop__solaris.ads: Likewise.
* libgnat/g-sothco.adb: Likewise.
* libgnat/g-sothco.ads: Likewise.
* libgnat/g-sothco__dummy.adb: Likewise.
* libgnat/g-sothco__dummy.ads: Likewise.
* libgnat/g-souinf.ads: Likewise.
* libgnat/g-spchge.adb: Likewise.
* libgnat/g-spchge.ads: Likewise.
* libgnat/g-speche.adb: Likewise.
* libgnat/g-speche.ads: Likewise.
* libgnat/g-spipat.adb: Likewise.
* libgnat/g-spipat.ads: Likewise.
* libgnat/g-spitbo.adb: Likewise.
* libgnat/g-spitbo.ads: Likewise.
* libgnat/g-sptabo.ads: Likewise.
* libgnat/g-sptain.ads: Likewise.
* libgnat/g-sptavs.ads: Likewise.
* libgnat/g-sse.ads: Likewise.
* libgnat/g-ssvety.ads: Likewise.
* libgnat/g-sthcso.adb: Likewise.
* libgnat/g-stheme.adb: Likewise.
* libgnat/g-strhas.ads: Likewise.
* libgnat/g-string.adb: Likewise.
* libgnat/g-string.ads: Likewise.
* libgnat/g-strspl.ads: Likewise.
* libgnat/g-stseme.adb: Likewise.
* libgnat/g-stsifd__sockets.adb: Likewise.
* libgnat/g-table.adb: Likewise.
* libgnat/g-table.ads: Likewise.
* libgnat/g-tasloc.adb: Likewise.
* libgnat/g-tasloc.ads: Likewise.
* libgnat/g-timsta.adb: Likewise.
* libgnat/g-timsta.ads: Likewise.
* libgnat/g-traceb.adb: Likewise.
* libgnat/g-traceb.ads: Likewise.
* libgnat/g-trasym.adb: Likewise.
* libgnat/g-trasym.ads: Likewise.
* libgnat/g-tty.adb: Likewise.
* libgnat/g-tty.ads: Likewise.
* libgnat/g-u3spch.adb: Likewise.
* libgnat/g-u3spch.ads: Likewise.
* libgnat/g-utf_32.adb: Likewise.
* libgnat/g-utf_32.ads: Likewise.
* libgnat/g-wispch.adb: Likewise.
* libgnat/g-wispch.ads: Likewise.
* libgnat/g-wistsp.ads: Likewise.
* libgnat/g-zspche.adb: Likewise.
* libgnat/g-zspche.ads: Likewise.
* libgnat/g-zstspl.ads: Likewise.
* libgnat/gnat.ads: Likewise.
* libgnat/i-c.adb: Likewise.
* libgnat/i-cexten.ads: Likewise.
* libgnat/i-cobol.adb: Likewise.
* libgnat/i-cobol.ads: Likewise.
* libgnat/i-cpoint.adb: Likewise.
* libgnat/i-cpoint.ads: Likewise.
* libgnat/i-cstrea.adb: Likewise.
* libgnat/i-cstrea.ads: Likewise.
* libgnat/i-cstrin.adb: Likewise.
* libgnat/i-cstrin.ads: Likewise.
* libgnat/i-fortra.adb: Likewise.
* libgnat/i-pacdec.adb: Likewise.
* libgnat/i-pacdec.ads: Likewise.
* libgnat/i-vxwoio.adb: Likewise.
* libgnat/i-vxwoio.ads: Likewise.
* libgnat/i-vxwork.ads: Likewise.
* libgnat/i-vxwork__x86.ads: Likewise.
* libgnat/interfac.ads: Likewise.
* libgnat/memtrack.adb: Likewise.
* libgnat/s-addima.adb: Likewise.
* libgnat/s-addima.ads: Likewise.
* libgnat/s-addope.adb: Likewise.
* libgnat/s-addope.ads: Likewise.
* libgnat/s-aotase.adb: Likewise.
* libgnat/s-aotase.ads: Likewise.
* libgnat/s-arit64.adb: Likewise.
* libgnat/s-arit64.ads: Likewise.
* libgnat/s-assert.adb: Likewise.
* libgnat/s-assert.ads: Likewise.
* libgnat/s-atacco.adb: Likewise.
* libgnat/s-atacco.ads: Likewise.
* libgnat/s-atocou.adb: Likewise.
* libgnat/s-atocou.ads: Likewise.
* libgnat/s-atocou__builtin.adb: Likewise.
* libgnat/s-atocou__x86.adb: Likewise.
* libgnat/s-atoope.ads: Likewise.
* libgnat/s-atopar.adb: Likewise.
* libgnat/s-atopar.ads: Likewise.
* libgnat/s-atopex.adb: Likewise.
* libgnat/s-atopex.ads: Likewise.
* libgnat/s-atopri.adb: Likewise.
* libgnat/s-atopri.ads: Likewise.
* libgnat/s-auxdec.adb: Likewise.
* libgnat/s-auxdec.ads: Likewise.
* libgnat/s-bignum.adb: Likewise.
* libgnat/s-bignum.ads: Likewise.
* libgnat/s-bitfie.ads: Likewise.
* libgnat/s-bitops.adb: Likewise.
* libgnat/s-bitops.ads: Likewise.
* libgnat/s-bituti.adb: Likewise.
* libgnat/s-bituti.ads: Likewise.
* libgnat/s-boarop.ads: Likewise.
* libgnat/s-boustr.adb: Likewise.
* libgnat/s-boustr.ads: Likewise.
* libgnat/s-bytswa.ads: Likewise.
* libgnat/s-carsi8.adb: Likewise.
* libgnat/s-carsi8.ads: Likewise.
* libgnat/s-carun8.adb: Likewise.
* libgnat/s-carun8.ads: Likewise.
* libgnat/s-casi16.adb: Likewise.
* libgnat/s-casi16.ads: Likewise.
* libgnat/s-casi32.adb: Likewise.
* libgnat/s-casi32.ads: Likewise.
* libgnat/s-casi64.adb: Likewise.
* libgnat/s-casi64.ads: Likewise.
* libgnat/s-casuti.adb: Likewise.
* libgnat/s-casuti.ads: Likewise.
* libgnat/s-caun16.adb: Likewise.
* libgnat/s-caun16.ads: Likewise.
* libgnat/s-caun32.adb: Likewise.
* libgnat/s-caun32.ads: Likewise.
* libgnat/s-caun64.adb: Likewise.
* libgnat/s-caun64.ads: Likewise.
* libgnat/s-chepoo.ads: Likewise.
* libgnat/s-commun.adb: Likewise.
* libgnat/s-commun.ads: Likewise.
* libgnat/s-conca2.adb: Likewise.
* libgnat/s-conca2.ads: Likewise.
* libgnat/s-conca3.adb: Likewise.
* libgnat/s-conca3.ads: Likewise.
* libgnat/s-conca4.adb: Likewise.
* libgnat/s-conca4.ads: Likewise.
* libgnat/s-conca5.adb: Likewise.
* libgnat/s-conca5.ads: Likewise.
* libgnat/s-conca6.adb: Likewise.
* libgnat/s-conca6.ads: Likewise.
* libgnat/s-conca7.adb: Likewise.
* libgnat/s-conca7.ads: Likewise.
* libgnat/s-conca8.adb: Likewise.
* libgnat/s-conca8.ads: Likewise.
* libgnat/s-conca9.adb: Likewise.
* libgnat/s-conca9.ads: Likewise.
* libgnat/s-crc32.adb: Likewise.
* libgnat/s-crc32.ads: Likewise.
* libgnat/s-crtl.ads: Likewise.
* libgnat/s-dfmkio.ads: Likewise.
* libgnat/s-dfmopr.ads: Likewise.
* libgnat/s-dgmgop.ads: Likewise.
* libgnat/s-diflio.adb: Likewise.
* libgnat/s-diflio.ads: Likewise.
* libgnat/s-diflmk.ads: Likewise.
* libgnat/s-digemk.ads: Likewise.
* libgnat/s-diinio.adb: Likewise.
* libgnat/s-diinio.ads: Likewise.
* libgnat/s-dilomk.ads: Likewise.
* libgnat/s-dim.ads: Likewise.
* libgnat/s-dimkio.ads: Likewise.
* libgnat/s-dimmks.ads: Likewise.
* libgnat/s-direio.adb: Likewise.
* libgnat/s-direio.ads: Likewise.
* libgnat/s-dlmkio.ads: Likewise.
* libgnat/s-dlmopr.ads: Likewise.
* libgnat/s-dmotpr.ads: Likewise.
* libgnat/s-dsaser.ads: Likewise.
* libgnat/s-dwalin.adb: Likewise.
* libgnat/s-dwalin.ads: Likewise.
* libgnat/s-elaall.adb: Likewise.
* libgnat/s-elaall.ads: Likewise.
* libgnat/s-excdeb.adb: Likewise.
* libgnat/s-excdeb.ads: Likewise.
* libgnat/s-except.adb: Likewise.
* libgnat/s-except.ads: Likewise.
* libgnat/s-excmac__arm.adb: Likewise.
* libgnat/s-excmac__arm.ads: Likewise.
* libgnat/s-excmac__gcc.adb: Likewise.
* libgnat/s-excmac__gcc.ads: Likewise.
* libgnat/s-exctab.adb: Likewise.
* libgnat/s-exctab.ads: Likewise.
* libgnat/s-exctra.adb: Likewise.
* libgnat/s-exctra.ads: Likewise.
* libgnat/s-exnint.adb: Likewise.
* libgnat/s-exnint.ads: Likewise.
* libgnat/s-exnllf.adb: Likewise.
* libgnat/s-exnllf.ads: Likewise.
* libgnat/s-exnlli.adb: Likewise.
* libgnat/s-exnlli.ads: Likewise.
* libgnat/s-expint.adb: Likewise.
* libgnat/s-expint.ads: Likewise.
* libgnat/s-explli.adb: Likewise.
* libgnat/s-explli.ads: Likewise.
* libgnat/s-expllu.adb: Likewise.
* libgnat/s-expllu.ads: Likewise.
* libgnat/s-expmod.adb: Likewise.
* libgnat/s-expmod.ads: Likewise.
* libgnat/s-expuns.adb: Likewise.
* libgnat/s-expuns.ads: Likewise.
* libgnat/s-fatflt.ads: Likewise.
* libgnat/s-fatgen.adb: Likewise.
* libgnat/s-fatgen.ads: Likewise.
* libgnat/s-fatlfl.ads: Likewise.
* libgnat/s-fatllf.ads: Likewise.
* libgnat/s-fatsfl.ads: Likewise.
* libgnat/s-ficobl.ads: Likewise.
* libgnat/s-filatt.ads: Likewise.
* libgnat/s-fileio.adb: Likewise.
* libgnat/s-fileio.ads: Likewise.
* libgnat/s-finmas.adb: Likewise.
* libgnat/s-finmas.ads: Likewise.
* libgnat/s-finroo.adb: Likewise.
* libgnat/s-finroo.ads: Likewise.
* libgnat/s-flocon.adb: Likewise.
* libgnat/s-flocon.ads: Likewise.
* libgnat/s-flocon__none.adb: Likewise.
* libgnat/s-fore.adb: Likewise.
* libgnat/s-fore.ads: Likewise.
* libgnat/s-gearop.adb: Likewise.
* libgnat/s-gearop.ads: Likewise.
* libgnat/s-genbig.adb: Likewise.
* libgnat/s-genbig.ads: Likewise.
* libgnat/s-geveop.adb: Likewise.
* libgnat/s-geveop.ads: Likewise.
* libgnat/s-gloloc.adb: Likewise.
* libgnat/s-gloloc.ads: Likewise.
* libgnat/s-gloloc__mingw.adb: Likewise.
* libgnat/s-htable.adb: Likewise.
* libgnat/s-htable.ads: Likewise.
* libgnat/s-imenne.adb: Likewise.
* libgnat/s-imenne.ads: Likewise.
* libgnat/s-imgbiu.adb: Likewise.
* libgnat/s-imgbiu.ads: Likewise.
* libgnat/s-imgboo.adb: Likewise.
* libgnat/s-imgboo.ads: Likewise.
* libgnat/s-imgcha.adb: Likewise.
* libgnat/s-imgcha.ads: Likewise.
* libgnat/s-imgdec.adb: Likewise.
* libgnat/s-imgdec.ads: Likewise.
* libgnat/s-imgenu.adb: Likewise.
* libgnat/s-imgenu.ads: Likewise.
* libgnat/s-imgint.adb: Likewise.
* libgnat/s-imgint.ads: Likewise.
* libgnat/s-imgllb.adb: Likewise.
* libgnat/s-imgllb.ads: Likewise.
* libgnat/s-imglld.adb: Likewise.
* libgnat/s-imglld.ads: Likewise.
* libgnat/s-imglli.adb: Likewise.
* libgnat/s-imglli.ads: Likewise.
* libgnat/s-imgllu.adb: Likewise.
* libgnat/s-imgllu.ads: Likewise.
* libgnat/s-imgllw.adb: Likewise.
* libgnat/s-imgllw.ads: Likewise.
* libgnat/s-imgrea.adb: Likewise.
* libgnat/s-imgrea.ads: Likewise.
* libgnat/s-imguns.adb: Likewise.
* libgnat/s-imguns.ads: Likewise.
* libgnat/s-imgwch.adb: Likewise.
* libgnat/s-imgwch.ads: Likewise.
* libgnat/s-imgwiu.adb: Likewise.
* libgnat/s-imgwiu.ads: Likewise.
* libgnat/s-io.adb: Likewise.
* libgnat/s-io.ads: Likewise.
* libgnat/s-llflex.ads: Likewise.
* libgnat/s-maccod.ads: Likewise.
* libgnat/s-mantis.adb: Likewise.
* libgnat/s-mantis.ads: Likewise.
* libgnat/s-mastop.adb: Likewise.
* libgnat/s-mastop.ads: Likewise.
* libgnat/s-memcop.ads: Likewise.
* libgnat/s-memory.adb: Likewise.
* libgnat/s-memory.ads: Likewise.
* libgnat/s-mmap.adb: Likewise.
* libgnat/s-mmap.ads: Likewise.
* libgnat/s-mmauni__long.ads: Likewise.
* libgnat/s-mmosin__mingw.adb: Likewise.
* libgnat/s-mmosin__mingw.ads: Likewise.
* libgnat/s-mmosin__unix.adb: Likewise.
* libgnat/s-mmosin__unix.ads: Likewise.
* libgnat/s-multip.adb: Likewise.
* libgnat/s-objrea.adb: Likewise.
* libgnat/s-objrea.ads: Likewise.
* libgnat/s-optide.adb: Likewise.
* libgnat/s-os_lib.adb: Likewise.
* libgnat/s-os_lib.ads: Likewise.
* libgnat/s-osprim.ads: Likewise.
* libgnat/s-osprim__darwin.adb: Likewise.
* libgnat/s-osprim__lynxos.ads: Likewise.
* libgnat/s-osprim__mingw.adb: Likewise.
* libgnat/s-osprim__posix.adb: Likewise.
* libgnat/s-osprim__posix2008.adb: Likewise.
* libgnat/s-osprim__rtems.adb: Likewise.
* libgnat/s-osprim__solaris.adb: Likewise.
* libgnat/s-osprim__unix.adb: Likewise.
* libgnat/s-osprim__vxworks.adb: Likewise.
* libgnat/s-osprim__x32.adb: Likewise.
* libgnat/s-osvers__vxworks-653.ads: Likewise.
* libgnat/s-pack03.adb: Likewise.
* libgnat/s-pack03.ads: Likewise.
* libgnat/s-pack05.adb: Likewise.
* libgnat/s-pack05.ads: Likewise.
* libgnat/s-pack06.adb: Likewise.
* libgnat/s-pack06.ads: Likewise.
* libgnat/s-pack07.adb: Likewise.
* libgnat/s-pack07.ads: Likewise.
* libgnat/s-pack09.adb: Likewise.
* libgnat/s-pack09.ads: Likewise.
* libgnat/s-pack10.adb: Likewise.
* libgnat/s-pack10.ads: Likewise.
* libgnat/s-pack11.adb: Likewise.
* libgnat/s-pack11.ads: Likewise.
* libgnat/s-pack12.adb: Likewise.
* libgnat/s-pack12.ads: Likewise.
* libgnat/s-pack13.adb: Likewise.
* libgnat/s-pack13.ads: Likewise.
* libgnat/s-pack14.adb: Likewise.
* libgnat/s-pack14.ads: Likewise.
* libgnat/s-pack15.adb: Likewise.
* libgnat/s-pack15.ads: Likewise.
* libgnat/s-pack17.adb: Likewise.
* libgnat/s-pack17.ads: Likewise.
* libgnat/s-pack18.adb: Likewise.
* libgnat/s-pack18.ads: Likewise.
* libgnat/s-pack19.adb: Likewise.
* libgnat/s-pack19.ads: Likewise.
* libgnat/s-pack20.adb: Likewise.
* libgnat/s-pack20.ads: Likewise.
* libgnat/s-pack21.adb: Likewise.
* libgnat/s-pack21.ads: Likewise.
* libgnat/s-pack22.adb: Likewise.
* libgnat/s-pack22.ads: Likewise.
* libgnat/s-pack23.adb: Likewise.
* libgnat/s-pack23.ads: Likewise.
* libgnat/s-pack24.adb: Likewise.
* libgnat/s-pack24.ads: Likewise.
* libgnat/s-pack25.adb: Likewise.
* libgnat/s-pack25.ads: Likewise.
* libgnat/s-pack26.adb: Likewise.
* libgnat/s-pack26.ads: Likewise.
* libgnat/s-pack27.adb: Likewise.
* libgnat/s-pack27.ads: Likewise.
* libgnat/s-pack28.adb: Likewise.
* libgnat/s-pack28.ads: Likewise.
* libgnat/s-pack29.adb: Likewise.
* libgnat/s-pack29.ads: Likewise.
* libgnat/s-pack30.adb: Likewise.
* libgnat/s-pack30.ads: Likewise.
* libgnat/s-pack31.adb: Likewise.
* libgnat/s-pack31.ads: Likewise.
* libgnat/s-pack33.adb: Likewise.
* libgnat/s-pack33.ads: Likewise.
* libgnat/s-pack34.adb: Likewise.
* libgnat/s-pack34.ads: Likewise.
* libgnat/s-pack35.adb: Likewise.
* libgnat/s-pack35.ads: Likewise.
* libgnat/s-pack36.adb: Likewise.
* libgnat/s-pack36.ads: Likewise.
* libgnat/s-pack37.adb: Likewise.
* libgnat/s-pack37.ads: Likewise.
* libgnat/s-pack38.adb: Likewise.
* libgnat/s-pack38.ads: Likewise.
* libgnat/s-pack39.adb: Likewise.
* libgnat/s-pack39.ads: Likewise.
* libgnat/s-pack40.adb: Likewise.
* libgnat/s-pack40.ads: Likewise.
* libgnat/s-pack41.adb: Likewise.
* libgnat/s-pack41.ads: Likewise.
* libgnat/s-pack42.adb: Likewise.
* libgnat/s-pack42.ads: Likewise.
* libgnat/s-pack43.adb: Likewise.
* libgnat/s-pack43.ads: Likewise.
* libgnat/s-pack44.adb: Likewise.
* libgnat/s-pack44.ads: Likewise.
* libgnat/s-pack45.adb: Likewise.
* libgnat/s-pack45.ads: Likewise.
* libgnat/s-pack46.adb: Likewise.
* libgnat/s-pack46.ads: Likewise.
* libgnat/s-pack47.adb: Likewise.
* libgnat/s-pack47.ads: Likewise.
* libgnat/s-pack48.adb: Likewise.
* libgnat/s-pack48.ads: Likewise.
* libgnat/s-pack49.adb: Likewise.
* libgnat/s-pack49.ads: Likewise.
* libgnat/s-pack50.adb: Likewise.
* libgnat/s-pack50.ads: Likewise.
* libgnat/s-pack51.adb: Likewise.
* libgnat/s-pack51.ads: Likewise.
* libgnat/s-pack52.adb: Likewise.
* libgnat/s-pack52.ads: Likewise.
* libgnat/s-pack53.adb: Likewise.
* libgnat/s-pack53.ads: Likewise.
* libgnat/s-pack54.adb: Likewise.
* libgnat/s-pack54.ads: Likewise.
* libgnat/s-pack55.adb: Likewise.
* libgnat/s-pack55.ads: Likewise.
* libgnat/s-pack56.adb: Likewise.
* libgnat/s-pack56.ads: Likewise.
* libgnat/s-pack57.adb: Likewise.
* libgnat/s-pack57.ads: Likewise.
* libgnat/s-pack58.adb: Likewise.
* libgnat/s-pack58.ads: Likewise.
* libgnat/s-pack59.adb: Likewise.
* libgnat/s-pack59.ads: Likewise.
* libgnat/s-pack60.adb: Likewise.
* libgnat/s-pack60.ads: Likewise.
* libgnat/s-pack61.adb: Likewise.
* libgnat/s-pack61.ads: Likewise.
* libgnat/s-pack62.adb: Likewise.
* libgnat/s-pack62.ads: Likewise.
* libgnat/s-pack63.adb: Likewise.
* libgnat/s-pack63.ads: Likewise.
* libgnat/s-parame.adb: Likewise.
* libgnat/s-parame.ads: Likewise.
* libgnat/s-parame__ae653.ads: Likewise.
* libgnat/s-parame__hpux.ads: Likewise.
* libgnat/s-parame__rtems.adb: Likewise.
* libgnat/s-parame__vxworks.adb: Likewise.
* libgnat/s-parame__vxworks.ads: Likewise.
* libgnat/s-parint.adb: Likewise.
* libgnat/s-parint.ads: Likewise.
* libgnat/s-pooglo.adb: Likewise.
* libgnat/s-pooglo.ads: Likewise.
* libgnat/s-pooloc.adb: Likewise.
* libgnat/s-pooloc.ads: Likewise.
* libgnat/s-poosiz.adb: Likewise.
* libgnat/s-poosiz.ads: Likewise.
* libgnat/s-powtab.ads: Likewise.
* libgnat/s-purexc.ads: Likewise.
* libgnat/s-rannum.adb: Likewise.
* libgnat/s-rannum.ads: Likewise.
* libgnat/s-ransee.adb: Likewise.
* libgnat/s-ransee.ads: Likewise.
* libgnat/s-regexp.adb: Likewise.
* libgnat/s-regexp.ads: Likewise.
* libgnat/s-regpat.adb: Likewise.
* libgnat/s-regpat.ads: Likewise.
* libgnat/s-resfil.adb: Likewise.
* libgnat/s-resfil.ads: Likewise.
* libgnat/s-restri.adb: Likewise.
* libgnat/s-restri.ads: Likewise.
* libgnat/s-rident.ads: Likewise.
* libgnat/s-rpc.adb: Likewise.
* libgnat/s-rpc.ads: Likewise.
* libgnat/s-scaval.adb: Likewise.
* libgnat/s-scaval.ads: Likewise.
* libgnat/s-secsta.adb: Likewise.
* libgnat/s-secsta.ads: Likewise.
* libgnat/s-sequio.adb: Likewise.
* libgnat/s-sequio.ads: Likewise.
* libgnat/s-shasto.adb: Likewise.
* libgnat/s-shasto.ads: Likewise.
* libgnat/s-soflin.adb: Likewise.
* libgnat/s-soflin.ads: Likewise.
* libgnat/s-soliin.adb: Likewise.
* libgnat/s-soliin.ads: Likewise.
* libgnat/s-sopco3.adb: Likewise.
* libgnat/s-sopco3.ads: Likewise.
* libgnat/s-sopco4.adb: Likewise.
* libgnat/s-sopco4.ads: Likewise.
* libgnat/s-sopco5.adb: Likewise.
* libgnat/s-sopco5.ads: Likewise.
* libgnat/s-spsufi.adb: Likewise.
* libgnat/s-spsufi.ads: Likewise.
* libgnat/s-stache.adb: Likewise.
* libgnat/s-stache.ads: Likewise.
* libgnat/s-stalib.adb: Likewise.
* libgnat/s-stalib.ads: Likewise.
* libgnat/s-stausa.adb: Likewise.
* libgnat/s-stausa.ads: Likewise.
* libgnat/s-stchop.adb: Likewise.
* libgnat/s-stchop.ads: Likewise.
* libgnat/s-stchop__limit.ads: Likewise.
* libgnat/s-stchop__rtems.adb: Likewise.
* libgnat/s-stchop__vxworks.adb: Likewise.
* libgnat/s-stoele.adb: Likewise.
* libgnat/s-stoele.ads: Likewise.
* libgnat/s-stopoo.adb: Likewise.
* libgnat/s-stopoo.ads: Likewise.
* libgnat/s-stposu.adb: Likewise.
* libgnat/s-stposu.ads: Likewise.
* libgnat/s-stratt.adb: Likewise.
* libgnat/s-stratt.ads: Likewise.
* libgnat/s-stratt__xdr.adb: Likewise.
* libgnat/s-strcom.adb: Likewise.
* libgnat/s-strcom.ads: Likewise.
* libgnat/s-strhas.adb: Likewise.
* libgnat/s-strhas.ads: Likewise.
* libgnat/s-string.adb: Likewise.
* libgnat/s-string.ads: Likewise.
* libgnat/s-strops.adb: Likewise.
* libgnat/s-strops.ads: Likewise.
* libgnat/s-ststop.adb: Likewise.
* libgnat/s-ststop.ads: Likewise.
* libgnat/s-tasloc.adb: Likewise.
* libgnat/s-tasloc.ads: Likewise.
* libgnat/s-thread.ads: Likewise.
* libgnat/s-thread__ae653.adb: Likewise.
* libgnat/s-traceb.adb: Likewise.
* libgnat/s-traceb.ads: Likewise.
* libgnat/s-traceb__hpux.adb: Likewise.
* libgnat/s-traceb__mastop.adb: Likewise.
* libgnat/s-traent.adb: Likewise.
* libgnat/s-traent.ads: Likewise.
* libgnat/s-trasym.adb: Likewise.
* libgnat/s-trasym.ads: Likewise.
* libgnat/s-trasym__dwarf.adb: Likewise.
* libgnat/s-tsmona.adb: Likewise.
* libgnat/s-tsmona__linux.adb: Likewise.
* libgnat/s-tsmona__mingw.adb: Likewise.
* libgnat/s-unstyp.ads: Likewise.
* libgnat/s-utf_32.adb: Likewise.
* libgnat/s-utf_32.ads: Likewise.
* libgnat/s-valboo.adb: Likewise.
* libgnat/s-valboo.ads: Likewise.
* libgnat/s-valcha.adb: Likewise.
* libgnat/s-valcha.ads: Likewise.
* libgnat/s-valdec.adb: Likewise.
* libgnat/s-valdec.ads: Likewise.
* libgnat/s-valenu.adb: Likewise.
* libgnat/s-valenu.ads: Likewise.
* libgnat/s-valint.adb: Likewise.
* libgnat/s-valint.ads: Likewise.
* libgnat/s-vallld.adb: Likewise.
* libgnat/s-vallld.ads: Likewise.
* libgnat/s-vallli.adb: Likewise.
* libgnat/s-vallli.ads: Likewise.
* libgnat/s-valllu.adb: Likewise.
* libgnat/s-valllu.ads: Likewise.
* libgnat/s-valrea.adb: Likewise.
* libgnat/s-valrea.ads: Likewise.
* libgnat/s-valuns.adb: Likewise.
* libgnat/s-valuns.ads: Likewise.
* libgnat/s-valuti.adb: Likewise.
* libgnat/s-valuti.ads: Likewise.
* libgnat/s-valwch.adb: Likewise.
* libgnat/s-valwch.ads: Likewise.
* libgnat/s-veboop.adb: Likewise.
* libgnat/s-veboop.ads: Likewise.
* libgnat/s-vector.ads: Likewise.
* libgnat/s-vercon.adb: Likewise.
* libgnat/s-vercon.ads: Likewise.
* libgnat/s-wchcnv.adb: Likewise.
* libgnat/s-wchcnv.ads: Likewise.
* libgnat/s-wchcon.adb: Likewise.
* libgnat/s-wchcon.ads: Likewise.
* libgnat/s-wchjis.adb: Likewise.
* libgnat/s-wchjis.ads: Likewise.
* libgnat/s-wchstw.adb: Likewise.
* libgnat/s-wchstw.ads: Likewise.
* libgnat/s-wchwts.adb: Likewise.
* libgnat/s-wchwts.ads: Likewise.
* libgnat/s-widboo.adb: Likewise.
* libgnat/s-widboo.ads: Likewise.
* libgnat/s-widcha.adb: Likewise.
* libgnat/s-widcha.ads: Likewise.
* libgnat/s-widenu.adb: Likewise.
* libgnat/s-widenu.ads: Likewise.
* libgnat/s-widlli.adb: Likewise.
* libgnat/s-widlli.ads: Likewise.
* libgnat/s-widllu.adb: Likewise.
* libgnat/s-widllu.ads: Likewise.
* libgnat/s-widwch.adb: Likewise.
* libgnat/s-widwch.ads: Likewise.
* libgnat/s-win32.ads: Likewise.
* libgnat/s-winext.ads: Likewise.
* libgnat/s-wwdcha.adb: Likewise.
* libgnat/s-wwdcha.ads: Likewise.
* libgnat/s-wwdenu.adb: Likewise.
* libgnat/s-wwdenu.ads: Likewise.
* libgnat/s-wwdwch.adb: Likewise.
* libgnat/s-wwdwch.ads: Likewise.
* libgnat/system-aix.ads: Likewise.
* libgnat/system-darwin-arm.ads: Likewise.
* libgnat/system-darwin-ppc.ads: Likewise.
* libgnat/system-darwin-x86.ads: Likewise.
* libgnat/system-djgpp.ads: Likewise.
* libgnat/system-dragonfly-x86_64.ads: Likewise.
* libgnat/system-freebsd.ads: Likewise.
* libgnat/system-hpux-ia64.ads: Likewise.
* libgnat/system-hpux.ads: Likewise.
* libgnat/system-linux-alpha.ads: Likewise.
* libgnat/system-linux-arm.ads: Likewise.
* libgnat/system-linux-hppa.ads: Likewise.
* libgnat/system-linux-ia64.ads: Likewise.
* libgnat/system-linux-m68k.ads: Likewise.
* libgnat/system-linux-mips.ads: Likewise.
* libgnat/system-linux-ppc.ads: Likewise.
* libgnat/system-linux-riscv.ads: Likewise.
* libgnat/system-linux-s390.ads: Likewise.
* libgnat/system-linux-sh4.ads: Likewise.
* libgnat/system-linux-sparc.ads: Likewise.
* libgnat/system-linux-x86.ads: Likewise.
* libgnat/system-lynxos178-ppc.ads: Likewise.
* libgnat/system-lynxos178-x86.ads: Likewise.
* libgnat/system-mingw.ads: Likewise.
* libgnat/system-qnx-aarch64.ads: Likewise.
* libgnat/system-rtems.ads: Likewise.
* libgnat/system-solaris-sparc.ads: Likewise.
* libgnat/system-solaris-x86.ads: Likewise.
* libgnat/system-vxworks-arm-rtp-smp.ads: Likewise.
* libgnat/system-vxworks-arm-rtp.ads: Likewise.
* libgnat/system-vxworks-arm.ads: Likewise.
* libgnat/system-vxworks-e500-kernel.ads: Likewise.
* libgnat/system-vxworks-e500-rtp-smp.ads: Likewise.
* libgnat/system-vxworks-e500-rtp.ads: Likewise.
* libgnat/system-vxworks-e500-vthread.ads: Likewise.
* libgnat/system-vxworks-ppc-kernel.ads: Likewise.
* libgnat/system-vxworks-ppc-ravenscar.ads: Likewise.
* libgnat/system-vxworks-ppc-rtp-smp.ads: Likewise.
* libgnat/system-vxworks-ppc-rtp.ads: Likewise.
* libgnat/system-vxworks-ppc-vthread.ads: Likewise.
* libgnat/system-vxworks-ppc.ads: Likewise.
* libgnat/system-vxworks-x86-kernel.ads: Likewise.
* libgnat/system-vxworks-x86-rtp-smp.ads: Likewise.
* libgnat/system-vxworks-x86-rtp.ads: Likewise.
* libgnat/system-vxworks-x86-vthread.ads: Likewise.
* libgnat/system-vxworks-x86.ads: Likewise.
* libgnat/system-vxworks7-aarch64-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-aarch64.ads: Likewise.
* libgnat/system-vxworks7-arm-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-arm.ads: Likewise.
* libgnat/system-vxworks7-e500-kernel.ads: Likewise.
* libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-e500-rtp.ads: Likewise.
* libgnat/system-vxworks7-ppc-kernel.ads: Likewise.
* libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-ppc-rtp.ads: Likewise.
* libgnat/system-vxworks7-ppc64-kernel.ads: Likewise.
* libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86-rtp.ads: Likewise.
* libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
* libgnat/system.ads: Likewise.
* link.c: Likewise.
* live.adb: Likewise.
* live.ads: Likewise.
* locales.c: Likewise.
* make.adb: Likewise.
* make.ads: Likewise.
* make_util.adb: Likewise.
* make_util.ads: Likewise.
* makeusg.adb: Likewise.
* makeusg.ads: Likewise.
* mdll-fil.adb: Likewise.
* mdll-fil.ads: Likewise.
* mdll-utl.adb: Likewise.
* mdll-utl.ads: Likewise.
* mdll.adb: Likewise.
* mdll.ads: Likewise.
* mingw32.h: Likewise.
* mkdir.c: Likewise.
* namet-sp.adb: Likewise.
* namet-sp.ads: Likewise.
* namet.adb: Likewise.
* namet.ads: Likewise.
* namet.h: Likewise.
* nlists.adb: Likewise.
* nlists.ads: Likewise.
* nlists.h: Likewise.
* opt.adb: Likewise.
* opt.ads: Likewise.
* osint-b.adb: Likewise.
* osint-b.ads: Likewise.
* osint-c.adb: Likewise.
* osint-c.ads: Likewise.
* osint-l.adb: Likewise.
* osint-l.ads: Likewise.
* osint-m.adb: Likewise.
* osint-m.ads: Likewise.
* osint.adb: Likewise.
* osint.ads: Likewise.
* output.adb: Likewise.
* output.ads: Likewise.
* par-ch10.adb: Likewise.
* par-ch11.adb: Likewise.
* par-ch12.adb: Likewise.
* par-ch13.adb: Likewise.
* par-ch2.adb: Likewise.
* par-ch3.adb: Likewise.
* par-ch4.adb: Likewise.
* par-ch5.adb: Likewise.
* par-ch6.adb: Likewise.
* par-ch7.adb: Likewise.
* par-ch8.adb: Likewise.
* par-ch9.adb: Likewise.
* par-endh.adb: Likewise.
* par-labl.adb: Likewise.
* par-load.adb: Likewise.
* par-prag.adb: Likewise.
* par-sync.adb: Likewise.
* par-tchk.adb: Likewise.
* par-util.adb: Likewise.
* par.adb: Likewise.
* par.ads: Likewise.
* par_sco.adb: Likewise.
* par_sco.ads: Likewise.
* pprint.adb: Likewise.
* pprint.ads: Likewise.
* prep.adb: Likewise.
* prep.ads: Likewise.
* prepcomp.adb: Likewise.
* prepcomp.ads: Likewise.
* put_scos.adb: Likewise.
* put_scos.ads: Likewise.
* raise-gcc.c: Likewise.
* raise.c: Likewise.
* raise.h: Likewise.
* repinfo-input.adb: Likewise.
* repinfo-input.ads: Likewise.
* repinfo.adb: Likewise.
* repinfo.ads: Likewise.
* repinfo.h: Likewise.
* restrict.adb: Likewise.
* restrict.ads: Likewise.
* rident.ads: Likewise.
* rtfinal.c: Likewise.
* rtinit.c: Likewise.
* rtsfind.adb: Likewise.
* rtsfind.ads: Likewise.
* runtime.h: Likewise.
* s-oscons-tmplt.c: Likewise.
* sa_messages.adb: Likewise.
* sa_messages.ads: Likewise.
* scans.adb: Likewise.
* scans.ads: Likewise.
* scil_ll.adb: Likewise.
* scil_ll.ads: Likewise.
* scn.adb: Likewise.
* scn.ads: Likewise.
* scng.adb: Likewise.
* scng.ads: Likewise.
* scos.adb: Likewise.
* scos.ads: Likewise.
* scos.h: Likewise.
* sdefault.ads: Likewise.
* seh_init.c: Likewise.
* sem.adb: Likewise.
* sem.ads: Likewise.
* sem_aggr.adb: Likewise.
* sem_aggr.ads: Likewise.
* sem_attr.adb: Likewise.
* sem_attr.ads: Likewise.
* sem_aux.adb: Likewise.
* sem_aux.ads: Likewise.
* sem_case.adb: Likewise.
* sem_case.ads: Likewise.
* sem_cat.adb: Likewise.
* sem_cat.ads: Likewise.
* sem_ch10.adb: Likewise.
* sem_ch10.ads: Likewise.
* sem_ch11.adb: Likewise.
* sem_ch11.ads: Likewise.
* sem_ch12.adb: Likewise.
* sem_ch12.ads: Likewise.
* sem_ch13.adb: Likewise.
* sem_ch13.ads: Likewise.
* sem_ch2.adb: Likewise.
* sem_ch2.ads: Likewise.
* sem_ch3.adb: Likewise.
* sem_ch3.ads: Likewise.
* sem_ch4.adb: Likewise.
* sem_ch4.ads: Likewise.
* sem_ch5.adb: Likewise.
* sem_ch5.ads: Likewise.
* sem_ch6.adb: Likewise.
* sem_ch6.ads: Likewise.
* sem_ch7.adb: Likewise.
* sem_ch7.ads: Likewise.
* sem_ch8.adb: Likewise.
* sem_ch8.ads: Likewise.
* sem_ch9.adb: Likewise.
* sem_ch9.ads: Likewise.
* sem_dim.adb: Likewise.
* sem_dim.ads: Likewise.
* sem_disp.adb: Likewise.
* sem_disp.ads: Likewise.
* sem_dist.adb: Likewise.
* sem_dist.ads: Likewise.
* sem_elab.adb: Likewise.
* sem_elab.ads: Likewise.
* sem_elim.adb: Likewise.
* sem_elim.ads: Likewise.
* sem_eval.adb: Likewise.
* sem_eval.ads: Likewise.
* sem_intr.adb: Likewise.
* sem_intr.ads: Likewise.
* sem_mech.adb: Likewise.
* sem_mech.ads: Likewise.
* sem_prag.adb: Likewise.
* sem_prag.ads: Likewise.
* sem_res.adb: Likewise.
* sem_res.ads: Likewise.
* sem_scil.adb: Likewise.
* sem_scil.ads: Likewise.
* sem_smem.adb: Likewise.
* sem_smem.ads: Likewise.
* sem_type.adb: Likewise.
* sem_type.ads: Likewise.
* sem_util.adb: Likewise.
* sem_util.ads: Likewise.
* sem_warn.adb: Likewise.
* sem_warn.ads: Likewise.
* set_targ.adb: Likewise.
* set_targ.ads: Likewise.
* sfn_scan.adb: Likewise.
* sfn_scan.ads: Likewise.
* sigtramp-armdroid.c: Likewise.
* sigtramp-ios.c: Likewise.
* sigtramp-qnx.c: Likewise.
* sigtramp-vxworks.c: Likewise.
* sigtramp.h: Likewise.
* sinfo-cn.adb: Likewise.
* sinfo-cn.ads: Likewise.
* sinfo.adb: Likewise.
* sinfo.ads: Likewise.
* sinput-c.adb: Likewise.
* sinput-c.ads: Likewise.
* sinput-d.adb: Likewise.
* sinput-d.ads: Likewise.
* sinput-l.adb: Likewise.
* sinput-l.ads: Likewise.
* sinput.adb: Likewise.
* sinput.ads: Likewise.
* socket.c: Likewise.
* spark_xrefs.adb: Likewise.
* spark_xrefs.ads: Likewise.
* sprint.adb: Likewise.
* sprint.ads: Likewise.
* stand.adb: Likewise.
* stand.ads: Likewise.
* stringt.adb: Likewise.
* stringt.ads: Likewise.
* stringt.h: Likewise.
* style.adb: Likewise.
* style.ads: Likewise.
* styleg.adb: Likewise.
* styleg.ads: Likewise.
* stylesw.adb: Likewise.
* stylesw.ads: Likewise.
* switch-b.adb: Likewise.
* switch-b.ads: Likewise.
* switch-c.adb: Likewise.
* switch-c.ads: Likewise.
* switch-m.adb: Likewise.
* switch-m.ads: Likewise.
* switch.adb: Likewise.
* switch.ads: Likewise.
* symbols.adb: Likewise.
* symbols.ads: Likewise.
* sysdep.c: Likewise.
* table.adb: Likewise.
* table.ads: Likewise.
* targext.c: Likewise.
* targparm.adb: Likewise.
* targparm.ads: Likewise.
* tbuild.adb: Likewise.
* tbuild.ads: Likewise.
* tempdir.adb: Likewise.
* tempdir.ads: Likewise.
* terminals.c: Likewise.
* tracebak.c: Likewise.
* tree_gen.adb: Likewise.
* tree_gen.ads: Likewise.
* tree_in.adb: Likewise.
* tree_in.ads: Likewise.
* tree_io.adb: Likewise.
* tree_io.ads: Likewise.
* treepr.adb: Likewise.
* treepr.ads: Likewise.
* ttypes.ads: Likewise.
* types.adb: Likewise.
* types.ads: Likewise.
* types.h: Likewise.
* uintp.adb: Likewise.
* uintp.ads: Likewise.
* uintp.h: Likewise.
* uname.adb: Likewise.
* uname.ads: Likewise.
* urealp.adb: Likewise.
* urealp.ads: Likewise.
* urealp.h: Likewise.
* usage.adb: Likewise.
* usage.ads: Likewise.
* validsw.adb: Likewise.
* validsw.ads: Likewise.
* warnsw.adb: Likewise.
* warnsw.ads: Likewise.
* widechar.adb: Likewise.
* widechar.ads: Likewise.
* xeinfo.adb: Likewise.
* xnmake.adb: Likewise.
* xoscons.adb: Likewise.
* xr_tabls.adb: Likewise.
* xr_tabls.ads: Likewise.
* xref_lib.adb: Likewise.
* xref_lib.ads: Likewise.
* xsinfo.adb: Likewise.
* xsnamest.adb: Likewise.
* xtreeprs.adb: Likewise.
* xutil.adb: Likewise.
* xutil.ads: Likewise.
|
|
------------------------
-- Elaboration checks --
------------------------
The dynamic ABE checks model now emits the same diagnostics as those of the
static ABE checks model.
The ABE checks mechanism has been redesigned and refactored in the face of
increasing requirements. Most of the functionality can now be toggled, thus
allowing for various combinations of behavior. The combinations are defined
as "initial states" and may be further altered.
Scenarios and targets have been distinctly separated at the higher level,
instead of directly working with nodes and entitites. Scenarios and targets
now carry a representation which removes the need to constantly recompute
relevant attributes, and offers a common interface for the various processors.
Most processing has now been refactored into "services" which perform a single
ABE-related function.
-----------------------
-- Elaboration order --
-----------------------
A new elaboration order mechanism based on the use of an invocation graph to
provide extra information about the flow of execution at elaboration time has
been introduced.
The ABE checks mechanism has been altered to encode pieces of the invocation
graph in the associated ALI files of units.
The new elaboration order mechanism reconstructs the full invocation graph at
bind time, and coupled with the library item graph, determines the elaboration
order of units.
The new elaboration order mechanism is currently inaccessible.
------------
-- Source --
------------
-- pack.ads
package Pack is
procedure ABE_Proc;
procedure Safe_Proc;
end Pack;
-- pack.adb
with Ada.Text_IO; use Ada.Text_IO;
package body Pack is
function Call_Proc (ABE : Boolean) return Integer;
procedure Safe_Proc is
begin
Put_Line ("safe");
end Safe_Proc;
function Call_Proc (ABE : Boolean) return Integer is
begin
if ABE then
ABE_Proc;
else
Safe_Proc;
end if;
return 0;
end Call_Proc;
Elab_1 : constant Integer := Call_Proc (ABE => False);
Elab_2 : constant Integer := Call_Proc (ABE => True);
procedure ABE_Proc is
begin
Put_Line ("ABE");
end ABE_Proc;
end Pack;
-- main.adb
with Pack;
procedure Main is begin null; end Main;
----------------------------
-- Compilation and output --
----------------------------
$ gnatmake -f -q -gnatE main.adb
$ ./main
$ gnatmake -f -q -gnatE main.adb -gnatDG -gnatwL
$ grep -c "safeE" pack.adb.dg
pack.adb:14:10: warning: cannot call "ABE_Proc" before body seen
pack.adb:14:10: warning: Program_Error may be raised at run time
pack.adb:14:10: warning: body of unit "Pack" elaborated
pack.adb:14:10: warning: function "Call_Proc" called at line 22
pack.adb:14:10: warning: procedure "ABE_Proc" called at line 14
pack.adb:14:10: warning: cannot call "ABE_Proc" before body seen
pack.adb:14:10: warning: Program_Error may be raised at run time
pack.adb:14:10: warning: body of unit "Pack" elaborated
pack.adb:14:10: warning: function "Call_Proc" called at line 23
pack.adb:14:10: warning: procedure "ABE_Proc" called at line 14
safe
raised PROGRAM_ERROR : pack.adb:14 access before elaboration
0
2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* ali.adb: Add with and use clauses for GNAT,
GNAT.Dynamic_HTables, and Snames. Add a map from invocation
signature records to invocation signature ids. Add various
encodings of invocation-related attributes. Sort and update
table Known_ALI_Lines.
(Add_Invocation_Construct, Add_Invocation_Relation,
Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
routines.
(Initialize_ALI): Sort the initialization sequence. Add
initialization for all invocation-related tables.
(Invocation_Construct_Kind_To_Code,
Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
Invocation_Signature_Of, Present): New routines.
(Scan_ALI): Add the default values for invocation-related ids.
Scan invocation graph lines.
(Scan_Invocation_Graph_Line): New routine.
* ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
for invocation constructs, relations, and signatures. Add
tables for invocation constructs, relations, and signatures.
Update Unit_Record to capture invocation-related ids. Relocate
table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
from Binde.
(Add_Invocation_Construct, Add_Invocation_Relation,
Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
Code_To_Invocation_Graph_Line_Kind,
Invocation_Construct_Kind_To_Code,
Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
Invocation_Signature_Of, Present): New routines.
* binde.adb: Add with and use clause for Types. Add use clause
for ALI.Unit_Id_Tables;
* binde.ads: Relocate table Unit_Id_Tables and subtypes
Unit_Id_Table, Unit_Id_Array to ALI.
* bindgen.adb: Remove with and use clause for ALI.
* bindgen.ads: Remove with and use clause for Binde. Add with
and use clause for ALI.
* bindo.adb, bindo.ads, bindo-augmentors.adb,
bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
bindo-diagnostics.adb, bindo-diagnostics.ads,
bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
bindo-writers.ads: New units.
* debug.adb: Use and describe GNAT debug switches -gnatd_F and
-gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
-d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
* exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
Sem_Util.
* gnatbind.adb: Add with and use clause for Bindo. Use the new
Bindo elaboration order only when -d_N is in effect.
* lib-writ.adb
(Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
Scope, Signature, Target): New routines.
(Write_ALI): Output all invocation-related data.
(Write_Invocation_Graph): New routine.
* lib-writ.ads: Document the invocation graph ALI line.
* namet.adb, namet.ads (Present): New routines.
* sem_ch8.adb (Find_Direct_Name): Capture the status of
elaboration checks and warnings of an identifier.
(Find_Expanded_Name): Capture the status of elaboration checks
and warnings of an expanded name.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
that invocation graph-related data within the body of the main
unit is encoded in the ALI file.
(Analyze_Generic_Subprogram_Declaration): Ensure that invocation
graph-related data within the body of the main unit is encoded
in the ALI file.
(Analyze_Package_Instantiation): Perform minimal decoration of
the instance entity.
(Analyze_Subprogram_Instantiation): Perform minimal decoration
of the instance entity.
* sem_elab.adb: Perform heavy refactoring of all code. The unit
is now split into "services" which specialize in one area of ABE
checks. Add processing in order to capture invocation-graph
related attributes of the main unit, and encode them in the ALI
file. The Processing phase can now operate in multiple modes,
all described by type Processing_Kind. Scenarios and targets
are now distinct at the higher level, and carry their own
representations. This eliminates the need to constantly
recompute their attributes, and offers the various processors a
uniform interface. The various initial states of the Processing
phase are now encoded using type Processing_In_State, and
xxx_State constants.
* sem_elab.ads: Update the literals of type
Enclosing_Level_Kind. Add Inline pragmas on several routines.
* sem_prag.adb (Process_Inline): Ensure that invocation
graph-related data within the body of the main unit is encoded
in the ALI file.
* sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
Code clean up.
(Exceptions_OK): Relocated from Sem_Util.
(Mark_Save_Invocation_Graph_Of_Body): New routine.
* sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
(Mark_Save_Invocation_Graph_Of_Body): New routine.
* sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
N_Variable_Reference_Marker.
(Is_Elaboration_Warnings_OK_Node): Now applicable to
N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
(Is_Read): Use Flag4.
(Is_SPARK_Mode_On_Node): New applicable to
N_Variable_Reference_Marker.
(Is_Write): Use Flag5.
(Save_Invocation_Graph_Of_Body): New routine.
(Set_Is_Elaboration_Checks_OK_Node): Now applicable to
N_Variable_Reference_Marker.
(Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
(Set_Is_SPARK_Mode_On_Node): New applicable to
N_Variable_Reference_Marker.
(Set_Save_Invocation_Graph_Of_Body): New routine.
* sinfo.ads: Update the documentation of attributes
Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
Is_SPARK_Mode_On_Node. Update the flag usage of attributes
Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
and update its occurrence in nodes.
(Save_Invocation_Graph_Of_Body): New routine along with pragma
Inline.
(Set_Save_Invocation_Graph_Of_Body): New routine along with
pragma Inline.
* switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
debug switches.
(Scan_Debug_Switches): New routine.
* libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
* libgnat/g-graphs.adb (Associate_Vertices): Update the use of
Component_Vertex_Iterator.
(Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
Reimplemented.
(Iterate_Component_Vertices): New routine.
(Iterate_Vertices): Removed.
(Next): Update the parameter profile.
(Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
routines.
* libgnat/g-graphs.ads: Update the initialization of
No_Component. Add type Component_Vertex_Iterator. Remove type
Vertex_Iterator.
(Has_Next): Add new versions and remove old ones.
(Iterate_Component_Vertices): New routine.
(Iterate_Vertices): Removed.
(Next): Add new versions and remove old ones.
(Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
routines.
* libgnat/g-sets.adb (Contains): Reimplemented.
* gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
* rtsfind.ads: Remove extra space.
From-SVN: r272976
|
|
2019-07-01 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
componant -> component.
From-SVN: r272864
|
|
------------
-- Source --
------------
-- operations.adb
with Ada.Text_IO; use Ada.Text_IO;
with GNAT; use GNAT;
with GNAT.Graphs; use GNAT.Graphs;
with GNAT.Sets; use GNAT.Sets;
procedure Operations is
type Vertex_Id is
(No_V, VA, VB, VC, VD, VE, VF, VG, VH, VX, VY, VZ);
No_Vertex_Id : constant Vertex_Id := No_V;
function Hash_Vertex (V : Vertex_Id) return Bucket_Range_Type;
type Edge_Id is
(No_E, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E97, E98, E99);
No_Edge_Id : constant Edge_Id := No_E;
function Hash_Edge (E : Edge_Id) return Bucket_Range_Type;
package ES is new Membership_Sets
(Element_Type => Edge_Id,
"=" => "=",
Hash => Hash_Edge);
package DG is new Directed_Graphs
(Vertex_Id => Vertex_Id,
No_Vertex => No_Vertex_Id,
Hash_Vertex => Hash_Vertex,
Same_Vertex => "=",
Edge_Id => Edge_Id,
No_Edge => No_Edge_Id,
Hash_Edge => Hash_Edge,
Same_Edge => "=");
use DG;
package VS is new Membership_Sets
(Element_Type => Vertex_Id,
"=" => "=",
Hash => Hash_Vertex);
-----------------------
-- Local subprograms --
-----------------------
procedure Check_Belongs_To_Component
(R : String;
G : Directed_Graph;
V : Vertex_Id;
Exp_Comp : Component_Id);
-- Verify that vertex V of graph G belongs to component Exp_Comp. R is the
-- calling routine.
procedure Check_Belongs_To_Some_Component
(R : String;
G : Directed_Graph;
V : Vertex_Id);
-- Verify that vertex V of graph G belongs to some component. R is the
-- calling routine.
procedure Check_Destination_Vertex
(R : String;
G : Directed_Graph;
E : Edge_Id;
Exp_V : Vertex_Id);
-- Vertify that the destination vertex of edge E of grah G is Exp_V. R is
-- the calling routine.
procedure Check_Distinct_Components
(R : String;
Comp_1 : Component_Id;
Comp_2 : Component_Id);
-- Verify that components Comp_1 and Comp_2 are distinct (not the same)
procedure Check_Has_Component
(R : String;
G : Directed_Graph;
G_Name : String;
Comp : Component_Id);
-- Verify that graph G with name G_Name contains component Comp. R is the
-- calling routine.
procedure Check_Has_Edge
(R : String;
G : Directed_Graph;
E : Edge_Id);
-- Verify that graph G contains edge E. R is the calling routine.
procedure Check_Has_Vertex
(R : String;
G : Directed_Graph;
V : Vertex_Id);
-- Verify that graph G contains vertex V. R is the calling routine.
procedure Check_No_Component
(R : String;
G : Directed_Graph;
V : Vertex_Id);
-- Verify that vertex V does not belong to some component. R is the calling
-- routine.
procedure Check_No_Component
(R : String;
G : Directed_Graph;
G_Name : String;
Comp : Component_Id);
-- Verify that graph G with name G_Name does not contain component Comp. R
-- is the calling routine.
procedure Check_No_Edge
(R : String;
G : Directed_Graph;
E : Edge_Id);
-- Verify that graph G does not contain edge E. R is the calling routine.
procedure Check_No_Vertex
(R : String;
G : Directed_Graph;
V : Vertex_Id);
-- Verify that graph G does not contain vertex V. R is the calling routine.
procedure Check_Number_Of_Components
(R : String;
G : Directed_Graph;
Exp_Num : Natural);
-- Verify that graph G has exactly Exp_Num components. R is the calling
-- routine.
procedure Check_Number_Of_Edges
(R : String;
G : Directed_Graph;
Exp_Num : Natural);
-- Verify that graph G has exactly Exp_Num edges. R is the calling routine.
procedure Check_Number_Of_Vertices
(R : String;
G : Directed_Graph;
Exp_Num : Natural);
-- Verify that graph G has exactly Exp_Num vertices. R is the calling
-- routine.
procedure Check_Outgoing_Edge_Iterator
(R : String;
G : Directed_Graph;
V : Vertex_Id;
Set : ES.Membership_Set);
-- Verify that all outgoing edges of vertex V of graph G can be iterated
-- and appear in set Set. R is the calling routine.
procedure Check_Source_Vertex
(R : String;
G : Directed_Graph;
E : Edge_Id;
Exp_V : Vertex_Id);
-- Vertify that the source vertex of edge E of grah G is Exp_V. R is the
-- calling routine.
procedure Check_Vertex_Iterator
(R : String;
G : Directed_Graph;
Comp : Component_Id;
Set : VS.Membership_Set);
-- Verify that all vertices of component Comp of graph G can be iterated
-- and appear in set Set. R is the calling routine.
function Create_And_Populate return Directed_Graph;
-- Create a brand new graph (see body for the shape of the graph)
procedure Error (R : String; Msg : String);
-- Output an error message with text Msg within the context of routine R
procedure Test_Add_Edge;
-- Verify the semantics of routine Add_Edge
procedure Test_Add_Vertex;
-- Verify the semantics of routine Add_Vertex
procedure Test_All_Edge_Iterator;
-- Verify the semantics of All_Edge_Iterator
procedure Test_All_Vertex_Iterator;
-- Verify the semantics of All_Vertex_Iterator
procedure Test_Component;
-- Verify the semantics of routine Component
procedure Test_Component_Iterator;
-- Verify the semantics of Component_Iterator
procedure Test_Contains_Component;
-- Verify the semantics of routine Contains_Component
procedure Test_Contains_Edge;
-- Verify the semantics of routine Contains_Edge
procedure Test_Contains_Vertex;
-- Verify the semantics of routine Contains_Vertex
procedure Test_Delete_Edge;
-- Verify the semantics of routine Delete_Edge
procedure Test_Destination_Vertex;
-- Verify the semantics of routine Destination_Vertex
procedure Test_Find_Components;
-- Verify the semantics of routine Find_Components
procedure Test_Is_Empty;
-- Verify the semantics of routine Is_Empty
procedure Test_Number_Of_Components;
-- Verify the semantics of routine Number_Of_Components
procedure Test_Number_Of_Edges;
-- Verify the semantics of routine Number_Of_Edges
procedure Test_Number_Of_Vertices;
-- Verify the semantics of routine Number_Of_Vertices
procedure Test_Outgoing_Edge_Iterator;
-- Verify the semantics of Outgoing_Edge_Iterator
procedure Test_Present;
-- Verify the semantics of routine Present
procedure Test_Source_Vertex;
-- Verify the semantics of routine Source_Vertex
procedure Test_Vertex_Iterator;
-- Verify the semantics of Vertex_Iterator;
procedure Unexpected_Exception (R : String);
-- Output an error message concerning an unexpected exception within
-- routine R.
--------------------------------
-- Check_Belongs_To_Component --
--------------------------------
procedure Check_Belongs_To_Component
(R : String;
G : Directed_Graph;
V : Vertex_Id;
Exp_Comp : Component_Id)
is
Act_Comp : constant Component_Id := Component (G, V);
begin
if Act_Comp /= Exp_Comp then
Error (R, "inconsistent component for vertex " & V'Img);
Error (R, " expected: " & Exp_Comp'Img);
Error (R, " got : " & Act_Comp'Img);
end if;
end Check_Belongs_To_Component;
-------------------------------------
-- Check_Belongs_To_Some_Component --
-------------------------------------
procedure Check_Belongs_To_Some_Component
(R : String;
G : Directed_Graph;
V : Vertex_Id)
is
begin
if not Present (Component (G, V)) then
Error (R, "vertex " & V'Img & " does not belong to a component");
end if;
end Check_Belongs_To_Some_Component;
------------------------------
-- Check_Destination_Vertex --
------------------------------
procedure Check_Destination_Vertex
(R : String;
G : Directed_Graph;
E : Edge_Id;
Exp_V : Vertex_Id)
is
Act_V : constant Vertex_Id := Destination_Vertex (G, E);
begin
if Act_V /= Exp_V then
Error (R, "inconsistent destination vertex for edge " & E'Img);
Error (R, " expected: " & Exp_V'Img);
Error (R, " got : " & Act_V'Img);
end if;
end Check_Destination_Vertex;
-------------------------------
-- Check_Distinct_Components --
-------------------------------
procedure Check_Distinct_Components
(R : String;
Comp_1 : Component_Id;
Comp_2 : Component_Id)
is
begin
if Comp_1 = Comp_2 then
Error (R, "components are not distinct");
end if;
end Check_Distinct_Components;
-------------------------
-- Check_Has_Component --
-------------------------
procedure Check_Has_Component
(R : String;
G : Directed_Graph;
G_Name : String;
Comp : Component_Id)
is
begin
if not Contains_Component (G, Comp) then
Error (R, "graph " & G_Name & " lacks component");
end if;
end Check_Has_Component;
--------------------
-- Check_Has_Edge --
--------------------
procedure Check_Has_Edge
(R : String;
G : Directed_Graph;
E : Edge_Id)
is
begin
if not Contains_Edge (G, E) then
Error (R, "graph lacks edge " & E'Img);
end if;
end Check_Has_Edge;
----------------------
-- Check_Has_Vertex --
----------------------
procedure Check_Has_Vertex
(R : String;
G : Directed_Graph;
V : Vertex_Id)
is
begin
if not Contains_Vertex (G, V) then
Error (R, "graph lacks vertex " & V'Img);
end if;
end Check_Has_Vertex;
------------------------
-- Check_No_Component --
------------------------
procedure Check_No_Component
(R : String;
G : Directed_Graph;
V : Vertex_Id)
is
begin
if Present (Component (G, V)) then
Error (R, "vertex " & V'Img & " belongs to a component");
end if;
end Check_No_Component;
procedure Check_No_Component
(R : String;
G : Directed_Graph;
G_Name : String;
Comp : Component_Id)
is
begin
if Contains_Component (G, Comp) then
Error (R, "graph " & G_Name & " contains component");
end if;
end Check_No_Component;
-------------------
-- Check_No_Edge --
-------------------
procedure Check_No_Edge
(R : String;
G : Directed_Graph;
E : Edge_Id)
is
begin
if Contains_Edge (G, E) then
Error (R, "graph contains edge " & E'Img);
end if;
end Check_No_Edge;
---------------------
-- Check_No_Vertex --
---------------------
procedure Check_No_Vertex
(R : String;
G : Directed_Graph;
V : Vertex_Id)
is
begin
if Contains_Vertex (G, V) then
Error (R, "graph contains vertex " & V'Img);
end if;
end Check_No_Vertex;
--------------------------------
-- Check_Number_Of_Components --
--------------------------------
procedure Check_Number_Of_Components
(R : String;
G : Directed_Graph;
Exp_Num : Natural)
is
Act_Num : constant Natural := Number_Of_Components (G);
begin
if Act_Num /= Exp_Num then
Error (R, "inconsistent number of components");
Error (R, " expected: " & Exp_Num'Img);
Error (R, " got : " & Act_Num'Img);
end if;
end Check_Number_Of_Components;
---------------------------
-- Check_Number_Of_Edges --
---------------------------
procedure Check_Number_Of_Edges
(R : String;
G : Directed_Graph;
Exp_Num : Natural)
is
Act_Num : constant Natural := Number_Of_Edges (G);
begin
if Act_Num /= Exp_Num then
Error (R, "inconsistent number of edges");
Error (R, " expected: " & Exp_Num'Img);
Error (R, " got : " & Act_Num'Img);
end if;
end Check_Number_Of_Edges;
------------------------------
-- Check_Number_Of_Vertices --
------------------------------
procedure Check_Number_Of_Vertices
(R : String;
G : Directed_Graph;
Exp_Num : Natural)
is
Act_Num : constant Natural := Number_Of_Vertices (G);
begin
if Act_Num /= Exp_Num then
Error (R, "inconsistent number of vertices");
Error (R, " expected: " & Exp_Num'Img);
Error (R, " got : " & Act_Num'Img);
end if;
end Check_Number_Of_Vertices;
----------------------------------
-- Check_Outgoing_Edge_Iterator --
----------------------------------
procedure Check_Outgoing_Edge_Iterator
(R : String;
G : Directed_Graph;
V : Vertex_Id;
Set : ES.Membership_Set)
is
E : Edge_Id;
Out_E_Iter : Outgoing_Edge_Iterator;
begin
-- Iterate over all outgoing edges of vertex V while removing edges seen
-- from the set.
Out_E_Iter := Iterate_Outgoing_Edges (G, V);
while Has_Next (Out_E_Iter) loop
Next (Out_E_Iter, E);
if ES.Contains (Set, E) then
ES.Delete (Set, E);
else
Error (R, "outgoing edge " & E'Img & " is not iterated");
end if;
end loop;
-- At this point the set of edges should be empty
if not ES.Is_Empty (Set) then
Error (R, "not all outgoing edges were iterated");
end if;
end Check_Outgoing_Edge_Iterator;
-------------------------
-- Check_Source_Vertex --
-------------------------
procedure Check_Source_Vertex
(R : String;
G : Directed_Graph;
E : Edge_Id;
Exp_V : Vertex_Id)
is
Act_V : constant Vertex_Id := Source_Vertex (G, E);
begin
if Act_V /= Exp_V then
Error (R, "inconsistent source vertex");
Error (R, " expected: " & Exp_V'Img);
Error (R, " got : " & Act_V'Img);
end if;
end Check_Source_Vertex;
---------------------------
-- Check_Vertex_Iterator --
---------------------------
procedure Check_Vertex_Iterator
(R : String;
G : Directed_Graph;
Comp : Component_Id;
Set : VS.Membership_Set)
is
V : Vertex_Id;
V_Iter : Vertex_Iterator;
begin
-- Iterate over all vertices of component Comp while removing vertices
-- seen from the set.
V_Iter := Iterate_Vertices (G, Comp);
while Has_Next (V_Iter) loop
Next (V_Iter, V);
if VS.Contains (Set, V) then
VS.Delete (Set, V);
else
Error (R, "vertex " & V'Img & " is not iterated");
end if;
end loop;
-- At this point the set of vertices should be empty
if not VS.Is_Empty (Set) then
Error (R, "not all vertices were iterated");
end if;
end Check_Vertex_Iterator;
-------------------------
-- Create_And_Populate --
-------------------------
function Create_And_Populate return Directed_Graph is
G : constant Directed_Graph :=
Create (Initial_Vertices => Vertex_Id'Size,
Initial_Edges => Edge_Id'Size);
begin
-- 9 8 1 2
-- G <------ F <------ A ------> B -------> C
-- | ^ | | ^ ^
-- +------------------+ | +-------------------+
-- 10 | | 3
-- 4 | 5 |
-- v |
-- H D ---------+
-- | ^
-- | |
-- 6 | | 7
-- | |
-- v |
-- E
--
-- Components:
--
-- [A, F, G]
-- [B]
-- [C]
-- [D, E]
-- [H]
Add_Vertex (G, VA);
Add_Vertex (G, VB);
Add_Vertex (G, VC);
Add_Vertex (G, VD);
Add_Vertex (G, VE);
Add_Vertex (G, VF);
Add_Vertex (G, VG);
Add_Vertex (G, VH);
Add_Edge (G, E1, Source => VA, Destination => VB);
Add_Edge (G, E2, Source => VB, Destination => VC);
Add_Edge (G, E3, Source => VA, Destination => VC);
Add_Edge (G, E4, Source => VA, Destination => VD);
Add_Edge (G, E5, Source => VD, Destination => VB);
Add_Edge (G, E6, Source => VD, Destination => VE);
Add_Edge (G, E7, Source => VE, Destination => VD);
Add_Edge (G, E8, Source => VA, Destination => VF);
Add_Edge (G, E9, Source => VF, Destination => VG);
Add_Edge (G, E10, Source => VG, Destination => VA);
return G;
end Create_And_Populate;
-----------
-- Error --
-----------
procedure Error (R : String; Msg : String) is
begin
Put_Line ("ERROR: " & R & ": " & Msg);
end Error;
---------------
-- Hash_Edge --
---------------
function Hash_Edge (E : Edge_Id) return Bucket_Range_Type is
begin
return Bucket_Range_Type (Edge_Id'Pos (E));
end Hash_Edge;
-----------------
-- Hash_Vertex --
-----------------
function Hash_Vertex (V : Vertex_Id) return Bucket_Range_Type is
begin
return Bucket_Range_Type (Vertex_Id'Pos (V));
end Hash_Vertex;
-------------------
-- Test_Add_Edge --
-------------------
procedure Test_Add_Edge is
R : constant String := "Test_Add_Edge";
E : Edge_Id;
G : Directed_Graph := Create_And_Populate;
All_E_Iter : All_Edge_Iterator;
Out_E_Iter : Outgoing_Edge_Iterator;
begin
-- Try to add the same edge twice
begin
Add_Edge (G, E1, VB, VH);
Error (R, "duplicate edge not detected");
exception
when Duplicate_Edge => null;
when others => Unexpected_Exception (R);
end;
-- Try to add an edge with a bogus source
begin
Add_Edge (G, E97, Source => VX, Destination => VC);
Error (R, "missing vertex not detected");
exception
when Missing_Vertex => null;
when others => Unexpected_Exception (R);
end;
-- Try to add an edge with a bogus destination
begin
Add_Edge (G, E97, Source => VF, Destination => VY);
Error (R, "missing vertex not detected");
exception
when Missing_Vertex => null;
when others => Unexpected_Exception (R);
end;
-- Delete edge E1 between vertices VA and VB
begin
Delete_Edge (G, E1);
exception
when others => Unexpected_Exception (R);
end;
-- Try to re-add edge E1
begin
Add_Edge (G, E1, Source => VA, Destination => VB);
exception
when others => Unexpected_Exception (R);
end;
-- Lock all edges in the graph
All_E_Iter := Iterate_All_Edges (G);
-- Try to add an edge given that all edges are locked
begin
Add_Edge (G, E97, Source => VG, Destination => VH);
Error (R, "all edges not locked");
exception
when Iterated => null;
when others => Unexpected_Exception (R);
end;
-- Unlock all edges by iterating over them
while Has_Next (All_E_Iter) loop Next (All_E_Iter, E); end loop;
-- Lock all outgoing edges of vertex VD
Out_E_Iter := Iterate_Outgoing_Edges (G, VD);
-- Try to add an edge with source VD given that all edges of VD are
-- locked.
begin
Add_Edge (G, E97, Source => VD, Destination => VG);
Error (R, "outgoing edges of VD not locked");
exception
when Iterated => null;
when others => Unexpected_Exception (R);
end;
-- Unlock the edges of vertex VD by iterating over them
while Has_Next (Out_E_Iter) loop Next (Out_E_Iter, E); end loop;
Destroy (G);
end Test_Add_Edge;
---------------------
-- Test_Add_Vertex --
---------------------
procedure Test_Add_Vertex is
R : constant String := "Test_Add_Vertex";
G : Directed_Graph := Create_And_Populate;
V : Vertex_Id;
All_V_Iter : All_Vertex_Iterator;
begin
-- Try to add the same vertex twice
begin
Add_Vertex (G, VD);
Error (R, "duplicate vertex not detected");
exception
when Duplicate_Vertex => null;
when others => Unexpected_Exception (R);
end;
-- Lock all vertices in the graph
All_V_Iter := Iterate_All_Vertices (G);
-- Try to add a vertex given that all vertices are locked
begin
Add_Vertex (G, VZ);
Error (R, "all vertices not locked");
exception
when Iterated => null;
when others => Unexpected_Exception (R);
end;
-- Unlock all vertices by iterating over them
while Has_Next (All_V_Iter) loop Next (All_V_Iter, V); end loop;
Destroy (G);
end Test_Add_Vertex;
----------------------------
-- Test_All_Edge_Iterator --
----------------------------
procedure Test_All_Edge_Iterator is
R : constant String := "Test_All_Edge_Iterator";
E : Edge_Id;
G : Directed_Graph := Create_And_Populate;
All_E_Iter : All_Edge_Iterator;
All_Edges : ES.Membership_Set;
begin
-- Collect all expected edges in a set
All_Edges := ES.Create (Number_Of_Edges (G));
for Curr_E in E1 .. E10 loop
ES.Insert (All_Edges, Curr_E);
end loop;
-- Iterate over all edges while removing encountered edges from the set
All_E_Iter := Iterate_All_Edges (G);
while Has_Next (All_E_Iter) loop
Next (All_E_Iter, E);
if ES.Contains (All_Edges, E) then
ES.Delete (All_Edges, E);
else
Error (R, "edge " & E'Img & " is not iterated");
end if;
end loop;
-- At this point the set of edges should be empty
if not ES.Is_Empty (All_Edges) then
Error (R, "not all edges were iterated");
end if;
ES.Destroy (All_Edges);
Destroy (G);
end Test_All_Edge_Iterator;
------------------------------
-- Test_All_Vertex_Iterator --
------------------------------
procedure Test_All_Vertex_Iterator is
R : constant String := "Test_All_Vertex_Iterator";
G : Directed_Graph := Create_And_Populate;
V : Vertex_Id;
All_V_Iter : All_Vertex_Iterator;
All_Vertices : VS.Membership_Set;
begin
-- Collect all expected vertices in a set
All_Vertices := VS.Create (Number_Of_Vertices (G));
for Curr_V in VA .. VH loop
VS.Insert (All_Vertices, Curr_V);
end loop;
-- Iterate over all vertices while removing encountered vertices from
-- the set.
All_V_Iter := Iterate_All_Vertices (G);
while Has_Next (All_V_Iter) loop
Next (All_V_Iter, V);
if VS.Contains (All_Vertices, V) then
VS.Delete (All_Vertices, V);
else
Error (R, "vertex " & V'Img & " is not iterated");
end if;
end loop;
-- At this point the set of vertices should be empty
if not VS.Is_Empty (All_Vertices) then
Error (R, "not all vertices were iterated");
end if;
VS.Destroy (All_Vertices);
Destroy (G);
end Test_All_Vertex_Iterator;
--------------------
-- Test_Component --
--------------------
procedure Test_Component is
R : constant String := "Test_Component";
G : Directed_Graph := Create (Initial_Vertices => 3, Initial_Edges => 2);
begin
-- E1
-- ----->
-- VA VB VC
-- <-----
-- E2
--
-- Components:
--
-- [VA, VB]
-- [VC]
Add_Vertex (G, VA);
Add_Vertex (G, VB);
Add_Vertex (G, VC);
Add_Edge (G, E1, Source => VA, Destination => VB);
Add_Edge (G, E2, Source => VB, Destination => VA);
-- None of the vertices should belong to a component
Check_No_Component (R, G, VA);
Check_No_Component (R, G, VB);
Check_No_Component (R, G, VC);
-- Find the strongly connected components in the graph
Find_Components (G);
-- Vertices should belong to a component
Check_Belongs_To_Some_Component (R, G, VA);
Check_Belongs_To_Some_Component (R, G, VB);
Check_Belongs_To_Some_Component (R, G, VC);
Destroy (G);
end Test_Component;
-----------------------------
-- Test_Component_Iterator --
-----------------------------
procedure Test_Component_Iterator is
R : constant String := "Test_Component_Iterator";
G : Directed_Graph := Create_And_Populate;
Comp : Component_Id;
Comp_Count : Natural;
Comp_Iter : Component_Iterator;
begin
Find_Components (G);
Check_Number_Of_Components (R, G, 5);
Comp_Count := Number_Of_Components (G);
-- Iterate over all components while decrementing their number
Comp_Iter := Iterate_Components (G);
while Has_Next (Comp_Iter) loop
Next (Comp_Iter, Comp);
Comp_Count := Comp_Count - 1;
end loop;
-- At this point all components should have been accounted for
if Comp_Count /= 0 then
Error (R, "not all components were iterated");
end if;
Destroy (G);
end Test_Component_Iterator;
-----------------------------
-- Test_Contains_Component --
-----------------------------
procedure Test_Contains_Component is
R : constant String := "Test_Contains_Component";
G1 : Directed_Graph :=
Create (Initial_Vertices => 2, Initial_Edges => 2);
G2 : Directed_Graph :=
Create (Initial_Vertices => 2, Initial_Edges => 2);
begin
-- E1
-- ----->
-- VA VB
-- <-----
-- E2
--
-- Components:
--
-- [VA, VB]
Add_Vertex (G1, VA);
Add_Vertex (G1, VB);
Add_Edge (G1, E1, Source => VA, Destination => VB);
Add_Edge (G1, E2, Source => VB, Destination => VA);
-- E97
-- ----->
-- VX VY
-- <-----
-- E98
--
-- Components:
--
-- [VX, VY]
Add_Vertex (G2, VX);
Add_Vertex (G2, VY);
Add_Edge (G2, E97, Source => VX, Destination => VY);
Add_Edge (G2, E98, Source => VY, Destination => VX);
-- Find the strongly connected components in both graphs
Find_Components (G1);
Find_Components (G2);
-- Vertices should belong to a component
Check_Belongs_To_Some_Component (R, G1, VA);
Check_Belongs_To_Some_Component (R, G1, VB);
Check_Belongs_To_Some_Component (R, G2, VX);
Check_Belongs_To_Some_Component (R, G2, VY);
-- Verify that each graph contains the correct component
Check_Has_Component (R, G1, "G1", Component (G1, VA));
Check_Has_Component (R, G1, "G1", Component (G1, VB));
Check_Has_Component (R, G2, "G2", Component (G2, VX));
Check_Has_Component (R, G2, "G2", Component (G2, VY));
-- Verify that each graph does not contain components from the other
-- graph.
Check_No_Component (R, G1, "G1", Component (G2, VX));
Check_No_Component (R, G1, "G1", Component (G2, VY));
Check_No_Component (R, G2, "G2", Component (G1, VA));
Check_No_Component (R, G2, "G2", Component (G1, VB));
Destroy (G1);
Destroy (G2);
end Test_Contains_Component;
------------------------
-- Test_Contains_Edge --
------------------------
procedure Test_Contains_Edge is
R : constant String := "Test_Contains_Edge";
G : Directed_Graph := Create_And_Populate;
begin
-- Verify that all edges in the range E1 .. E10 exist
for Curr_E in E1 .. E10 loop
Check_Has_Edge (R, G, Curr_E);
end loop;
-- Verify that no extra edges are present
for Curr_E in E97 .. E99 loop
Check_No_Edge (R, G, Curr_E);
end loop;
-- Add new edges E97, E98, and E99
Add_Edge (G, E97, Source => VG, Destination => VF);
Add_Edge (G, E98, Source => VH, Destination => VE);
Add_Edge (G, E99, Source => VD, Destination => VC);
-- Verify that all edges in the range E1 .. E99 exist
for Curr_E in E1 .. E99 loop
Check_Has_Edge (R, G, Curr_E);
end loop;
-- Delete each edge that corresponds to an even position in Edge_Id
for Curr_E in E1 .. E99 loop
if Edge_Id'Pos (Curr_E) mod 2 = 0 then
Delete_Edge (G, Curr_E);
end if;
end loop;
-- Verify that all "even" edges are missing, and all "odd" edges are
-- present.
for Curr_E in E1 .. E99 loop
if Edge_Id'Pos (Curr_E) mod 2 = 0 then
Check_No_Edge (R, G, Curr_E);
else
Check_Has_Edge (R, G, Curr_E);
end if;
end loop;
Destroy (G);
end Test_Contains_Edge;
--------------------------
-- Test_Contains_Vertex --
--------------------------
procedure Test_Contains_Vertex is
R : constant String := "Test_Contains_Vertex";
G : Directed_Graph := Create_And_Populate;
begin
-- Verify that all vertices in the range VA .. VH exist
for Curr_V in VA .. VH loop
Check_Has_Vertex (R, G, Curr_V);
end loop;
-- Verify that no extra vertices are present
for Curr_V in VX .. VZ loop
Check_No_Vertex (R, G, Curr_V);
end loop;
-- Add new vertices VX, VY, and VZ
Add_Vertex (G, VX);
Add_Vertex (G, VY);
Add_Vertex (G, VZ);
-- Verify that all vertices in the range VA .. VZ exist
for Curr_V in VA .. VZ loop
Check_Has_Vertex (R, G, Curr_V);
end loop;
Destroy (G);
end Test_Contains_Vertex;
----------------------
-- Test_Delete_Edge --
----------------------
procedure Test_Delete_Edge is
R : constant String := "Test_Delete_Edge";
E : Edge_Id;
G : Directed_Graph := Create_And_Populate;
V : Vertex_Id;
All_E_Iter : All_Edge_Iterator;
All_V_Iter : All_Vertex_Iterator;
Out_E_Iter : Outgoing_Edge_Iterator;
begin
-- Try to delete a bogus edge
begin
Delete_Edge (G, E97);
Error (R, "missing vertex deleted");
exception
when Missing_Edge => null;
when others => Unexpected_Exception (R);
end;
-- Delete edge E1 between vertices VA and VB
begin
Delete_Edge (G, E1);
exception
when others => Unexpected_Exception (R);
end;
-- Verify that edge E1 is gone from all edges in the graph
All_E_Iter := Iterate_All_Edges (G);
while Has_Next (All_E_Iter) loop
Next (All_E_Iter, E);
if E = E1 then
Error (R, "edge " & E'Img & " not removed from all edges");
end if;
end loop;
-- Verify that edge E1 is gone from the outgoing edges of vertex VA
Out_E_Iter := Iterate_Outgoing_Edges (G, VA);
while Has_Next (Out_E_Iter) loop
Next (Out_E_Iter, E);
if E = E1 then
Error
(R, "edge " & E'Img & "not removed from outgoing edges of VA");
end if;
end loop;
-- Delete all edges in the range E2 .. E10
for Curr_E in E2 .. E10 loop
Delete_Edge (G, Curr_E);
end loop;
-- Verify that all edges are gone from the graph
All_E_Iter := Iterate_All_Edges (G);
while Has_Next (All_E_Iter) loop
Next (All_E_Iter, E);
Error (R, "edge " & E'Img & " not removed from all edges");
end loop;
-- Verify that all edges are gone from the respective source vertices
All_V_Iter := Iterate_All_Vertices (G);
while Has_Next (All_V_Iter) loop
Next (All_V_Iter, V);
Out_E_Iter := Iterate_Outgoing_Edges (G, V);
while Has_Next (Out_E_Iter) loop
Next (Out_E_Iter, E);
Error (R, "edge " & E'Img & " not removed from vertex " & V'Img);
end loop;
end loop;
Destroy (G);
end Test_Delete_Edge;
-----------------------------
-- Test_Destination_Vertex --
-----------------------------
procedure Test_Destination_Vertex is
R : constant String := "Test_Destination_Vertex";
G : Directed_Graph := Create_And_Populate;
begin
-- Verify the destination vertices of all edges in the graph
Check_Destination_Vertex (R, G, E1, VB);
Check_Destination_Vertex (R, G, E2, VC);
Check_Destination_Vertex (R, G, E3, VC);
Check_Destination_Vertex (R, G, E4, VD);
Check_Destination_Vertex (R, G, E5, VB);
Check_Destination_Vertex (R, G, E6, VE);
Check_Destination_Vertex (R, G, E7, VD);
Check_Destination_Vertex (R, G, E8, VF);
Check_Destination_Vertex (R, G, E9, VG);
Check_Destination_Vertex (R, G, E10, VA);
Destroy (G);
end Test_Destination_Vertex;
--------------------------
-- Test_Find_Components --
--------------------------
procedure Test_Find_Components is
R : constant String := "Test_Find_Components";
G : Directed_Graph := Create_And_Populate;
Comp_1 : Component_Id; -- [A, F, G]
Comp_2 : Component_Id; -- [B]
Comp_3 : Component_Id; -- [C]
Comp_4 : Component_Id; -- [D, E]
Comp_5 : Component_Id; -- [H]
begin
Find_Components (G);
-- Vertices should belong to a component
Check_Belongs_To_Some_Component (R, G, VA);
Check_Belongs_To_Some_Component (R, G, VB);
Check_Belongs_To_Some_Component (R, G, VC);
Check_Belongs_To_Some_Component (R, G, VD);
Check_Belongs_To_Some_Component (R, G, VH);
-- Extract the ids of the components from the first vertices in each
-- component.
Comp_1 := Component (G, VA);
Comp_2 := Component (G, VB);
Comp_3 := Component (G, VC);
Comp_4 := Component (G, VD);
Comp_5 := Component (G, VH);
-- Verify that the components are distinct
Check_Distinct_Components (R, Comp_1, Comp_2);
Check_Distinct_Components (R, Comp_1, Comp_3);
Check_Distinct_Components (R, Comp_1, Comp_4);
Check_Distinct_Components (R, Comp_1, Comp_5);
Check_Distinct_Components (R, Comp_2, Comp_3);
Check_Distinct_Components (R, Comp_2, Comp_4);
Check_Distinct_Components (R, Comp_2, Comp_5);
Check_Distinct_Components (R, Comp_3, Comp_4);
Check_Distinct_Components (R, Comp_3, Comp_5);
Check_Distinct_Components (R, Comp_4, Comp_5);
-- Verify that the remaining nodes belong to the proper component
Check_Belongs_To_Component (R, G, VF, Comp_1);
Check_Belongs_To_Component (R, G, VG, Comp_1);
Check_Belongs_To_Component (R, G, VE, Comp_4);
Destroy (G);
end Test_Find_Components;
-------------------
-- Test_Is_Empty --
-------------------
procedure Test_Is_Empty is
R : constant String := "Test_Is_Empty";
G : Directed_Graph := Create (Initial_Vertices => 3, Initial_Edges => 2);
begin
-- Verify that a graph without vertices and edges is empty
if not Is_Empty (G) then
Error (R, "graph is empty");
end if;
-- Add vertices
Add_Vertex (G, VA);
Add_Vertex (G, VB);
-- Verify that a graph with vertices and no edges is not empty
if Is_Empty (G) then
Error (R, "graph is not empty");
end if;
-- Add edges
Add_Edge (G, E1, Source => VA, Destination => VB);
-- Verify that a graph with vertices and edges is not empty
if Is_Empty (G) then
Error (R, "graph is not empty");
end if;
Destroy (G);
end Test_Is_Empty;
-------------------------------
-- Test_Number_Of_Components --
-------------------------------
procedure Test_Number_Of_Components is
R : constant String := "Test_Number_Of_Components";
G : Directed_Graph := Create (Initial_Vertices => 3, Initial_Edges => 2);
begin
-- Verify that an empty graph has exactly 0 components
Check_Number_Of_Components (R, G, 0);
-- E1
-- ----->
-- VA VB VC
-- <-----
-- E2
--
-- Components:
--
-- [VA, VB]
-- [VC]
Add_Vertex (G, VA);
Add_Vertex (G, VB);
Add_Vertex (G, VC);
Add_Edge (G, E1, Source => VA, Destination => VB);
Add_Edge (G, E2, Source => VB, Destination => VA);
-- Verify that the graph has exact 0 components even though it contains
-- vertices and edges.
Check_Number_Of_Components (R, G, 0);
Find_Components (G);
-- Verify that the graph has exactly 2 components
Check_Number_Of_Components (R, G, 2);
Destroy (G);
end Test_Number_Of_Components;
--------------------------
-- Test_Number_Of_Edges --
--------------------------
procedure Test_Number_Of_Edges is
R : constant String := "Test_Number_Of_Edges";
G : Directed_Graph := Create_And_Populate;
begin
-- Verify that the graph has exactly 10 edges
Check_Number_Of_Edges (R, G, 10);
-- Delete two edges
Delete_Edge (G, E1);
Delete_Edge (G, E2);
-- Verify that the graph has exactly 8 edges
Check_Number_Of_Edges (R, G, 8);
-- Delete the remaining edge
for Curr_E in E3 .. E10 loop
Delete_Edge (G, Curr_E);
end loop;
-- Verify that the graph has exactly 0 edges
Check_Number_Of_Edges (R, G, 0);
-- Add two edges
Add_Edge (G, E1, Source => VF, Destination => VA);
Add_Edge (G, E2, Source => VC, Destination => VH);
-- Verify that the graph has exactly 2 edges
Check_Number_Of_Edges (R, G, 2);
Destroy (G);
end Test_Number_Of_Edges;
-----------------------------
-- Test_Number_Of_Vertices --
-----------------------------
procedure Test_Number_Of_Vertices is
R : constant String := "Test_Number_Of_Vertices";
G : Directed_Graph :=
Create (Initial_Vertices => 4, Initial_Edges => 12);
begin
-- Verify that an empty graph has exactly 0 vertices
Check_Number_Of_Vertices (R, G, 0);
-- Add three vertices
Add_Vertex (G, VC);
Add_Vertex (G, VG);
Add_Vertex (G, VX);
-- Verify that the graph has exactly 3 vertices
Check_Number_Of_Vertices (R, G, 3);
-- Add one edge
Add_Edge (G, E8, Source => VX, Destination => VG);
-- Verify that the graph has exactly 3 vertices
Check_Number_Of_Vertices (R, G, 3);
Destroy (G);
end Test_Number_Of_Vertices;
---------------------------------
-- Test_Outgoing_Edge_Iterator --
---------------------------------
procedure Test_Outgoing_Edge_Iterator is
R : constant String := "Test_Outgoing_Edge_Iterator";
G : Directed_Graph := Create_And_Populate;
Set : ES.Membership_Set;
begin
Set := ES.Create (4);
ES.Insert (Set, E1);
ES.Insert (Set, E3);
ES.Insert (Set, E4);
ES.Insert (Set, E8);
Check_Outgoing_Edge_Iterator (R, G, VA, Set);
ES.Insert (Set, E2);
Check_Outgoing_Edge_Iterator (R, G, VB, Set);
Check_Outgoing_Edge_Iterator (R, G, VC, Set);
ES.Insert (Set, E5);
ES.Insert (Set, E6);
Check_Outgoing_Edge_Iterator (R, G, VD, Set);
ES.Insert (Set, E7);
Check_Outgoing_Edge_Iterator (R, G, VE, Set);
ES.Insert (Set, E9);
Check_Outgoing_Edge_Iterator (R, G, VF, Set);
ES.Insert (Set, E10);
Check_Outgoing_Edge_Iterator (R, G, VG, Set);
Check_Outgoing_Edge_Iterator (R, G, VH, Set);
ES.Destroy (Set);
Destroy (G);
end Test_Outgoing_Edge_Iterator;
------------------
-- Test_Present --
------------------
procedure Test_Present is
R : constant String := "Test_Present";
G : Directed_Graph := Nil;
begin
-- Verify that a non-existent graph is not present
if Present (G) then
Error (R, "graph is not present");
end if;
G := Create_And_Populate;
-- Verify that an existing graph is present
if not Present (G) then
Error (R, "graph is present");
end if;
Destroy (G);
-- Verify that a destroyed graph is not present
if Present (G) then
Error (R, "graph is not present");
end if;
end Test_Present;
------------------------
-- Test_Source_Vertex --
------------------------
procedure Test_Source_Vertex is
R : constant String := "Test_Source_Vertex";
G : Directed_Graph := Create_And_Populate;
begin
-- Verify the source vertices of all edges in the graph
Check_Source_Vertex (R, G, E1, VA);
Check_Source_Vertex (R, G, E2, VB);
Check_Source_Vertex (R, G, E3, VA);
Check_Source_Vertex (R, G, E4, VA);
Check_Source_Vertex (R, G, E5, VD);
Check_Source_Vertex (R, G, E6, VD);
Check_Source_Vertex (R, G, E7, VE);
Check_Source_Vertex (R, G, E8, VA);
Check_Source_Vertex (R, G, E9, VF);
Check_Source_Vertex (R, G, E10, VG);
Destroy (G);
end Test_Source_Vertex;
--------------------------
-- Test_Vertex_Iterator --
--------------------------
procedure Test_Vertex_Iterator is
R : constant String := "Test_Vertex_Iterator";
G : Directed_Graph := Create_And_Populate;
Set : VS.Membership_Set;
begin
Find_Components (G);
Set := VS.Create (3);
VS.Insert (Set, VA);
VS.Insert (Set, VF);
VS.Insert (Set, VG);
Check_Vertex_Iterator (R, G, Component (G, VA), Set);
VS.Insert (Set, VB);
Check_Vertex_Iterator (R, G, Component (G, VB), Set);
VS.Insert (Set, VC);
Check_Vertex_Iterator (R, G, Component (G, VC), Set);
VS.Insert (Set, VD);
VS.Insert (Set, VE);
Check_Vertex_Iterator (R, G, Component (G, VD), Set);
VS.Insert (Set, VH);
Check_Vertex_Iterator (R, G, Component (G, VH), Set);
VS.Destroy (Set);
Destroy (G);
end Test_Vertex_Iterator;
--------------------------
-- Unexpected_Exception --
--------------------------
procedure Unexpected_Exception (R : String) is
begin
Error (R, "unexpected exception");
end Unexpected_Exception;
-- Start of processing for Operations
begin
Test_Add_Edge;
Test_Add_Vertex;
Test_All_Edge_Iterator;
Test_All_Vertex_Iterator;
Test_Component;
Test_Component_Iterator;
Test_Contains_Component;
Test_Contains_Edge;
Test_Contains_Vertex;
Test_Delete_Edge;
Test_Destination_Vertex;
Test_Find_Components;
Test_Is_Empty;
Test_Number_Of_Components;
Test_Number_Of_Edges;
Test_Number_Of_Vertices;
Test_Outgoing_Edge_Iterator;
Test_Present;
Test_Source_Vertex;
Test_Vertex_Iterator;
end Operations;
----------------------------
-- Compilation and output --
----------------------------
$ gnatmake -q operations.adb -largs -lgmem
$ ./operations
$ gnatmem operations > leaks.txt
$ grep -c "non freed allocations" leaks.txt
0
2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* libgnat/g-graphs.adb: Use type Directed_Graph rather than
Instance in various routines.
* libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
Update various routines that mention the type.
From-SVN: r272863
|
|
This patch introduces new unit GNAT.Graphs which currently provides a
directed graph abstraction.
------------
-- Source --
------------
-- operations.adb
with Ada.Text_IO; use Ada.Text_IO;
with GNAT; use GNAT;
with GNAT.Graphs; use GNAT.Graphs;
with GNAT.Sets; use GNAT.Sets;
procedure Operations is
type Vertex_Id is
(No_V, VA, VB, VC, VD, VE, VF, VG, VH, VX, VY, VZ);
No_Vertex_Id : constant Vertex_Id := No_V;
function Hash_Vertex (V : Vertex_Id) return Bucket_Range_Type;
type Edge_Id is
(No_E, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E97, E98, E99);
No_Edge_Id : constant Edge_Id := No_E;
function Hash_Edge (E : Edge_Id) return Bucket_Range_Type;
package ES is new Membership_Set
(Element_Type => Edge_Id,
"=" => "=",
Hash => Hash_Edge);
package DG is new Directed_Graph
(Vertex_Id => Vertex_Id,
No_Vertex => No_Vertex_Id,
Hash_Vertex => Hash_Vertex,
Same_Vertex => "=",
Edge_Id => Edge_Id,
No_Edge => No_Edge_Id,
Hash_Edge => Hash_Edge,
Same_Edge => "=");
use DG;
package VS is new Membership_Set
(Element_Type => Vertex_Id,
"=" => "=",
Hash => Hash_Vertex);
-----------------------
-- Local subprograms --
-----------------------
procedure Check_Belongs_To_Component
(R : String;
G : Instance;
V : Vertex_Id;
Exp_Comp : Component_Id);
-- Verify that vertex V of graph G belongs to component Exp_Comp. R is the
-- calling routine.
procedure Check_Belongs_To_Some_Component
(R : String;
G : Instance;
V : Vertex_Id);
-- Verify that vertex V of graph G belongs to some component. R is the
-- calling routine.
procedure Check_Destination_Vertex
(R : String;
G : Instance;
E : Edge_Id;
Exp_V : Vertex_Id);
-- Vertify that the destination vertex of edge E of grah G is Exp_V. R is
-- the calling routine.
procedure Check_Distinct_Components
(R : String;
Comp_1 : Component_Id;
Comp_2 : Component_Id);
-- Verify that components Comp_1 and Comp_2 are distinct (not the same)
procedure Check_Has_Component
(R : String;
G : Instance;
G_Name : String;
Comp : Component_Id);
-- Verify that graph G with name G_Name contains component Comp. R is the
-- calling routine.
procedure Check_Has_Edge
(R : String;
G : Instance;
E : Edge_Id);
-- Verify that graph G contains edge E. R is the calling routine.
procedure Check_Has_Vertex
(R : String;
G : Instance;
V : Vertex_Id);
-- Verify that graph G contains vertex V. R is the calling routine.
procedure Check_No_Component
(R : String;
G : Instance;
V : Vertex_Id);
-- Verify that vertex V does not belong to some component. R is the calling
-- routine.
procedure Check_No_Component
(R : String;
G : Instance;
G_Name : String;
Comp : Component_Id);
-- Verify that graph G with name G_Name does not contain component Comp. R
-- is the calling routine.
procedure Check_No_Edge
(R : String;
G : Instance;
E : Edge_Id);
-- Verify that graph G does not contain edge E. R is the calling routine.
procedure Check_No_Vertex
(R : String;
G : Instance;
V : Vertex_Id);
-- Verify that graph G does not contain vertex V. R is the calling routine.
procedure Check_Number_Of_Components
(R : String;
G : Instance;
Exp_Num : Natural);
-- Verify that graph G has exactly Exp_Num components. R is the calling
-- routine.
procedure Check_Number_Of_Edges
(R : String;
G : Instance;
Exp_Num : Natural);
-- Verify that graph G has exactly Exp_Num edges. R is the calling routine.
procedure Check_Number_Of_Vertices
(R : String;
G : Instance;
Exp_Num : Natural);
-- Verify that graph G has exactly Exp_Num vertices. R is the calling
-- routine.
procedure Check_Outgoing_Edge_Iterator
(R : String;
G : Instance;
V : Vertex_Id;
Set : ES.Instance);
-- Verify that all outgoing edges of vertex V of graph G can be iterated
-- and appear in set Set. R is the calling routine.
procedure Check_Source_Vertex
(R : String;
G : Instance;
E : Edge_Id;
Exp_V : Vertex_Id);
-- Vertify that the source vertex of edge E of grah G is Exp_V. R is the
-- calling routine.
procedure Check_Vertex_Iterator
(R : String;
G : Instance;
Comp : Component_Id;
Set : VS.Instance);
-- Verify that all vertices of component Comp of graph G can be iterated
-- and appear in set Set. R is the calling routine.
function Create_And_Populate return Instance;
-- Create a brand new graph (see body for the shape of the graph)
procedure Error (R : String; Msg : String);
-- Output an error message with text Msg within the context of routine R
procedure Test_Add_Edge;
-- Verify the semantics of routine Add_Edge
procedure Test_Add_Vertex;
-- Verify the semantics of routine Add_Vertex
procedure Test_All_Edge_Iterator;
-- Verify the semantics of All_Edge_Iterator
procedure Test_All_Vertex_Iterator;
-- Verify the semantics of All_Vertex_Iterator
procedure Test_Component;
-- Verify the semantics of routine Component
procedure Test_Component_Iterator;
-- Verify the semantics of Component_Iterator
procedure Test_Contains_Component;
-- Verify the semantics of routine Contains_Component
procedure Test_Contains_Edge;
-- Verify the semantics of routine Contains_Edge
procedure Test_Contains_Vertex;
-- Verify the semantics of routine Contains_Vertex
procedure Test_Delete_Edge;
-- Verify the semantics of routine Delete_Edge
procedure Test_Destination_Vertex;
-- Verify the semantics of routine Destination_Vertex
procedure Test_Find_Components;
-- Verify the semantics of routine Find_Components
procedure Test_Is_Empty;
-- Verify the semantics of routine Is_Empty
procedure Test_Number_Of_Components;
-- Verify the semantics of routine Number_Of_Components
procedure Test_Number_Of_Edges;
-- Verify the semantics of routine Number_Of_Edges
procedure Test_Number_Of_Vertices;
-- Verify the semantics of routine Number_Of_Vertices
procedure Test_Outgoing_Edge_Iterator;
-- Verify the semantics of Outgoing_Edge_Iterator
procedure Test_Present;
-- Verify the semantics of routine Present
procedure Test_Source_Vertex;
-- Verify the semantics of routine Source_Vertex
procedure Test_Vertex_Iterator;
-- Verify the semantics of Vertex_Iterator;
procedure Unexpected_Exception (R : String);
-- Output an error message concerning an unexpected exception within
-- routine R.
--------------------------------
-- Check_Belongs_To_Component --
--------------------------------
procedure Check_Belongs_To_Component
(R : String;
G : Instance;
V : Vertex_Id;
Exp_Comp : Component_Id)
is
Act_Comp : constant Component_Id := Component (G, V);
begin
if Act_Comp /= Exp_Comp then
Error (R, "inconsistent component for vertex " & V'Img);
Error (R, " expected: " & Exp_Comp'Img);
Error (R, " got : " & Act_Comp'Img);
end if;
end Check_Belongs_To_Component;
-------------------------------------
-- Check_Belongs_To_Some_Component --
-------------------------------------
procedure Check_Belongs_To_Some_Component
(R : String;
G : Instance;
V : Vertex_Id)
is
begin
if not Present (Component (G, V)) then
Error (R, "vertex " & V'Img & " does not belong to a component");
end if;
end Check_Belongs_To_Some_Component;
------------------------------
-- Check_Destination_Vertex --
------------------------------
procedure Check_Destination_Vertex
(R : String;
G : Instance;
E : Edge_Id;
Exp_V : Vertex_Id)
is
Act_V : constant Vertex_Id := Destination_Vertex (G, E);
begin
if Act_V /= Exp_V then
Error (R, "inconsistent destination vertex for edge " & E'Img);
Error (R, " expected: " & Exp_V'Img);
Error (R, " got : " & Act_V'Img);
end if;
end Check_Destination_Vertex;
-------------------------------
-- Check_Distinct_Components --
-------------------------------
procedure Check_Distinct_Components
(R : String;
Comp_1 : Component_Id;
Comp_2 : Component_Id)
is
begin
if Comp_1 = Comp_2 then
Error (R, "components are not distinct");
end if;
end Check_Distinct_Components;
-------------------------
-- Check_Has_Component --
-------------------------
procedure Check_Has_Component
(R : String;
G : Instance;
G_Name : String;
Comp : Component_Id)
is
begin
if not Contains_Component (G, Comp) then
Error (R, "graph " & G_Name & " lacks component");
end if;
end Check_Has_Component;
--------------------
-- Check_Has_Edge --
--------------------
procedure Check_Has_Edge
(R : String;
G : Instance;
E : Edge_Id)
is
begin
if not Contains_Edge (G, E) then
Error (R, "graph lacks edge " & E'Img);
end if;
end Check_Has_Edge;
----------------------
-- Check_Has_Vertex --
----------------------
procedure Check_Has_Vertex
(R : String;
G : Instance;
V : Vertex_Id)
is
begin
if not Contains_Vertex (G, V) then
Error (R, "graph lacks vertex " & V'Img);
end if;
end Check_Has_Vertex;
------------------------
-- Check_No_Component --
------------------------
procedure Check_No_Component
(R : String;
G : Instance;
V : Vertex_Id)
is
begin
if Present (Component (G, V)) then
Error (R, "vertex " & V'Img & " belongs to a component");
end if;
end Check_No_Component;
procedure Check_No_Component
(R : String;
G : Instance;
G_Name : String;
Comp : Component_Id)
is
begin
if Contains_Component (G, Comp) then
Error (R, "graph " & G_Name & " contains component");
end if;
end Check_No_Component;
-------------------
-- Check_No_Edge --
-------------------
procedure Check_No_Edge
(R : String;
G : Instance;
E : Edge_Id)
is
begin
if Contains_Edge (G, E) then
Error (R, "graph contains edge " & E'Img);
end if;
end Check_No_Edge;
---------------------
-- Check_No_Vertex --
---------------------
procedure Check_No_Vertex
(R : String;
G : Instance;
V : Vertex_Id)
is
begin
if Contains_Vertex (G, V) then
Error (R, "graph contains vertex " & V'Img);
end if;
end Check_No_Vertex;
--------------------------------
-- Check_Number_Of_Components --
--------------------------------
procedure Check_Number_Of_Components
(R : String;
G : Instance;
Exp_Num : Natural)
is
Act_Num : constant Natural := Number_Of_Components (G);
begin
if Act_Num /= Exp_Num then
Error (R, "inconsistent number of components");
Error (R, " expected: " & Exp_Num'Img);
Error (R, " got : " & Act_Num'Img);
end if;
end Check_Number_Of_Components;
---------------------------
-- Check_Number_Of_Edges --
---------------------------
procedure Check_Number_Of_Edges
(R : String;
G : Instance;
Exp_Num : Natural)
is
Act_Num : constant Natural := Number_Of_Edges (G);
begin
if Act_Num /= Exp_Num then
Error (R, "inconsistent number of edges");
Error (R, " expected: " & Exp_Num'Img);
Error (R, " got : " & Act_Num'Img);
end if;
end Check_Number_Of_Edges;
------------------------------
-- Check_Number_Of_Vertices --
------------------------------
procedure Check_Number_Of_Vertices
(R : String;
G : Instance;
Exp_Num : Natural)
is
Act_Num : constant Natural := Number_Of_Vertices (G);
begin
if Act_Num /= Exp_Num then
Error (R, "inconsistent number of vertices");
Error (R, " expected: " & Exp_Num'Img);
Error (R, " got : " & Act_Num'Img);
end if;
end Check_Number_Of_Vertices;
----------------------------------
-- Check_Outgoing_Edge_Iterator --
----------------------------------
procedure Check_Outgoing_Edge_Iterator
(R : String;
G : Instance;
V : Vertex_Id;
Set : ES.Instance)
is
E : Edge_Id;
Out_E_Iter : Outgoing_Edge_Iterator;
begin
-- Iterate over all outgoing edges of vertex V while removing edges seen
-- from the set.
Out_E_Iter := Iterate_Outgoing_Edges (G, V);
while Has_Next (Out_E_Iter) loop
Next (Out_E_Iter, E);
if ES.Contains (Set, E) then
ES.Delete (Set, E);
else
Error (R, "outgoing edge " & E'Img & " is not iterated");
end if;
end loop;
-- At this point the set of edges should be empty
if not ES.Is_Empty (Set) then
Error (R, "not all outgoing edges were iterated");
end if;
end Check_Outgoing_Edge_Iterator;
-------------------------
-- Check_Source_Vertex --
-------------------------
procedure Check_Source_Vertex
(R : String;
G : Instance;
E : Edge_Id;
Exp_V : Vertex_Id)
is
Act_V : constant Vertex_Id := Source_Vertex (G, E);
begin
if Act_V /= Exp_V then
Error (R, "inconsistent source vertex");
Error (R, " expected: " & Exp_V'Img);
Error (R, " got : " & Act_V'Img);
end if;
end Check_Source_Vertex;
---------------------------
-- Check_Vertex_Iterator --
---------------------------
procedure Check_Vertex_Iterator
(R : String;
G : Instance;
Comp : Component_Id;
Set : VS.Instance)
is
V : Vertex_Id;
V_Iter : Vertex_Iterator;
begin
-- Iterate over all vertices of component Comp while removing vertices
-- seen from the set.
V_Iter := Iterate_Vertices (G, Comp);
while Has_Next (V_Iter) loop
Next (V_Iter, V);
if VS.Contains (Set, V) then
VS.Delete (Set, V);
else
Error (R, "vertex " & V'Img & " is not iterated");
end if;
end loop;
-- At this point the set of vertices should be empty
if not VS.Is_Empty (Set) then
Error (R, "not all vertices were iterated");
end if;
end Check_Vertex_Iterator;
-------------------------
-- Create_And_Populate --
-------------------------
function Create_And_Populate return Instance is
G : constant Instance :=
Create (Initial_Vertices => Vertex_Id'Size,
Initial_Edges => Edge_Id'Size);
begin
-- 9 8 1 2
-- G <------ F <------ A ------> B -------> C
-- | ^ | | ^ ^
-- +------------------+ | +-------------------+
-- 10 | | 3
-- 4 | 5 |
-- v |
-- H D ---------+
-- | ^
-- | |
-- 6 | | 7
-- | |
-- v |
-- E
--
-- Components:
--
-- [A, F, G]
-- [B]
-- [C]
-- [D, E]
-- [H]
Add_Vertex (G, VA);
Add_Vertex (G, VB);
Add_Vertex (G, VC);
Add_Vertex (G, VD);
Add_Vertex (G, VE);
Add_Vertex (G, VF);
Add_Vertex (G, VG);
Add_Vertex (G, VH);
Add_Edge (G, E1, Source => VA, Destination => VB);
Add_Edge (G, E2, Source => VB, Destination => VC);
Add_Edge (G, E3, Source => VA, Destination => VC);
Add_Edge (G, E4, Source => VA, Destination => VD);
Add_Edge (G, E5, Source => VD, Destination => VB);
Add_Edge (G, E6, Source => VD, Destination => VE);
Add_Edge (G, E7, Source => VE, Destination => VD);
Add_Edge (G, E8, Source => VA, Destination => VF);
Add_Edge (G, E9, Source => VF, Destination => VG);
Add_Edge (G, E10, Source => VG, Destination => VA);
return G;
end Create_And_Populate;
-----------
-- Error --
-----------
procedure Error (R : String; Msg : String) is
begin
Put_Line ("ERROR: " & R & ": " & Msg);
end Error;
---------------
-- Hash_Edge --
---------------
function Hash_Edge (E : Edge_Id) return Bucket_Range_Type is
begin
return Bucket_Range_Type (Edge_Id'Pos (E));
end Hash_Edge;
-----------------
-- Hash_Vertex --
-----------------
function Hash_Vertex (V : Vertex_Id) return Bucket_Range_Type is
begin
return Bucket_Range_Type (Vertex_Id'Pos (V));
end Hash_Vertex;
-------------------
-- Test_Add_Edge --
-------------------
procedure Test_Add_Edge is
R : constant String := "Test_Add_Edge";
E : Edge_Id;
G : Instance := Create_And_Populate;
All_E_Iter : All_Edge_Iterator;
Out_E_Iter : Outgoing_Edge_Iterator;
begin
-- Try to add the same edge twice
begin
Add_Edge (G, E1, VB, VH);
Error (R, "duplicate edge not detected");
exception
when Duplicate_Edge => null;
when others => Unexpected_Exception (R);
end;
-- Try to add an edge with a bogus source
begin
Add_Edge (G, E97, Source => VX, Destination => VC);
Error (R, "missing vertex not detected");
exception
when Missing_Vertex => null;
when others => Unexpected_Exception (R);
end;
-- Try to add an edge with a bogus destination
begin
Add_Edge (G, E97, Source => VF, Destination => VY);
Error (R, "missing vertex not detected");
exception
when Missing_Vertex => null;
when others => Unexpected_Exception (R);
end;
-- Delete edge E1 between vertices VA and VB
begin
Delete_Edge (G, E1);
exception
when others => Unexpected_Exception (R);
end;
-- Try to re-add edge E1
begin
Add_Edge (G, E1, Source => VA, Destination => VB);
exception
when others => Unexpected_Exception (R);
end;
-- Lock all edges in the graph
All_E_Iter := Iterate_All_Edges (G);
-- Try to add an edge given that all edges are locked
begin
Add_Edge (G, E97, Source => VG, Destination => VH);
Error (R, "all edges not locked");
exception
when Iterated => null;
when others => Unexpected_Exception (R);
end;
-- Unlock all edges by iterating over them
while Has_Next (All_E_Iter) loop Next (All_E_Iter, E); end loop;
-- Lock all outgoing edges of vertex VD
Out_E_Iter := Iterate_Outgoing_Edges (G, VD);
-- Try to add an edge with source VD given that all edges of VD are
-- locked.
begin
Add_Edge (G, E97, Source => VD, Destination => VG);
Error (R, "outgoing edges of VD not locked");
exception
when Iterated => null;
when others => Unexpected_Exception (R);
end;
-- Unlock the edges of vertex VD by iterating over them
while Has_Next (Out_E_Iter) loop Next (Out_E_Iter, E); end loop;
Destroy (G);
end Test_Add_Edge;
---------------------
-- Test_Add_Vertex --
---------------------
procedure Test_Add_Vertex is
R : constant String := "Test_Add_Vertex";
G : Instance := Create_And_Populate;
V : Vertex_Id;
All_V_Iter : All_Vertex_Iterator;
begin
-- Try to add the same vertex twice
begin
Add_Vertex (G, VD);
Error (R, "duplicate vertex not detected");
exception
when Duplicate_Vertex => null;
when others => Unexpected_Exception (R);
end;
-- Lock all vertices in the graph
All_V_Iter := Iterate_All_Vertices (G);
-- Try to add a vertex given that all vertices are locked
begin
Add_Vertex (G, VZ);
Error (R, "all vertices not locked");
exception
when Iterated => null;
when others => Unexpected_Exception (R);
end;
-- Unlock all vertices by iterating over them
while Has_Next (All_V_Iter) loop Next (All_V_Iter, V); end loop;
Destroy (G);
end Test_Add_Vertex;
----------------------------
-- Test_All_Edge_Iterator --
----------------------------
procedure Test_All_Edge_Iterator is
R : constant String := "Test_All_Edge_Iterator";
E : Edge_Id;
G : Instance := Create_And_Populate;
All_E_Iter : All_Edge_Iterator;
All_Edges : ES.Instance;
begin
-- Collect all expected edges in a set
All_Edges := ES.Create (Number_Of_Edges (G));
for Curr_E in E1 .. E10 loop
ES.Insert (All_Edges, Curr_E);
end loop;
-- Iterate over all edges while removing encountered edges from the set
All_E_Iter := Iterate_All_Edges (G);
while Has_Next (All_E_Iter) loop
Next (All_E_Iter, E);
if ES.Contains (All_Edges, E) then
ES.Delete (All_Edges, E);
else
Error (R, "edge " & E'Img & " is not iterated");
end if;
end loop;
-- At this point the set of edges should be empty
if not ES.Is_Empty (All_Edges) then
Error (R, "not all edges were iterated");
end if;
ES.Destroy (All_Edges);
Destroy (G);
end Test_All_Edge_Iterator;
------------------------------
-- Test_All_Vertex_Iterator --
------------------------------
procedure Test_All_Vertex_Iterator is
R : constant String := "Test_All_Vertex_Iterator";
G : Instance := Create_And_Populate;
V : Vertex_Id;
All_V_Iter : All_Vertex_Iterator;
All_Vertices : VS.Instance;
begin
-- Collect all expected vertices in a set
All_Vertices := VS.Create (Number_Of_Vertices (G));
for Curr_V in VA .. VH loop
VS.Insert (All_Vertices, Curr_V);
end loop;
-- Iterate over all vertices while removing encountered vertices from
-- the set.
All_V_Iter := Iterate_All_Vertices (G);
while Has_Next (All_V_Iter) loop
Next (All_V_Iter, V);
if VS.Contains (All_Vertices, V) then
VS.Delete (All_Vertices, V);
else
Error (R, "vertex " & V'Img & " is not iterated");
end if;
end loop;
-- At this point the set of vertices should be empty
if not VS.Is_Empty (All_Vertices) then
Error (R, "not all vertices were iterated");
end if;
VS.Destroy (All_Vertices);
Destroy (G);
end Test_All_Vertex_Iterator;
--------------------
-- Test_Component --
--------------------
procedure Test_Component is
R : constant String := "Test_Component";
G : Instance := Create (Initial_Vertices => 3, Initial_Edges => 2);
begin
-- E1
-- ----->
-- VA VB VC
-- <-----
-- E2
--
-- Components:
--
-- [VA, VB]
-- [VC]
Add_Vertex (G, VA);
Add_Vertex (G, VB);
Add_Vertex (G, VC);
Add_Edge (G, E1, Source => VA, Destination => VB);
Add_Edge (G, E2, Source => VB, Destination => VA);
-- None of the vertices should belong to a component
Check_No_Component (R, G, VA);
Check_No_Component (R, G, VB);
Check_No_Component (R, G, VC);
-- Find the strongly connected components in the graph
Find_Components (G);
-- Vertices should belong to a component
Check_Belongs_To_Some_Component (R, G, VA);
Check_Belongs_To_Some_Component (R, G, VB);
Check_Belongs_To_Some_Component (R, G, VC);
Destroy (G);
end Test_Component;
-----------------------------
-- Test_Component_Iterator --
-----------------------------
procedure Test_Component_Iterator is
R : constant String := "Test_Component_Iterator";
G : Instance := Create_And_Populate;
Comp : Component_Id;
Comp_Count : Natural;
Comp_Iter : Component_Iterator;
begin
Find_Components (G);
Check_Number_Of_Components (R, G, 5);
Comp_Count := Number_Of_Components (G);
-- Iterate over all components while decrementing their number
Comp_Iter := Iterate_Components (G);
while Has_Next (Comp_Iter) loop
Next (Comp_Iter, Comp);
Comp_Count := Comp_Count - 1;
end loop;
-- At this point all components should have been accounted for
if Comp_Count /= 0 then
Error (R, "not all components were iterated");
end if;
Destroy (G);
end Test_Component_Iterator;
-----------------------------
-- Test_Contains_Component --
-----------------------------
procedure Test_Contains_Component is
R : constant String := "Test_Contains_Component";
G1 : Instance := Create (Initial_Vertices => 2, Initial_Edges => 2);
G2 : Instance := Create (Initial_Vertices => 2, Initial_Edges => 2);
begin
-- E1
-- ----->
-- VA VB
-- <-----
-- E2
--
-- Components:
--
-- [VA, VB]
Add_Vertex (G1, VA);
Add_Vertex (G1, VB);
Add_Edge (G1, E1, Source => VA, Destination => VB);
Add_Edge (G1, E2, Source => VB, Destination => VA);
-- E97
-- ----->
-- VX VY
-- <-----
-- E98
--
-- Components:
--
-- [VX, VY]
Add_Vertex (G2, VX);
Add_Vertex (G2, VY);
Add_Edge (G2, E97, Source => VX, Destination => VY);
Add_Edge (G2, E98, Source => VY, Destination => VX);
-- Find the strongly connected components in both graphs
Find_Components (G1);
Find_Components (G2);
-- Vertices should belong to a component
Check_Belongs_To_Some_Component (R, G1, VA);
Check_Belongs_To_Some_Component (R, G1, VB);
Check_Belongs_To_Some_Component (R, G2, VX);
Check_Belongs_To_Some_Component (R, G2, VY);
-- Verify that each graph contains the correct component
Check_Has_Component (R, G1, "G1", Component (G1, VA));
Check_Has_Component (R, G1, "G1", Component (G1, VB));
Check_Has_Component (R, G2, "G2", Component (G2, VX));
Check_Has_Component (R, G2, "G2", Component (G2, VY));
-- Verify that each graph does not contain components from the other
-- graph.
Check_No_Component (R, G1, "G1", Component (G2, VX));
Check_No_Component (R, G1, "G1", Component (G2, VY));
Check_No_Component (R, G2, "G2", Component (G1, VA));
Check_No_Component (R, G2, "G2", Component (G1, VB));
Destroy (G1);
Destroy (G2);
end Test_Contains_Component;
------------------------
-- Test_Contains_Edge --
------------------------
procedure Test_Contains_Edge is
R : constant String := "Test_Contains_Edge";
G : Instance := Create_And_Populate;
begin
-- Verify that all edges in the range E1 .. E10 exist
for Curr_E in E1 .. E10 loop
Check_Has_Edge (R, G, Curr_E);
end loop;
-- Verify that no extra edges are present
for Curr_E in E97 .. E99 loop
Check_No_Edge (R, G, Curr_E);
end loop;
-- Add new edges E97, E98, and E99
Add_Edge (G, E97, Source => VG, Destination => VF);
Add_Edge (G, E98, Source => VH, Destination => VE);
Add_Edge (G, E99, Source => VD, Destination => VC);
-- Verify that all edges in the range E1 .. E99 exist
for Curr_E in E1 .. E99 loop
Check_Has_Edge (R, G, Curr_E);
end loop;
-- Delete each edge that corresponds to an even position in Edge_Id
for Curr_E in E1 .. E99 loop
if Edge_Id'Pos (Curr_E) mod 2 = 0 then
Delete_Edge (G, Curr_E);
end if;
end loop;
-- Verify that all "even" edges are missing, and all "odd" edges are
-- present.
for Curr_E in E1 .. E99 loop
if Edge_Id'Pos (Curr_E) mod 2 = 0 then
Check_No_Edge (R, G, Curr_E);
else
Check_Has_Edge (R, G, Curr_E);
end if;
end loop;
Destroy (G);
end Test_Contains_Edge;
--------------------------
-- Test_Contains_Vertex --
--------------------------
procedure Test_Contains_Vertex is
R : constant String := "Test_Contains_Vertex";
G : Instance := Create_And_Populate;
begin
-- Verify that all vertices in the range VA .. VH exist
for Curr_V in VA .. VH loop
Check_Has_Vertex (R, G, Curr_V);
end loop;
-- Verify that no extra vertices are present
for Curr_V in VX .. VZ loop
Check_No_Vertex (R, G, Curr_V);
end loop;
-- Add new vertices VX, VY, and VZ
Add_Vertex (G, VX);
Add_Vertex (G, VY);
Add_Vertex (G, VZ);
-- Verify that all vertices in the range VA .. VZ exist
for Curr_V in VA .. VZ loop
Check_Has_Vertex (R, G, Curr_V);
end loop;
Destroy (G);
end Test_Contains_Vertex;
----------------------
-- Test_Delete_Edge --
----------------------
procedure Test_Delete_Edge is
R : constant String := "Test_Delete_Edge";
E : Edge_Id;
G : Instance := Create_And_Populate;
V : Vertex_Id;
All_E_Iter : All_Edge_Iterator;
All_V_Iter : All_Vertex_Iterator;
Out_E_Iter : Outgoing_Edge_Iterator;
begin
-- Try to delete a bogus edge
begin
Delete_Edge (G, E97);
Error (R, "missing vertex deleted");
exception
when Missing_Edge => null;
when others => Unexpected_Exception (R);
end;
-- Delete edge E1 between vertices VA and VB
begin
Delete_Edge (G, E1);
exception
when others => Unexpected_Exception (R);
end;
-- Verify that edge E1 is gone from all edges in the graph
All_E_Iter := Iterate_All_Edges (G);
while Has_Next (All_E_Iter) loop
Next (All_E_Iter, E);
if E = E1 then
Error (R, "edge " & E'Img & " not removed from all edges");
end if;
end loop;
-- Verify that edge E1 is gone from the outgoing edges of vertex VA
Out_E_Iter := Iterate_Outgoing_Edges (G, VA);
while Has_Next (Out_E_Iter) loop
Next (Out_E_Iter, E);
if E = E1 then
Error
(R, "edge " & E'Img & "not removed from outgoing edges of VA");
end if;
end loop;
-- Delete all edges in the range E2 .. E10
for Curr_E in E2 .. E10 loop
Delete_Edge (G, Curr_E);
end loop;
-- Verify that all edges are gone from the graph
All_E_Iter := Iterate_All_Edges (G);
while Has_Next (All_E_Iter) loop
Next (All_E_Iter, E);
Error (R, "edge " & E'Img & " not removed from all edges");
end loop;
-- Verify that all edges are gone from the respective source vertices
All_V_Iter := Iterate_All_Vertices (G);
while Has_Next (All_V_Iter) loop
Next (All_V_Iter, V);
Out_E_Iter := Iterate_Outgoing_Edges (G, V);
while Has_Next (Out_E_Iter) loop
Next (Out_E_Iter, E);
Error (R, "edge " & E'Img & " not removed from vertex " & V'Img);
end loop;
end loop;
Destroy (G);
end Test_Delete_Edge;
-----------------------------
-- Test_Destination_Vertex --
-----------------------------
procedure Test_Destination_Vertex is
R : constant String := "Test_Destination_Vertex";
G : Instance := Create_And_Populate;
begin
-- Verify the destination vertices of all edges in the graph
Check_Destination_Vertex (R, G, E1, VB);
Check_Destination_Vertex (R, G, E2, VC);
Check_Destination_Vertex (R, G, E3, VC);
Check_Destination_Vertex (R, G, E4, VD);
Check_Destination_Vertex (R, G, E5, VB);
Check_Destination_Vertex (R, G, E6, VE);
Check_Destination_Vertex (R, G, E7, VD);
Check_Destination_Vertex (R, G, E8, VF);
Check_Destination_Vertex (R, G, E9, VG);
Check_Destination_Vertex (R, G, E10, VA);
Destroy (G);
end Test_Destination_Vertex;
--------------------------
-- Test_Find_Components --
--------------------------
procedure Test_Find_Components is
R : constant String := "Test_Find_Components";
G : Instance := Create_And_Populate;
Comp_1 : Component_Id; -- [A, F, G]
Comp_2 : Component_Id; -- [B]
Comp_3 : Component_Id; -- [C]
Comp_4 : Component_Id; -- [D, E]
Comp_5 : Component_Id; -- [H]
begin
Find_Components (G);
-- Vertices should belong to a component
Check_Belongs_To_Some_Component (R, G, VA);
Check_Belongs_To_Some_Component (R, G, VB);
Check_Belongs_To_Some_Component (R, G, VC);
Check_Belongs_To_Some_Component (R, G, VD);
Check_Belongs_To_Some_Component (R, G, VH);
-- Extract the ids of the components from the first vertices in each
-- component.
Comp_1 := Component (G, VA);
Comp_2 := Component (G, VB);
Comp_3 := Component (G, VC);
Comp_4 := Component (G, VD);
Comp_5 := Component (G, VH);
-- Verify that the components are distinct
Check_Distinct_Components (R, Comp_1, Comp_2);
Check_Distinct_Components (R, Comp_1, Comp_3);
Check_Distinct_Components (R, Comp_1, Comp_4);
Check_Distinct_Components (R, Comp_1, Comp_5);
Check_Distinct_Components (R, Comp_2, Comp_3);
Check_Distinct_Components (R, Comp_2, Comp_4);
Check_Distinct_Components (R, Comp_2, Comp_5);
Check_Distinct_Components (R, Comp_3, Comp_4);
Check_Distinct_Components (R, Comp_3, Comp_5);
Check_Distinct_Components (R, Comp_4, Comp_5);
-- Verify that the remaining nodes belong to the proper component
Check_Belongs_To_Component (R, G, VF, Comp_1);
Check_Belongs_To_Component (R, G, VG, Comp_1);
Check_Belongs_To_Component (R, G, VE, Comp_4);
Destroy (G);
end Test_Find_Components;
-------------------
-- Test_Is_Empty --
-------------------
procedure Test_Is_Empty is
R : constant String := "Test_Is_Empty";
G : Instance := Create (Initial_Vertices => 3, Initial_Edges => 2);
begin
-- Verify that a graph without vertices and edges is empty
if not Is_Empty (G) then
Error (R, "graph is empty");
end if;
-- Add vertices
Add_Vertex (G, VA);
Add_Vertex (G, VB);
-- Verify that a graph with vertices and no edges is not empty
if Is_Empty (G) then
Error (R, "graph is not empty");
end if;
-- Add edges
Add_Edge (G, E1, Source => VA, Destination => VB);
-- Verify that a graph with vertices and edges is not empty
if Is_Empty (G) then
Error (R, "graph is not empty");
end if;
Destroy (G);
end Test_Is_Empty;
-------------------------------
-- Test_Number_Of_Components --
-------------------------------
procedure Test_Number_Of_Components is
R : constant String := "Test_Number_Of_Components";
G : Instance := Create (Initial_Vertices => 3, Initial_Edges => 2);
begin
-- Verify that an empty graph has exactly 0 components
Check_Number_Of_Components (R, G, 0);
-- E1
-- ----->
-- VA VB VC
-- <-----
-- E2
--
-- Components:
--
-- [VA, VB]
-- [VC]
Add_Vertex (G, VA);
Add_Vertex (G, VB);
Add_Vertex (G, VC);
Add_Edge (G, E1, Source => VA, Destination => VB);
Add_Edge (G, E2, Source => VB, Destination => VA);
-- Verify that the graph has exact 0 components even though it contains
-- vertices and edges.
Check_Number_Of_Components (R, G, 0);
Find_Components (G);
-- Verify that the graph has exactly 2 components
Check_Number_Of_Components (R, G, 2);
Destroy (G);
end Test_Number_Of_Components;
--------------------------
-- Test_Number_Of_Edges --
--------------------------
procedure Test_Number_Of_Edges is
R : constant String := "Test_Number_Of_Edges";
G : Instance := Create_And_Populate;
begin
-- Verify that the graph has exactly 10 edges
Check_Number_Of_Edges (R, G, 10);
-- Delete two edges
Delete_Edge (G, E1);
Delete_Edge (G, E2);
-- Verify that the graph has exactly 8 edges
Check_Number_Of_Edges (R, G, 8);
-- Delete the remaining edge
for Curr_E in E3 .. E10 loop
Delete_Edge (G, Curr_E);
end loop;
-- Verify that the graph has exactly 0 edges
Check_Number_Of_Edges (R, G, 0);
-- Add two edges
Add_Edge (G, E1, Source => VF, Destination => VA);
Add_Edge (G, E2, Source => VC, Destination => VH);
-- Verify that the graph has exactly 2 edges
Check_Number_Of_Edges (R, G, 2);
Destroy (G);
end Test_Number_Of_Edges;
-----------------------------
-- Test_Number_Of_Vertices --
-----------------------------
procedure Test_Number_Of_Vertices is
R : constant String := "Test_Number_Of_Vertices";
G : Instance := Create (Initial_Vertices => 4, Initial_Edges => 12);
begin
-- Verify that an empty graph has exactly 0 vertices
Check_Number_Of_Vertices (R, G, 0);
-- Add three vertices
Add_Vertex (G, VC);
Add_Vertex (G, VG);
Add_Vertex (G, VX);
-- Verify that the graph has exactly 3 vertices
Check_Number_Of_Vertices (R, G, 3);
-- Add one edge
Add_Edge (G, E8, Source => VX, Destination => VG);
-- Verify that the graph has exactly 3 vertices
Check_Number_Of_Vertices (R, G, 3);
Destroy (G);
end Test_Number_Of_Vertices;
---------------------------------
-- Test_Outgoing_Edge_Iterator --
---------------------------------
procedure Test_Outgoing_Edge_Iterator is
R : constant String := "Test_Outgoing_Edge_Iterator";
G : Instance := Create_And_Populate;
Set : ES.Instance;
begin
Set := ES.Create (4);
ES.Insert (Set, E1);
ES.Insert (Set, E3);
ES.Insert (Set, E4);
ES.Insert (Set, E8);
Check_Outgoing_Edge_Iterator (R, G, VA, Set);
ES.Insert (Set, E2);
Check_Outgoing_Edge_Iterator (R, G, VB, Set);
Check_Outgoing_Edge_Iterator (R, G, VC, Set);
ES.Insert (Set, E5);
ES.Insert (Set, E6);
Check_Outgoing_Edge_Iterator (R, G, VD, Set);
ES.Insert (Set, E7);
Check_Outgoing_Edge_Iterator (R, G, VE, Set);
ES.Insert (Set, E9);
Check_Outgoing_Edge_Iterator (R, G, VF, Set);
ES.Insert (Set, E10);
Check_Outgoing_Edge_Iterator (R, G, VG, Set);
Check_Outgoing_Edge_Iterator (R, G, VH, Set);
ES.Destroy (Set);
Destroy (G);
end Test_Outgoing_Edge_Iterator;
------------------
-- Test_Present --
------------------
procedure Test_Present is
R : constant String := "Test_Present";
G : Instance := Nil;
begin
-- Verify that a non-existent graph is not present
if Present (G) then
Error (R, "graph is not present");
end if;
G := Create_And_Populate;
-- Verify that an existing graph is present
if not Present (G) then
Error (R, "graph is present");
end if;
Destroy (G);
-- Verify that a destroyed graph is not present
if Present (G) then
Error (R, "graph is not present");
end if;
end Test_Present;
------------------------
-- Test_Source_Vertex --
------------------------
procedure Test_Source_Vertex is
R : constant String := "Test_Source_Vertex";
G : Instance := Create_And_Populate;
begin
-- Verify the source vertices of all edges in the graph
Check_Source_Vertex (R, G, E1, VA);
Check_Source_Vertex (R, G, E2, VB);
Check_Source_Vertex (R, G, E3, VA);
Check_Source_Vertex (R, G, E4, VA);
Check_Source_Vertex (R, G, E5, VD);
Check_Source_Vertex (R, G, E6, VD);
Check_Source_Vertex (R, G, E7, VE);
Check_Source_Vertex (R, G, E8, VA);
Check_Source_Vertex (R, G, E9, VF);
Check_Source_Vertex (R, G, E10, VG);
Destroy (G);
end Test_Source_Vertex;
--------------------------
-- Test_Vertex_Iterator --
--------------------------
procedure Test_Vertex_Iterator is
R : constant String := "Test_Vertex_Iterator";
G : Instance := Create_And_Populate;
Set : VS.Instance;
begin
Find_Components (G);
Set := VS.Create (3);
VS.Insert (Set, VA);
VS.Insert (Set, VF);
VS.Insert (Set, VG);
Check_Vertex_Iterator (R, G, Component (G, VA), Set);
VS.Insert (Set, VB);
Check_Vertex_Iterator (R, G, Component (G, VB), Set);
VS.Insert (Set, VC);
Check_Vertex_Iterator (R, G, Component (G, VC), Set);
VS.Insert (Set, VD);
VS.Insert (Set, VE);
Check_Vertex_Iterator (R, G, Component (G, VD), Set);
VS.Insert (Set, VH);
Check_Vertex_Iterator (R, G, Component (G, VH), Set);
VS.Destroy (Set);
Destroy (G);
end Test_Vertex_Iterator;
--------------------------
-- Unexpected_Exception --
--------------------------
procedure Unexpected_Exception (R : String) is
begin
Error (R, "unexpected exception");
end Unexpected_Exception;
-- Start of processing for Operations
begin
Test_Add_Edge;
Test_Add_Vertex;
Test_All_Edge_Iterator;
Test_All_Vertex_Iterator;
Test_Component;
Test_Component_Iterator;
Test_Contains_Component;
Test_Contains_Edge;
Test_Contains_Vertex;
Test_Delete_Edge;
Test_Destination_Vertex;
Test_Find_Components;
Test_Is_Empty;
Test_Number_Of_Components;
Test_Number_Of_Edges;
Test_Number_Of_Vertices;
Test_Outgoing_Edge_Iterator;
Test_Present;
Test_Source_Vertex;
Test_Vertex_Iterator;
end Operations;
----------------------------
-- Compilation and output --
----------------------------
$ gnatmake -q operations.adb -largs -lgmem
$ ./operations
$ gnatmem operations > leaks.txt
$ grep -c "non freed allocations" leaks.txt
0
2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
* Makefile.rtl, gcc-interface/Make-lang.in: Register unit
GNAT.Graphs.
* libgnat/g-dynhta.adb: Various minor cleanups (use Present
rather than direct comparisons).
(Delete): Reimplement to use Delete_Node.
(Delete_Node): New routine.
(Destroy_Bucket): Invoke the provided destructor.
(Present): New routines.
* libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
Use better names for the components of iterators.
* libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
* libgnat/g-lists.adb: Various minor cleanups (use Present
rather than direct comparisons).
(Delete_Node): Invoke the provided destructor.
(Present): New routine.
* libgnat/g-lists.ads: Add new generic formal Destroy_Element.
Use better names for the components of iterators.
(Present): New routine.
* libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
Reset): New routines.
From-SVN: r272857
|