From 029401d51612c5e69d7ac8603e1b69cd7ed6ef96 Mon Sep 17 00:00:00 2001 From: Martin Perner Date: Wed, 9 Jun 2010 00:30:54 +0200 Subject: [PATCH] [gesamt] Added ag/codea/codeb testcases --- gesamt/ag_adrixan_00.3 | 10 ++++ gesamt/ag_bschussek_00.3 | 5 ++ gesamt/ag_bschussek_01.3 | 5 ++ gesamt/ag_fieselschweif_00.3 | 5 ++ gesamt/ag_fieselschweif_01.3 | 3 ++ gesamt/ag_fieselschweif_02.3 | 6 +++ gesamt/ag_lewurm_00.3 | 6 +++ gesamt/ag_lewurm_01.3 | 8 +++ gesamt/ag_lewurm_02.3 | 4 ++ gesamt/ag_lewurm_06.3 | 5 ++ gesamt/ag_nax_03.2 | 2 + gesamt/ag_nax_05.2 | 3 ++ gesamt/ag_nax_09.3 | 7 +++ gesamt/ag_nax_12.3 | 6 +++ gesamt/ag_nax_14.3 | 3 ++ gesamt/ag_snafu_01.3 | 32 ++++++++++++ gesamt/ag_snafu_02.3 | 33 +++++++++++++ gesamt/ag_snafu_03.3 | 34 +++++++++++++ gesamt/ag_snafu_04.3 | 30 +++++++++++ gesamt/ag_snafu_06.3 | 9 ++++ gesamt/ag_snafu_07.3 | 9 ++++ gesamt/ag_snafu_10.3 | 9 ++++ gesamt/ag_snafu_11.3 | 9 ++++ gesamt/ag_torotil_01.3 | 9 ++++ gesamt/ag_zzbsm17_01.3 | 7 +++ gesamt/ag_zzbsm17_02.3 | 3 ++ gesamt/ag_zzbsm17_03.3 | 7 +++ gesamt/ag_zzbsm17_04.3 | 5 ++ gesamt/ag_zzbsm17_06.3 | 16 ++++++ gesamt/codea_intelli_00.0 | 8 +++ gesamt/codea_intelli_00.call | 4 ++ gesamt/codea_intelli_00.instr | 1 + gesamt/codea_intelli_01.0 | 3 ++ gesamt/codea_intelli_01.call | 9 ++++ gesamt/codea_intelli_01.instr | 1 + gesamt/codea_intelli_02.0 | 3 ++ gesamt/codea_intelli_02.call | 4 ++ gesamt/codea_intelli_02.instr | 1 + gesamt/codea_intelli_03.0 | 4 ++ gesamt/codea_intelli_03.call | 7 +++ gesamt/codea_intelli_03.instr | 1 + gesamt/codea_intelli_04.0 | 3 ++ gesamt/codea_intelli_04.call | 3 ++ gesamt/codea_intelli_04.instr | 1 + gesamt/codea_intelli_05.0 | 11 +++++ gesamt/codea_intelli_05.call | 13 +++++ gesamt/codea_intelli_05.instr | 1 + gesamt/codea_intelli_06.0 | 5 ++ gesamt/codea_intelli_06.call | 9 ++++ gesamt/codea_intelli_06.instr | 1 + gesamt/codea_intelli_07.0 | 5 ++ gesamt/codea_intelli_07.call | 8 +++ gesamt/codea_intelli_07.instr | 1 + gesamt/codea_intelli_08.0 | 5 ++ gesamt/codea_intelli_08.call | 8 +++ gesamt/codea_intelli_08.instr | 1 + gesamt/codea_lewurm_00.0 | 3 ++ gesamt/codea_lewurm_00.call | 3 ++ gesamt/codea_lewurm_00.instr | 1 + gesamt/codea_lewurm_01.0 | 3 ++ gesamt/codea_lewurm_01.call | 2 + gesamt/codea_lewurm_01.instr | 1 + gesamt/codea_lewurm_02.0 | 3 ++ gesamt/codea_lewurm_02.call | 2 + gesamt/codea_lewurm_02.instr | 1 + gesamt/codea_lewurm_03.0 | 3 ++ gesamt/codea_lewurm_03.call | 2 + gesamt/codea_lewurm_03.instr | 1 + gesamt/codea_lewurm_04.0 | 3 ++ gesamt/codea_lewurm_04.call | 2 + gesamt/codea_lewurm_04.instr | 1 + gesamt/codea_lewurm_05.0 | 3 ++ gesamt/codea_lewurm_05.call | 3 ++ gesamt/codea_lewurm_05.instr | 1 + gesamt/codea_lewurm_06.0 | 3 ++ gesamt/codea_lewurm_06.call | 2 + gesamt/codea_lewurm_06.instr | 1 + gesamt/codea_lewurm_07.0 | 19 +++++++ gesamt/codea_lewurm_07.call | 7 +++ gesamt/codea_lewurm_07.instr | 1 + gesamt/codea_lewurm_08.0 | 19 +++++++ gesamt/codea_lewurm_08.call | 7 +++ gesamt/codea_lewurm_08.instr | 1 + gesamt/codea_lewurm_09.0 | 12 +++++ gesamt/codea_lewurm_09.call | 6 +++ gesamt/codea_lewurm_09.instr | 1 + gesamt/codea_lewurm_10.0 | 11 +++++ gesamt/codea_lewurm_10.call | 5 ++ gesamt/codea_lewurm_10.instr | 1 + gesamt/codea_lewurm_11.0 | 13 +++++ gesamt/codea_lewurm_11.call | 46 +++++++++++++++++ gesamt/codea_lewurm_11.instr | 1 + gesamt/codea_lewurm_12.0 | 12 +++++ gesamt/codea_lewurm_12.call | 7 +++ gesamt/codea_lewurm_12.instr | 1 + gesamt/codea_lewurm_13.0 | 9 ++++ gesamt/codea_lewurm_13.call | 6 +++ gesamt/codea_lewurm_13.instr | 1 + gesamt/codea_lewurm_14.0 | 21 ++++++++ gesamt/codea_lewurm_14.call | 15 ++++++ gesamt/codea_lewurm_14.instr | 1 + gesamt/codea_mrstrcmp_00.0 | 8 +++ gesamt/codea_mrstrcmp_00.call | 6 +++ gesamt/codea_mrstrcmp_00.instr | 1 + gesamt/codea_mrstrcmp_01.0 | 8 +++ gesamt/codea_mrstrcmp_01.call | 6 +++ gesamt/codea_mrstrcmp_01.instr | 1 + gesamt/codea_mrstrcmp_02.0 | 8 +++ gesamt/codea_mrstrcmp_02.call | 6 +++ gesamt/codea_mrstrcmp_02.instr | 1 + gesamt/codea_mrstrcmp_03.0 | 8 +++ gesamt/codea_mrstrcmp_03.call | 6 +++ gesamt/codea_mrstrcmp_03.instr | 1 + gesamt/codea_mrstrcmp_04.0 | 8 +++ gesamt/codea_mrstrcmp_04.call | 6 +++ gesamt/codea_mrstrcmp_04.instr | 1 + gesamt/codea_mrstrcmp_05.0 | 8 +++ gesamt/codea_mrstrcmp_05.call | 6 +++ gesamt/codea_mrstrcmp_05.instr | 1 + gesamt/codea_mrstrcmp_06.0 | 8 +++ gesamt/codea_mrstrcmp_06.call | 6 +++ gesamt/codea_mrstrcmp_06.instr | 1 + gesamt/codea_mrstrcmp_07.0 | 8 +++ gesamt/codea_mrstrcmp_07.call | 6 +++ gesamt/codea_mrstrcmp_07.instr | 1 + gesamt/codea_mrstrcmp_08.0 | 8 +++ gesamt/codea_mrstrcmp_08.call | 6 +++ gesamt/codea_mrstrcmp_08.instr | 1 + gesamt/codea_mrstrcmp_09.0 | 3 ++ gesamt/codea_mrstrcmp_09.call | 4 ++ gesamt/codea_mrstrcmp_09.instr | 1 + gesamt/codea_mrstrcmp_10.0 | 3 ++ gesamt/codea_mrstrcmp_10.call | 5 ++ gesamt/codea_mrstrcmp_10.instr | 1 + gesamt/codea_mrstrcmp_11.0 | 3 ++ gesamt/codea_mrstrcmp_11.call | 5 ++ gesamt/codea_mrstrcmp_11.instr | 1 + gesamt/codea_mrstrcmp_12.0 | 3 ++ gesamt/codea_mrstrcmp_12.call | 5 ++ gesamt/codea_mrstrcmp_12.instr | 1 + gesamt/codea_mrstrcmp_13.0 | 19 +++++++ gesamt/codea_mrstrcmp_13.call | 55 +++++++++++++++++++++ gesamt/codea_mrstrcmp_13.instr | 1 + gesamt/codea_mrstrcmp_14.0 | 19 +++++++ gesamt/codea_mrstrcmp_14.call | 55 +++++++++++++++++++++ gesamt/codea_mrstrcmp_14.instr | 1 + gesamt/codea_mrstrcmp_15.0 | 3 ++ gesamt/codea_mrstrcmp_15.call | 4 ++ gesamt/codea_mrstrcmp_15.instr | 1 + gesamt/codea_mrstrcmp_16.0 | 3 ++ gesamt/codea_mrstrcmp_16.call | 7 +++ gesamt/codea_mrstrcmp_16.instr | 1 + gesamt/codea_mrstrcmp_17.0 | 16 ++++++ gesamt/codea_mrstrcmp_17.call | 18 +++++++ gesamt/codea_mrstrcmp_17.instr | 1 + gesamt/codea_skinner33_00.0 | 11 +++++ gesamt/codea_skinner33_00.call | 5 ++ gesamt/codea_skinner33_00.instr | 1 + gesamt/codea_skinner33_01.0 | 23 +++++++++ gesamt/codea_skinner33_01.call | 8 +++ gesamt/codea_skinner33_01.instr | 1 + gesamt/codea_skinner33_02.0 | 11 +++++ gesamt/codea_skinner33_02.call | 5 ++ gesamt/codea_skinner33_02.instr | 1 + gesamt/codea_skinner33_03.0 | 13 +++++ gesamt/codea_skinner33_03.call | 48 ++++++++++++++++++ gesamt/codea_skinner33_03.instr | 1 + gesamt/codea_skinner33_04.0 | 15 ++++++ gesamt/codea_skinner33_04.call | 50 +++++++++++++++++++ gesamt/codea_skinner33_04.instr | 1 + gesamt/codea_skinner33_05.0 | 11 +++++ gesamt/codea_skinner33_05.call | 43 ++++++++++++++++ gesamt/codea_skinner33_05.instr | 1 + gesamt/codea_skinner33_06.0 | 15 ++++++ gesamt/codea_skinner33_06.call | 50 +++++++++++++++++++ gesamt/codea_skinner33_06.instr | 1 + gesamt/codea_skinner33_07.0 | 7 +++ gesamt/codea_skinner33_07.call | 28 +++++++++++ gesamt/codea_skinner33_07.instr | 1 + gesamt/codea_skinner33_08.0 | 7 +++ gesamt/codea_skinner33_08.call | 28 +++++++++++ gesamt/codea_skinner33_08.instr | 1 + gesamt/codea_skinner33_09.0 | 7 +++ gesamt/codea_skinner33_09.call | 28 +++++++++++ gesamt/codea_skinner33_09.instr | 1 + gesamt/codea_skinner33_10.0 | 7 +++ gesamt/codea_skinner33_10.call | 28 +++++++++++ gesamt/codea_skinner33_10.instr | 1 + gesamt/codea_skinner33_11.0 | 7 +++ gesamt/codea_skinner33_11.call | 27 ++++++++++ gesamt/codea_skinner33_11.instr | 1 + gesamt/codea_skinner33_12.0 | 7 +++ gesamt/codea_skinner33_12.call | 27 ++++++++++ gesamt/codea_skinner33_12.instr | 1 + gesamt/codea_skinner33_13.0 | 7 +++ gesamt/codea_skinner33_13.call | 27 ++++++++++ gesamt/codea_skinner33_13.instr | 1 + gesamt/codea_skinner33_14.0 | 7 +++ gesamt/codea_skinner33_14.call | 27 ++++++++++ gesamt/codea_skinner33_14.instr | 1 + gesamt/codea_skinner33_15.0 | 85 ++++++++++++++++++++++++++++++++ gesamt/codea_skinner33_15.call | 50 +++++++++++++++++++ gesamt/codea_skinner33_15.instr | 1 + gesamt/codea_skinner33_16.0 | 33 +++++++++++++ gesamt/codea_skinner33_16.call | 25 ++++++++++ gesamt/codea_skinner33_16.instr | 1 + gesamt/codea_skinner33_17.0 | 45 +++++++++++++++++ gesamt/codea_skinner33_17.call | 28 +++++++++++ gesamt/codea_skinner33_17.instr | 1 + gesamt/codea_skinner33_18.0 | 38 ++++++++++++++ gesamt/codea_skinner33_18.call | 24 +++++++++ gesamt/codea_skinner33_18.instr | 1 + gesamt/codea_skinner33_19.0 | 31 ++++++++++++ gesamt/codea_skinner33_19.call | 22 +++++++++ gesamt/codea_skinner33_19.instr | 1 + gesamt/codea_skinner33_20.0 | 11 +++++ gesamt/codea_skinner33_20.call | 5 ++ gesamt/codea_skinner33_20.instr | 1 + gesamt/codea_skinner33_21.0 | 5 ++ gesamt/codea_skinner33_21.call | 3 ++ gesamt/codea_skinner33_21.instr | 1 + gesamt/codea_snafu_00.0 | 11 +++++ gesamt/codea_snafu_00.call | 5 ++ gesamt/codea_snafu_00.instr | 1 + gesamt/codea_snafu_01.0 | 11 +++++ gesamt/codea_snafu_01.call | 5 ++ gesamt/codea_snafu_01.instr | 1 + gesamt/codea_snafu_02.0 | 11 +++++ gesamt/codea_snafu_02.call | 5 ++ gesamt/codea_snafu_02.instr | 1 + gesamt/codea_snafu_03.0 | 11 +++++ gesamt/codea_snafu_03.call | 16 ++++++ gesamt/codea_snafu_03.instr | 1 + gesamt/codea_snafu_04.0 | 15 ++++++ gesamt/codea_snafu_04.call | 7 +++ gesamt/codea_snafu_04.instr | 1 + gesamt/codea_snafu_05.0 | 3 ++ gesamt/codea_snafu_05.call | 3 ++ gesamt/codea_snafu_05.instr | 1 + gesamt/codea_snafu_06.0 | 21 ++++++++ gesamt/codea_snafu_06.call | 21 ++++++++ gesamt/codea_snafu_06.instr | 1 + gesamt/codeb_georg_asma_00.call | 19 +++++++ gesamt/codeb_georg_asma_00.instr | 1 + gesamt/codeb_georg_asma_01.0 | 43 ++++++++++++++++ gesamt/codeb_georg_asma_01.call | 19 +++++++ gesamt/codeb_georg_asma_01.instr | 1 + gesamt/codeb_georg_asma_02.0 | 42 ++++++++++++++++ gesamt/codeb_georg_asma_02.call | 19 +++++++ gesamt/codeb_georg_asma_02.instr | 1 + gesamt/codeb_georg_asma_03.0 | 43 ++++++++++++++++ gesamt/codeb_georg_asma_03.call | 19 +++++++ gesamt/codeb_georg_asma_03.instr | 1 + gesamt/codeb_georg_asma_04.0 | 41 +++++++++++++++ gesamt/codeb_georg_asma_04.call | 19 +++++++ gesamt/codeb_georg_asma_04.instr | 1 + gesamt/codeb_georg_asmb_00.call | 25 ++++++++++ gesamt/codeb_georg_asmb_00.instr | 1 + gesamt/codeb_georg_asmb_01.0 | 40 +++++++++++++++ gesamt/codeb_georg_asmb_01.call | 25 ++++++++++ gesamt/codeb_georg_asmb_01.instr | 1 + gesamt/codeb_georg_fib_000.call | 2 + gesamt/codeb_georg_fib_001.0 | 21 ++++++++ gesamt/codeb_georg_fib_001.call | 2 + gesamt/codeb_georg_fib_001.instr | 1 + gesamt/codeb_georg_fib_020.call | 2 + gesamt/codeb_georg_fib_021.0 | 20 ++++++++ gesamt/codeb_georg_fib_021.call | 2 + gesamt/codeb_georg_fib_021.instr | 1 + gesamt/codeb_georg_fib_022.0 | 19 +++++++ gesamt/codeb_georg_fib_022.call | 2 + gesamt/codeb_georg_fib_022.instr | 1 + gesamt/codeb_georg_fib_023.0 | 21 ++++++++ gesamt/codeb_georg_fib_023.call | 2 + gesamt/codeb_georg_fib_023.instr | 1 + gesamt/codeb_georg_fib_024.0 | 20 ++++++++ gesamt/codeb_georg_fib_024.call | 2 + gesamt/codeb_georg_fib_024.instr | 1 + gesamt/codeb_georg_fib_025.0 | 19 +++++++ gesamt/codeb_georg_fib_025.call | 2 + gesamt/codeb_georg_fib_025.instr | 1 + gesamt/codeb_georg_fib_026.0 | 19 +++++++ gesamt/codeb_georg_fib_026.call | 2 + gesamt/codeb_georg_fib_026.instr | 1 + gesamt/codeb_georg_fib_027.0 | 20 ++++++++ gesamt/codeb_georg_fib_027.call | 2 + gesamt/codeb_georg_fib_027.instr | 1 + gesamt/codeb_georg_fib_028.0 | 23 +++++++++ gesamt/codeb_georg_fib_028.call | 2 + gesamt/codeb_georg_fib_028.instr | 1 + gesamt/codeb_georg_fib_040.call | 3 ++ gesamt/codeb_georg_fib_041.0 | 21 ++++++++ gesamt/codeb_georg_fib_041.call | 3 ++ gesamt/codeb_georg_fib_041.instr | 1 + gesamt/codeb_georg_fib_042.0 | 21 ++++++++ gesamt/codeb_georg_fib_042.call | 3 ++ gesamt/codeb_georg_fib_042.instr | 1 + gesamt/codeb_georg_fib_043.0 | 22 +++++++++ gesamt/codeb_georg_fib_043.call | 3 ++ gesamt/codeb_georg_fib_043.instr | 1 + gesamt/codeb_georg_fib_044.0 | 24 +++++++++ gesamt/codeb_georg_fib_044.call | 3 ++ gesamt/codeb_georg_fib_044.instr | 1 + gesamt/codeb_intelli_01.0 | 6 +++ gesamt/codeb_intelli_01.call | 5 ++ gesamt/codeb_intelli_01.instr | 1 + gesamt/codeb_intelli_02.0 | 13 +++++ gesamt/codeb_intelli_02.call | 5 ++ gesamt/codeb_intelli_02.instr | 1 + gesamt/codeb_intelli_03.0 | 17 +++++++ gesamt/codeb_intelli_03.call | 6 +++ gesamt/codeb_intelli_03.instr | 1 + gesamt/codeb_intelli_04.0 | 8 +++ gesamt/codeb_intelli_04.call | 6 +++ gesamt/codeb_intelli_04.instr | 1 + gesamt/codeb_intelli_05.0 | 11 +++++ gesamt/codeb_intelli_05.call | 6 +++ gesamt/codeb_intelli_05.instr | 1 + gesamt/codeb_intelli_06.0 | 8 +++ gesamt/codeb_intelli_06.call | 5 ++ gesamt/codeb_intelli_06.instr | 1 + gesamt/codeb_intelli_07.0 | 8 +++ gesamt/codeb_intelli_07.call | 5 ++ gesamt/codeb_intelli_07.instr | 1 + gesamt/codeb_intelli_08.0 | 6 +++ gesamt/codeb_intelli_08.call | 3 ++ gesamt/codeb_intelli_08.instr | 1 + gesamt/codeb_intelli_09.0 | 11 +++++ gesamt/codeb_intelli_09.call | 3 ++ gesamt/codeb_intelli_09.instr | 1 + gesamt/codeb_intelli_10.0 | 14 ++++++ gesamt/codeb_intelli_10.call | 3 ++ gesamt/codeb_intelli_10.instr | 1 + gesamt/codeb_intelli_11.0 | 8 +++ gesamt/codeb_intelli_11.call | 3 ++ gesamt/codeb_intelli_11.instr | 1 + gesamt/codeb_intelli_12.0 | 29 +++++++++++ gesamt/codeb_intelli_12.call | 5 ++ gesamt/codeb_intelli_12.instr | 1 + gesamt/codeb_intelli_13.0 | 8 +++ gesamt/codeb_intelli_13.call | 3 ++ gesamt/codeb_intelli_13.instr | 1 + gesamt/codeb_intelli_14.0 | 16 ++++++ gesamt/codeb_intelli_14.call | 7 +++ gesamt/codeb_intelli_14.instr | 1 + gesamt/codeb_intelli_15.0 | 32 ++++++++++++ gesamt/codeb_intelli_15.call | 7 +++ gesamt/codeb_intelli_15.instr | 1 + gesamt/codeb_skinner33_00.0 | 27 ++++++++++ gesamt/codeb_skinner33_00.call | 8 +++ gesamt/codeb_skinner33_00.instr | 1 + gesamt/codeb_skinner33_01.0 | 30 +++++++++++ gesamt/codeb_skinner33_01.call | 9 ++++ gesamt/codeb_skinner33_01.instr | 1 + gesamt/codeb_skinner33_02.0 | 24 +++++++++ gesamt/codeb_skinner33_02.call | 10 ++++ gesamt/codeb_skinner33_02.instr | 1 + gesamt/codeb_skinner33_03.0 | 77 +++++++++++++++++++++++++++++ gesamt/codeb_skinner33_03.call | 13 +++++ gesamt/codeb_skinner33_03.instr | 1 + gesamt/codeb_skinner33_04.0 | 52 +++++++++++++++++++ gesamt/codeb_skinner33_04.call | 15 ++++++ gesamt/codeb_skinner33_04.instr | 1 + gesamt/codeb_skinner33_05.0 | 11 +++++ gesamt/codeb_skinner33_05.call | 2 + gesamt/codeb_skinner33_05.instr | 1 + gesamt/codeb_skinner33_06.0 | 6 +++ gesamt/codeb_skinner33_06.call | 6 +++ gesamt/codeb_skinner33_06.instr | 1 + gesamt/codeb_snafu_01.0 | 16 ++++++ gesamt/codeb_snafu_01.call | 7 +++ gesamt/codeb_snafu_01.instr | 1 + scripts/debug_gesamt | 72 +++++++++++++++++++++++++++ 373 files changed, 3571 insertions(+) create mode 100644 gesamt/ag_adrixan_00.3 create mode 100644 gesamt/ag_bschussek_00.3 create mode 100644 gesamt/ag_bschussek_01.3 create mode 100644 gesamt/ag_fieselschweif_00.3 create mode 100644 gesamt/ag_fieselschweif_01.3 create mode 100644 gesamt/ag_fieselschweif_02.3 create mode 100644 gesamt/ag_lewurm_00.3 create mode 100644 gesamt/ag_lewurm_01.3 create mode 100644 gesamt/ag_lewurm_02.3 create mode 100644 gesamt/ag_lewurm_06.3 create mode 100644 gesamt/ag_nax_03.2 create mode 100644 gesamt/ag_nax_05.2 create mode 100644 gesamt/ag_nax_09.3 create mode 100644 gesamt/ag_nax_12.3 create mode 100644 gesamt/ag_nax_14.3 create mode 100644 gesamt/ag_snafu_01.3 create mode 100644 gesamt/ag_snafu_02.3 create mode 100644 gesamt/ag_snafu_03.3 create mode 100644 gesamt/ag_snafu_04.3 create mode 100644 gesamt/ag_snafu_06.3 create mode 100644 gesamt/ag_snafu_07.3 create mode 100644 gesamt/ag_snafu_10.3 create mode 100644 gesamt/ag_snafu_11.3 create mode 100644 gesamt/ag_torotil_01.3 create mode 100644 gesamt/ag_zzbsm17_01.3 create mode 100644 gesamt/ag_zzbsm17_02.3 create mode 100644 gesamt/ag_zzbsm17_03.3 create mode 100644 gesamt/ag_zzbsm17_04.3 create mode 100644 gesamt/ag_zzbsm17_06.3 create mode 100644 gesamt/codea_intelli_00.0 create mode 100644 gesamt/codea_intelli_00.call create mode 100644 gesamt/codea_intelli_00.instr create mode 100644 gesamt/codea_intelli_01.0 create mode 100644 gesamt/codea_intelli_01.call create mode 100644 gesamt/codea_intelli_01.instr create mode 100644 gesamt/codea_intelli_02.0 create mode 100644 gesamt/codea_intelli_02.call create mode 100644 gesamt/codea_intelli_02.instr create mode 100644 gesamt/codea_intelli_03.0 create mode 100644 gesamt/codea_intelli_03.call create mode 100644 gesamt/codea_intelli_03.instr create mode 100644 gesamt/codea_intelli_04.0 create mode 100644 gesamt/codea_intelli_04.call create mode 100644 gesamt/codea_intelli_04.instr create mode 100644 gesamt/codea_intelli_05.0 create mode 100644 gesamt/codea_intelli_05.call create mode 100644 gesamt/codea_intelli_05.instr create mode 100644 gesamt/codea_intelli_06.0 create mode 100644 gesamt/codea_intelli_06.call create mode 100644 gesamt/codea_intelli_06.instr create mode 100644 gesamt/codea_intelli_07.0 create mode 100644 gesamt/codea_intelli_07.call create mode 100644 gesamt/codea_intelli_07.instr create mode 100644 gesamt/codea_intelli_08.0 create mode 100644 gesamt/codea_intelli_08.call create mode 100644 gesamt/codea_intelli_08.instr create mode 100644 gesamt/codea_lewurm_00.0 create mode 100644 gesamt/codea_lewurm_00.call create mode 100644 gesamt/codea_lewurm_00.instr create mode 100644 gesamt/codea_lewurm_01.0 create mode 100644 gesamt/codea_lewurm_01.call create mode 100644 gesamt/codea_lewurm_01.instr create mode 100644 gesamt/codea_lewurm_02.0 create mode 100644 gesamt/codea_lewurm_02.call create mode 100644 gesamt/codea_lewurm_02.instr create mode 100644 gesamt/codea_lewurm_03.0 create mode 100644 gesamt/codea_lewurm_03.call create mode 100644 gesamt/codea_lewurm_03.instr create mode 100644 gesamt/codea_lewurm_04.0 create mode 100644 gesamt/codea_lewurm_04.call create mode 100644 gesamt/codea_lewurm_04.instr create mode 100644 gesamt/codea_lewurm_05.0 create mode 100644 gesamt/codea_lewurm_05.call create mode 100644 gesamt/codea_lewurm_05.instr create mode 100644 gesamt/codea_lewurm_06.0 create mode 100644 gesamt/codea_lewurm_06.call create mode 100644 gesamt/codea_lewurm_06.instr create mode 100644 gesamt/codea_lewurm_07.0 create mode 100644 gesamt/codea_lewurm_07.call create mode 100644 gesamt/codea_lewurm_07.instr create mode 100644 gesamt/codea_lewurm_08.0 create mode 100644 gesamt/codea_lewurm_08.call create mode 100644 gesamt/codea_lewurm_08.instr create mode 100644 gesamt/codea_lewurm_09.0 create mode 100644 gesamt/codea_lewurm_09.call create mode 100644 gesamt/codea_lewurm_09.instr create mode 100644 gesamt/codea_lewurm_10.0 create mode 100644 gesamt/codea_lewurm_10.call create mode 100644 gesamt/codea_lewurm_10.instr create mode 100644 gesamt/codea_lewurm_11.0 create mode 100644 gesamt/codea_lewurm_11.call create mode 100644 gesamt/codea_lewurm_11.instr create mode 100644 gesamt/codea_lewurm_12.0 create mode 100644 gesamt/codea_lewurm_12.call create mode 100644 gesamt/codea_lewurm_12.instr create mode 100644 gesamt/codea_lewurm_13.0 create mode 100644 gesamt/codea_lewurm_13.call create mode 100644 gesamt/codea_lewurm_13.instr create mode 100644 gesamt/codea_lewurm_14.0 create mode 100644 gesamt/codea_lewurm_14.call create mode 100644 gesamt/codea_lewurm_14.instr create mode 100644 gesamt/codea_mrstrcmp_00.0 create mode 100644 gesamt/codea_mrstrcmp_00.call create mode 100644 gesamt/codea_mrstrcmp_00.instr create mode 100644 gesamt/codea_mrstrcmp_01.0 create mode 100644 gesamt/codea_mrstrcmp_01.call create mode 100644 gesamt/codea_mrstrcmp_01.instr create mode 100644 gesamt/codea_mrstrcmp_02.0 create mode 100644 gesamt/codea_mrstrcmp_02.call create mode 100644 gesamt/codea_mrstrcmp_02.instr create mode 100644 gesamt/codea_mrstrcmp_03.0 create mode 100644 gesamt/codea_mrstrcmp_03.call create mode 100644 gesamt/codea_mrstrcmp_03.instr create mode 100644 gesamt/codea_mrstrcmp_04.0 create mode 100644 gesamt/codea_mrstrcmp_04.call create mode 100644 gesamt/codea_mrstrcmp_04.instr create mode 100644 gesamt/codea_mrstrcmp_05.0 create mode 100644 gesamt/codea_mrstrcmp_05.call create mode 100644 gesamt/codea_mrstrcmp_05.instr create mode 100644 gesamt/codea_mrstrcmp_06.0 create mode 100644 gesamt/codea_mrstrcmp_06.call create mode 100644 gesamt/codea_mrstrcmp_06.instr create mode 100644 gesamt/codea_mrstrcmp_07.0 create mode 100644 gesamt/codea_mrstrcmp_07.call create mode 100644 gesamt/codea_mrstrcmp_07.instr create mode 100644 gesamt/codea_mrstrcmp_08.0 create mode 100644 gesamt/codea_mrstrcmp_08.call create mode 100644 gesamt/codea_mrstrcmp_08.instr create mode 100644 gesamt/codea_mrstrcmp_09.0 create mode 100644 gesamt/codea_mrstrcmp_09.call create mode 100644 gesamt/codea_mrstrcmp_09.instr create mode 100644 gesamt/codea_mrstrcmp_10.0 create mode 100644 gesamt/codea_mrstrcmp_10.call create mode 100644 gesamt/codea_mrstrcmp_10.instr create mode 100644 gesamt/codea_mrstrcmp_11.0 create mode 100644 gesamt/codea_mrstrcmp_11.call create mode 100644 gesamt/codea_mrstrcmp_11.instr create mode 100644 gesamt/codea_mrstrcmp_12.0 create mode 100644 gesamt/codea_mrstrcmp_12.call create mode 100644 gesamt/codea_mrstrcmp_12.instr create mode 100644 gesamt/codea_mrstrcmp_13.0 create mode 100644 gesamt/codea_mrstrcmp_13.call create mode 100644 gesamt/codea_mrstrcmp_13.instr create mode 100644 gesamt/codea_mrstrcmp_14.0 create mode 100644 gesamt/codea_mrstrcmp_14.call create mode 100644 gesamt/codea_mrstrcmp_14.instr create mode 100644 gesamt/codea_mrstrcmp_15.0 create mode 100644 gesamt/codea_mrstrcmp_15.call create mode 100644 gesamt/codea_mrstrcmp_15.instr create mode 100644 gesamt/codea_mrstrcmp_16.0 create mode 100644 gesamt/codea_mrstrcmp_16.call create mode 100644 gesamt/codea_mrstrcmp_16.instr create mode 100644 gesamt/codea_mrstrcmp_17.0 create mode 100644 gesamt/codea_mrstrcmp_17.call create mode 100644 gesamt/codea_mrstrcmp_17.instr create mode 100644 gesamt/codea_skinner33_00.0 create mode 100644 gesamt/codea_skinner33_00.call create mode 100644 gesamt/codea_skinner33_00.instr create mode 100644 gesamt/codea_skinner33_01.0 create mode 100644 gesamt/codea_skinner33_01.call create mode 100644 gesamt/codea_skinner33_01.instr create mode 100644 gesamt/codea_skinner33_02.0 create mode 100644 gesamt/codea_skinner33_02.call create mode 100644 gesamt/codea_skinner33_02.instr create mode 100644 gesamt/codea_skinner33_03.0 create mode 100644 gesamt/codea_skinner33_03.call create mode 100644 gesamt/codea_skinner33_03.instr create mode 100644 gesamt/codea_skinner33_04.0 create mode 100644 gesamt/codea_skinner33_04.call create mode 100644 gesamt/codea_skinner33_04.instr create mode 100644 gesamt/codea_skinner33_05.0 create mode 100644 gesamt/codea_skinner33_05.call create mode 100644 gesamt/codea_skinner33_05.instr create mode 100644 gesamt/codea_skinner33_06.0 create mode 100644 gesamt/codea_skinner33_06.call create mode 100644 gesamt/codea_skinner33_06.instr create mode 100644 gesamt/codea_skinner33_07.0 create mode 100644 gesamt/codea_skinner33_07.call create mode 100644 gesamt/codea_skinner33_07.instr create mode 100644 gesamt/codea_skinner33_08.0 create mode 100644 gesamt/codea_skinner33_08.call create mode 100644 gesamt/codea_skinner33_08.instr create mode 100644 gesamt/codea_skinner33_09.0 create mode 100644 gesamt/codea_skinner33_09.call create mode 100644 gesamt/codea_skinner33_09.instr create mode 100644 gesamt/codea_skinner33_10.0 create mode 100644 gesamt/codea_skinner33_10.call create mode 100644 gesamt/codea_skinner33_10.instr create mode 100644 gesamt/codea_skinner33_11.0 create mode 100644 gesamt/codea_skinner33_11.call create mode 100644 gesamt/codea_skinner33_11.instr create mode 100644 gesamt/codea_skinner33_12.0 create mode 100644 gesamt/codea_skinner33_12.call create mode 100644 gesamt/codea_skinner33_12.instr create mode 100644 gesamt/codea_skinner33_13.0 create mode 100644 gesamt/codea_skinner33_13.call create mode 100644 gesamt/codea_skinner33_13.instr create mode 100644 gesamt/codea_skinner33_14.0 create mode 100644 gesamt/codea_skinner33_14.call create mode 100644 gesamt/codea_skinner33_14.instr create mode 100644 gesamt/codea_skinner33_15.0 create mode 100644 gesamt/codea_skinner33_15.call create mode 100644 gesamt/codea_skinner33_15.instr create mode 100644 gesamt/codea_skinner33_16.0 create mode 100644 gesamt/codea_skinner33_16.call create mode 100644 gesamt/codea_skinner33_16.instr create mode 100644 gesamt/codea_skinner33_17.0 create mode 100644 gesamt/codea_skinner33_17.call create mode 100644 gesamt/codea_skinner33_17.instr create mode 100644 gesamt/codea_skinner33_18.0 create mode 100644 gesamt/codea_skinner33_18.call create mode 100644 gesamt/codea_skinner33_18.instr create mode 100644 gesamt/codea_skinner33_19.0 create mode 100644 gesamt/codea_skinner33_19.call create mode 100644 gesamt/codea_skinner33_19.instr create mode 100644 gesamt/codea_skinner33_20.0 create mode 100644 gesamt/codea_skinner33_20.call create mode 100644 gesamt/codea_skinner33_20.instr create mode 100644 gesamt/codea_skinner33_21.0 create mode 100644 gesamt/codea_skinner33_21.call create mode 100644 gesamt/codea_skinner33_21.instr create mode 100644 gesamt/codea_snafu_00.0 create mode 100644 gesamt/codea_snafu_00.call create mode 100644 gesamt/codea_snafu_00.instr create mode 100644 gesamt/codea_snafu_01.0 create mode 100644 gesamt/codea_snafu_01.call create mode 100644 gesamt/codea_snafu_01.instr create mode 100644 gesamt/codea_snafu_02.0 create mode 100644 gesamt/codea_snafu_02.call create mode 100644 gesamt/codea_snafu_02.instr create mode 100644 gesamt/codea_snafu_03.0 create mode 100644 gesamt/codea_snafu_03.call create mode 100644 gesamt/codea_snafu_03.instr create mode 100644 gesamt/codea_snafu_04.0 create mode 100644 gesamt/codea_snafu_04.call create mode 100644 gesamt/codea_snafu_04.instr create mode 100644 gesamt/codea_snafu_05.0 create mode 100644 gesamt/codea_snafu_05.call create mode 100644 gesamt/codea_snafu_05.instr create mode 100644 gesamt/codea_snafu_06.0 create mode 100644 gesamt/codea_snafu_06.call create mode 100644 gesamt/codea_snafu_06.instr create mode 100644 gesamt/codeb_georg_asma_00.call create mode 100644 gesamt/codeb_georg_asma_00.instr create mode 100644 gesamt/codeb_georg_asma_01.0 create mode 100644 gesamt/codeb_georg_asma_01.call create mode 100644 gesamt/codeb_georg_asma_01.instr create mode 100644 gesamt/codeb_georg_asma_02.0 create mode 100644 gesamt/codeb_georg_asma_02.call create mode 100644 gesamt/codeb_georg_asma_02.instr create mode 100644 gesamt/codeb_georg_asma_03.0 create mode 100644 gesamt/codeb_georg_asma_03.call create mode 100644 gesamt/codeb_georg_asma_03.instr create mode 100644 gesamt/codeb_georg_asma_04.0 create mode 100644 gesamt/codeb_georg_asma_04.call create mode 100644 gesamt/codeb_georg_asma_04.instr create mode 100644 gesamt/codeb_georg_asmb_00.call create mode 100644 gesamt/codeb_georg_asmb_00.instr create mode 100644 gesamt/codeb_georg_asmb_01.0 create mode 100644 gesamt/codeb_georg_asmb_01.call create mode 100644 gesamt/codeb_georg_asmb_01.instr create mode 100644 gesamt/codeb_georg_fib_000.call create mode 100644 gesamt/codeb_georg_fib_001.0 create mode 100644 gesamt/codeb_georg_fib_001.call create mode 100644 gesamt/codeb_georg_fib_001.instr create mode 100644 gesamt/codeb_georg_fib_020.call create mode 100644 gesamt/codeb_georg_fib_021.0 create mode 100644 gesamt/codeb_georg_fib_021.call create mode 100644 gesamt/codeb_georg_fib_021.instr create mode 100644 gesamt/codeb_georg_fib_022.0 create mode 100644 gesamt/codeb_georg_fib_022.call create mode 100644 gesamt/codeb_georg_fib_022.instr create mode 100644 gesamt/codeb_georg_fib_023.0 create mode 100644 gesamt/codeb_georg_fib_023.call create mode 100644 gesamt/codeb_georg_fib_023.instr create mode 100644 gesamt/codeb_georg_fib_024.0 create mode 100644 gesamt/codeb_georg_fib_024.call create mode 100644 gesamt/codeb_georg_fib_024.instr create mode 100644 gesamt/codeb_georg_fib_025.0 create mode 100644 gesamt/codeb_georg_fib_025.call create mode 100644 gesamt/codeb_georg_fib_025.instr create mode 100644 gesamt/codeb_georg_fib_026.0 create mode 100644 gesamt/codeb_georg_fib_026.call create mode 100644 gesamt/codeb_georg_fib_026.instr create mode 100644 gesamt/codeb_georg_fib_027.0 create mode 100644 gesamt/codeb_georg_fib_027.call create mode 100644 gesamt/codeb_georg_fib_027.instr create mode 100644 gesamt/codeb_georg_fib_028.0 create mode 100644 gesamt/codeb_georg_fib_028.call create mode 100644 gesamt/codeb_georg_fib_028.instr create mode 100644 gesamt/codeb_georg_fib_040.call create mode 100644 gesamt/codeb_georg_fib_041.0 create mode 100644 gesamt/codeb_georg_fib_041.call create mode 100644 gesamt/codeb_georg_fib_041.instr create mode 100644 gesamt/codeb_georg_fib_042.0 create mode 100644 gesamt/codeb_georg_fib_042.call create mode 100644 gesamt/codeb_georg_fib_042.instr create mode 100644 gesamt/codeb_georg_fib_043.0 create mode 100644 gesamt/codeb_georg_fib_043.call create mode 100644 gesamt/codeb_georg_fib_043.instr create mode 100644 gesamt/codeb_georg_fib_044.0 create mode 100644 gesamt/codeb_georg_fib_044.call create mode 100644 gesamt/codeb_georg_fib_044.instr create mode 100644 gesamt/codeb_intelli_01.0 create mode 100644 gesamt/codeb_intelli_01.call create mode 100644 gesamt/codeb_intelli_01.instr create mode 100644 gesamt/codeb_intelli_02.0 create mode 100644 gesamt/codeb_intelli_02.call create mode 100644 gesamt/codeb_intelli_02.instr create mode 100644 gesamt/codeb_intelli_03.0 create mode 100644 gesamt/codeb_intelli_03.call create mode 100644 gesamt/codeb_intelli_03.instr create mode 100644 gesamt/codeb_intelli_04.0 create mode 100644 gesamt/codeb_intelli_04.call create mode 100644 gesamt/codeb_intelli_04.instr create mode 100644 gesamt/codeb_intelli_05.0 create mode 100644 gesamt/codeb_intelli_05.call create mode 100644 gesamt/codeb_intelli_05.instr create mode 100644 gesamt/codeb_intelli_06.0 create mode 100644 gesamt/codeb_intelli_06.call create mode 100644 gesamt/codeb_intelli_06.instr create mode 100644 gesamt/codeb_intelli_07.0 create mode 100644 gesamt/codeb_intelli_07.call create mode 100644 gesamt/codeb_intelli_07.instr create mode 100644 gesamt/codeb_intelli_08.0 create mode 100644 gesamt/codeb_intelli_08.call create mode 100644 gesamt/codeb_intelli_08.instr create mode 100644 gesamt/codeb_intelli_09.0 create mode 100644 gesamt/codeb_intelli_09.call create mode 100644 gesamt/codeb_intelli_09.instr create mode 100644 gesamt/codeb_intelli_10.0 create mode 100644 gesamt/codeb_intelli_10.call create mode 100644 gesamt/codeb_intelli_10.instr create mode 100644 gesamt/codeb_intelli_11.0 create mode 100644 gesamt/codeb_intelli_11.call create mode 100644 gesamt/codeb_intelli_11.instr create mode 100644 gesamt/codeb_intelli_12.0 create mode 100644 gesamt/codeb_intelli_12.call create mode 100644 gesamt/codeb_intelli_12.instr create mode 100644 gesamt/codeb_intelli_13.0 create mode 100644 gesamt/codeb_intelli_13.call create mode 100644 gesamt/codeb_intelli_13.instr create mode 100644 gesamt/codeb_intelli_14.0 create mode 100644 gesamt/codeb_intelli_14.call create mode 100644 gesamt/codeb_intelli_14.instr create mode 100644 gesamt/codeb_intelli_15.0 create mode 100644 gesamt/codeb_intelli_15.call create mode 100644 gesamt/codeb_intelli_15.instr create mode 100644 gesamt/codeb_skinner33_00.0 create mode 100644 gesamt/codeb_skinner33_00.call create mode 100644 gesamt/codeb_skinner33_00.instr create mode 100644 gesamt/codeb_skinner33_01.0 create mode 100644 gesamt/codeb_skinner33_01.call create mode 100644 gesamt/codeb_skinner33_01.instr create mode 100644 gesamt/codeb_skinner33_02.0 create mode 100644 gesamt/codeb_skinner33_02.call create mode 100644 gesamt/codeb_skinner33_02.instr create mode 100644 gesamt/codeb_skinner33_03.0 create mode 100644 gesamt/codeb_skinner33_03.call create mode 100644 gesamt/codeb_skinner33_03.instr create mode 100644 gesamt/codeb_skinner33_04.0 create mode 100644 gesamt/codeb_skinner33_04.call create mode 100644 gesamt/codeb_skinner33_04.instr create mode 100644 gesamt/codeb_skinner33_05.0 create mode 100644 gesamt/codeb_skinner33_05.call create mode 100644 gesamt/codeb_skinner33_05.instr create mode 100644 gesamt/codeb_skinner33_06.0 create mode 100644 gesamt/codeb_skinner33_06.call create mode 100644 gesamt/codeb_skinner33_06.instr create mode 100644 gesamt/codeb_snafu_01.0 create mode 100644 gesamt/codeb_snafu_01.call create mode 100644 gesamt/codeb_snafu_01.instr create mode 100755 scripts/debug_gesamt diff --git a/gesamt/ag_adrixan_00.3 b/gesamt/ag_adrixan_00.3 new file mode 100644 index 0000000..d38991d --- /dev/null +++ b/gesamt/ag_adrixan_00.3 @@ -0,0 +1,10 @@ +struct a d end; +method f(b c s) + var t := 0; + /* lesender feldzugriff */ + b := c*(s.a - 1); + b := c*(s.d - 1); + b := c*(t.a - 1); + /* Zusatz zu lewurm_05.0: ungültig, da c keine Feldvariable ist */ + b := c*(t.c - 1); +end; diff --git a/gesamt/ag_bschussek_00.3 b/gesamt/ag_bschussek_00.3 new file mode 100644 index 0000000..fc50d8c --- /dev/null +++ b/gesamt/ag_bschussek_00.3 @@ -0,0 +1,5 @@ +method test(arg1) + arg1.a := 10; /* undefined field */ +end; + +struct a end; diff --git a/gesamt/ag_bschussek_01.3 b/gesamt/ag_bschussek_01.3 new file mode 100644 index 0000000..86b8caa --- /dev/null +++ b/gesamt/ag_bschussek_01.3 @@ -0,0 +1,5 @@ +method test(arg1) + var b := arg1.a; /* undefined field */ +end; + +struct a end; diff --git a/gesamt/ag_fieselschweif_00.3 b/gesamt/ag_fieselschweif_00.3 new file mode 100644 index 0000000..63e264b --- /dev/null +++ b/gesamt/ag_fieselschweif_00.3 @@ -0,0 +1,5 @@ +/* multiple field definition on "doubletrouble" here */ +struct doubletrouble foo end; +method test(a b c) +end; +struct bar doubletrouble end; diff --git a/gesamt/ag_fieselschweif_01.3 b/gesamt/ag_fieselschweif_01.3 new file mode 100644 index 0000000..2c126cf --- /dev/null +++ b/gesamt/ag_fieselschweif_01.3 @@ -0,0 +1,3 @@ +/* multiple variable definition in param list */ +method test(a b c a) +end; diff --git a/gesamt/ag_fieselschweif_02.3 b/gesamt/ag_fieselschweif_02.3 new file mode 100644 index 0000000..8b0c25d --- /dev/null +++ b/gesamt/ag_fieselschweif_02.3 @@ -0,0 +1,6 @@ +/* fieldnames are NOT visible everywhere, but only after their definition */ +method foobar(a) + a.youdontseemeyet := 31337; +end; + +struct youdontseemeyet end; diff --git a/gesamt/ag_lewurm_00.3 b/gesamt/ag_lewurm_00.3 new file mode 100644 index 0000000..25e8e2f --- /dev/null +++ b/gesamt/ag_lewurm_00.3 @@ -0,0 +1,6 @@ +method f(a b c) + /* x nicht deklariert */ + if a < x then + c := 0x1; + end; +end; diff --git a/gesamt/ag_lewurm_01.3 b/gesamt/ag_lewurm_01.3 new file mode 100644 index 0000000..eda05e0 --- /dev/null +++ b/gesamt/ag_lewurm_01.3 @@ -0,0 +1,8 @@ +method f(a b c) + if a < b then + var x := 0; + c := 1; + end; + /* x ist nicht im scope */ + x := x - 1; +end; diff --git a/gesamt/ag_lewurm_02.3 b/gesamt/ag_lewurm_02.3 new file mode 100644 index 0000000..c5fc09a --- /dev/null +++ b/gesamt/ag_lewurm_02.3 @@ -0,0 +1,4 @@ +method f(a b c) + /* x ist (noch) nicht im scope */ + var x := x - 1; +end; diff --git a/gesamt/ag_lewurm_06.3 b/gesamt/ag_lewurm_06.3 new file mode 100644 index 0000000..2b44db2 --- /dev/null +++ b/gesamt/ag_lewurm_06.3 @@ -0,0 +1,5 @@ +method f(b) + var t := 0; + /* identifier doppelt vorhanden */ + var b := 0; +end; diff --git a/gesamt/ag_nax_03.2 b/gesamt/ag_nax_03.2 new file mode 100644 index 0000000..9a78b21 --- /dev/null +++ b/gesamt/ag_nax_03.2 @@ -0,0 +1,2 @@ +struct mystruct +end diff --git a/gesamt/ag_nax_05.2 b/gesamt/ag_nax_05.2 new file mode 100644 index 0000000..fc6fb9e --- /dev/null +++ b/gesamt/ag_nax_05.2 @@ -0,0 +1,3 @@ +method testit() + var b := 10 - d * 20; /* should raise an error, since '(' ')' are missing */ +end; diff --git a/gesamt/ag_nax_09.3 b/gesamt/ag_nax_09.3 new file mode 100644 index 0000000..f78e9ec --- /dev/null +++ b/gesamt/ag_nax_09.3 @@ -0,0 +1,7 @@ +method abc(arg1 arg2) + if arg1 = arg2 then + var a := 42; + end; + + var b := a - -1; +end; diff --git a/gesamt/ag_nax_12.3 b/gesamt/ag_nax_12.3 new file mode 100644 index 0000000..4ee7a1b --- /dev/null +++ b/gesamt/ag_nax_12.3 @@ -0,0 +1,6 @@ +struct a b c end; +method test(arg1 arg2) + arg1.a := 10; +end; + +struct c d e end; diff --git a/gesamt/ag_nax_14.3 b/gesamt/ag_nax_14.3 new file mode 100644 index 0000000..7174855 --- /dev/null +++ b/gesamt/ag_nax_14.3 @@ -0,0 +1,3 @@ +method abc(arg1 arg2) + var arg2 := 10; /* detect duplicates and fail */ +end; diff --git a/gesamt/ag_snafu_01.3 b/gesamt/ag_snafu_01.3 new file mode 100644 index 0000000..17ab765 --- /dev/null +++ b/gesamt/ag_snafu_01.3 @@ -0,0 +1,32 @@ +struct + a b c +end; + +method bar(d e f) + var foo := a; + foo := b - c; + var bar := d - (e * f); + + if(4 = 2) then + var x := 1; + var hiho := 0; + else + var hiho := 0x1f; + end; + + var hiho := 2; + + while 0 < hiho do + if (42) then + var hiho := 0xff; /* hiho existiert bereits */ + hiho := hiho - 1; + end; + end; + + return 0; +end; + +struct + g + h +end; diff --git a/gesamt/ag_snafu_02.3 b/gesamt/ag_snafu_02.3 new file mode 100644 index 0000000..a114c97 --- /dev/null +++ b/gesamt/ag_snafu_02.3 @@ -0,0 +1,33 @@ +struct + a b c +end; + +method bar(d e f) + var foo := a; + foo := b - c; + var bar := d - (e * f); + + if(4 = 2) then + var x := 1; + var hiho := 0; + else + var hiho := 0x1f; + end; + + var hiho := 2; + + while 0 < hiho do + if (42) then + hiho := hiho - 1; + else + hiho := hiho - (0 - g); /* g existiert noch nicht */ + end; + end; + + return 0; +end; + +struct + g + h +end; diff --git a/gesamt/ag_snafu_03.3 b/gesamt/ag_snafu_03.3 new file mode 100644 index 0000000..fd67059 --- /dev/null +++ b/gesamt/ag_snafu_03.3 @@ -0,0 +1,34 @@ +struct + a b c +end; + +method bar(d e f) + var foo := a; + foo := b - c; + var bar := d - (e * f); + + if(4 = 2) then + var x := 1; + var hiho := 0; + else + var hiho := 0x1f; + end; + + var hiho := 2; + + while 0 < hiho do + if (42) then + hiho := hiho - 1; + else + hiho := hiho - (0 - a); + end; + end; + + var e := 22; /* e existiert bereits */ + return 0; +end; + +struct + g + h +end; diff --git a/gesamt/ag_snafu_04.3 b/gesamt/ag_snafu_04.3 new file mode 100644 index 0000000..ea5c6a8 --- /dev/null +++ b/gesamt/ag_snafu_04.3 @@ -0,0 +1,30 @@ +struct + a b c +end; + +method bar(d e f) + var foo := a; + foo := b - c; + var bar := d - (e * f); + + if(4 = 2) then + var x := 1; + var hiho := 0; + else + var hiho := 0x1f; + end; + + if(9 < 8) then + var hohi := 12; + else + var hiho := 2; + end; + + + return hiho; /* hiho existiert nicht */ +end; + +struct + g + h +end; diff --git a/gesamt/ag_snafu_06.3 b/gesamt/ag_snafu_06.3 new file mode 100644 index 0000000..e4fa6e8 --- /dev/null +++ b/gesamt/ag_snafu_06.3 @@ -0,0 +1,9 @@ +struct g1 g2 g3 g4 end; +struct g5 g6 end; + +method foo(p1 p2 p3) + var l1 := 0; + var l2 := g6; + + g1.g2.l1 := 0xDEAD; /* l1 kein feld */ +end; diff --git a/gesamt/ag_snafu_07.3 b/gesamt/ag_snafu_07.3 new file mode 100644 index 0000000..8de0724 --- /dev/null +++ b/gesamt/ag_snafu_07.3 @@ -0,0 +1,9 @@ +struct g1 g2 g3 g4 end; +struct g5 g6 end; + +method foo(p1 p2 p3) + var l1 := 0; + var l2 := g6; + + g1.g2.p1 := 0xDEAD; /* p1 kein feld */ +end; diff --git a/gesamt/ag_snafu_10.3 b/gesamt/ag_snafu_10.3 new file mode 100644 index 0000000..fa7e897 --- /dev/null +++ b/gesamt/ag_snafu_10.3 @@ -0,0 +1,9 @@ +struct g1 g2 g3 g4 end; +struct g5 g6 end; + +method foo(p1 p2 p3) + var l1 := 0; + var l2 := g6; + + g1.l2.g2 := 0xDEAD; /* l2 kein feld */ +end; diff --git a/gesamt/ag_snafu_11.3 b/gesamt/ag_snafu_11.3 new file mode 100644 index 0000000..6456a50 --- /dev/null +++ b/gesamt/ag_snafu_11.3 @@ -0,0 +1,9 @@ +struct g1 g2 g3 g4 end; +struct g5 g6 end; + +method foo(p1 p2 p3) + var l1 := 0; + var l2 := g6; + + g1.p3.g6:= 0xDEAD; /* p3 kein feld */ +end; diff --git a/gesamt/ag_torotil_01.3 b/gesamt/ag_torotil_01.3 new file mode 100644 index 0000000..84d6480 --- /dev/null +++ b/gesamt/ag_torotil_01.3 @@ -0,0 +1,9 @@ +struct + one struct_not defined +end; + +method main(a b) + var something := 0x42; + var the := 0x42; + the.one.missing_struct := something; +end; diff --git a/gesamt/ag_zzbsm17_01.3 b/gesamt/ag_zzbsm17_01.3 new file mode 100644 index 0000000..7ce046a --- /dev/null +++ b/gesamt/ag_zzbsm17_01.3 @@ -0,0 +1,7 @@ +method foo ( ) + if 1 then + var v1 := 1; + else + v1 := 2; + end; +end; diff --git a/gesamt/ag_zzbsm17_02.3 b/gesamt/ag_zzbsm17_02.3 new file mode 100644 index 0000000..791203d --- /dev/null +++ b/gesamt/ag_zzbsm17_02.3 @@ -0,0 +1,3 @@ +method foo ( p1 ) + var p1 := 1; +end; diff --git a/gesamt/ag_zzbsm17_03.3 b/gesamt/ag_zzbsm17_03.3 new file mode 100644 index 0000000..23be7ba --- /dev/null +++ b/gesamt/ag_zzbsm17_03.3 @@ -0,0 +1,7 @@ +method foo ( ) + if 1 then + var v1 := 1; + end; + + return v1; +end; diff --git a/gesamt/ag_zzbsm17_04.3 b/gesamt/ag_zzbsm17_04.3 new file mode 100644 index 0000000..5b021fc --- /dev/null +++ b/gesamt/ag_zzbsm17_04.3 @@ -0,0 +1,5 @@ +method foo ( ) + v1 := 1; + var v1 := 1; + return v1; +end; diff --git a/gesamt/ag_zzbsm17_06.3 b/gesamt/ag_zzbsm17_06.3 new file mode 100644 index 0000000..6d17fd3 --- /dev/null +++ b/gesamt/ag_zzbsm17_06.3 @@ -0,0 +1,16 @@ +struct f1 end; + +method foo ( ) + + var v1 := 1; + + /* Bei einem Variablen/Feldzugriff muss eine Variable oder ein Feld mit dem Namen sichtbar sein */ + f1 := f1; + v1 := v1; + + /* Bei einem Feldzugriff muss ein Feld mit dem Namen sichtbar sein */ + this.f1 := this.f1; + this.v1 := this.v1; + + return v1; +end; diff --git a/gesamt/codea_intelli_00.0 b/gesamt/codea_intelli_00.0 new file mode 100644 index 0000000..526ed51 --- /dev/null +++ b/gesamt/codea_intelli_00.0 @@ -0,0 +1,8 @@ +method f(a b c) + return (a*5) - (b*c) - this; +end; + +/*verschachtelte mult*/ +method g(a b) + return (a * (b * (-4))) - this; +end; diff --git a/gesamt/codea_intelli_00.call b/gesamt/codea_intelli_00.call new file mode 100644 index 0000000..5008bf5 --- /dev/null +++ b/gesamt/codea_intelli_00.call @@ -0,0 +1,4 @@ +long f(long, long, long, long); +long g(long, long, long); + +RET(f(1, 100, 10, 5)==449 && g(5, -2, 7) == 51); diff --git a/gesamt/codea_intelli_00.instr b/gesamt/codea_intelli_00.instr new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/gesamt/codea_intelli_00.instr @@ -0,0 +1 @@ +10 diff --git a/gesamt/codea_intelli_01.0 b/gesamt/codea_intelli_01.0 new file mode 100644 index 0000000..f0da467 --- /dev/null +++ b/gesamt/codea_intelli_01.0 @@ -0,0 +1,3 @@ +method f(a) + return (a*a) * (2-3) * this * (3 * (2-3)); +end; diff --git a/gesamt/codea_intelli_01.call b/gesamt/codea_intelli_01.call new file mode 100644 index 0000000..f9bb040 --- /dev/null +++ b/gesamt/codea_intelli_01.call @@ -0,0 +1,9 @@ +long f(long, long); + + + + + +RET(f(9, 15) == 6075); + + diff --git a/gesamt/codea_intelli_01.instr b/gesamt/codea_intelli_01.instr new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/gesamt/codea_intelli_01.instr @@ -0,0 +1 @@ +5 diff --git a/gesamt/codea_intelli_02.0 b/gesamt/codea_intelli_02.0 new file mode 100644 index 0000000..2741b2a --- /dev/null +++ b/gesamt/codea_intelli_02.0 @@ -0,0 +1,3 @@ +method f(a b) + return ((this or 2) or (a or b)) - 10; +end; \ No newline at end of file diff --git a/gesamt/codea_intelli_02.call b/gesamt/codea_intelli_02.call new file mode 100644 index 0000000..90c4be2 --- /dev/null +++ b/gesamt/codea_intelli_02.call @@ -0,0 +1,4 @@ +long f(long, long, long); + +RET(f(1, 8, 16) == 17); + diff --git a/gesamt/codea_intelli_02.instr b/gesamt/codea_intelli_02.instr new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/gesamt/codea_intelli_02.instr @@ -0,0 +1 @@ +7 diff --git a/gesamt/codea_intelli_03.0 b/gesamt/codea_intelli_03.0 new file mode 100644 index 0000000..2cb9197 --- /dev/null +++ b/gesamt/codea_intelli_03.0 @@ -0,0 +1,4 @@ +method f(a b c) + return (a < (b < c)) * this; +end; + diff --git a/gesamt/codea_intelli_03.call b/gesamt/codea_intelli_03.call new file mode 100644 index 0000000..961b937 --- /dev/null +++ b/gesamt/codea_intelli_03.call @@ -0,0 +1,7 @@ +long f(long, long, long, long); + + +RET(f(3, -2, 0, 15) == 3); + + + diff --git a/gesamt/codea_intelli_03.instr b/gesamt/codea_intelli_03.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codea_intelli_03.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codea_intelli_04.0 b/gesamt/codea_intelli_04.0 new file mode 100644 index 0000000..170550d --- /dev/null +++ b/gesamt/codea_intelli_04.0 @@ -0,0 +1,3 @@ +method g(a b) + return a = b; +end; diff --git a/gesamt/codea_intelli_04.call b/gesamt/codea_intelli_04.call new file mode 100644 index 0000000..8e6894c --- /dev/null +++ b/gesamt/codea_intelli_04.call @@ -0,0 +1,3 @@ +long g(long, long, long); + +RET(g(0, -2, -2) == 1 && g(0, 1, 3) == 0); diff --git a/gesamt/codea_intelli_04.instr b/gesamt/codea_intelli_04.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codea_intelli_04.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codea_intelli_05.0 b/gesamt/codea_intelli_05.0 new file mode 100644 index 0000000..a072dd1 --- /dev/null +++ b/gesamt/codea_intelli_05.0 @@ -0,0 +1,11 @@ +struct x y z b end; + +method f(a b) + return b; +end; + +struct u v end; + +method g(a) + return u * a.v; +end; diff --git a/gesamt/codea_intelli_05.call b/gesamt/codea_intelli_05.call new file mode 100644 index 0000000..6e296ea --- /dev/null +++ b/gesamt/codea_intelli_05.call @@ -0,0 +1,13 @@ +extern long long f(long long*, long long*, long long); +extern long long g(long long*, long long*); + + +long long ar[10]; +long long ar2[10]; +int i = 1; +for(; i <= 10; i++) + ar[i-1] = i; +for (i = 1; i <= 10; i++) + ar2[i-1] = i * 10; + +RET(f(ar, ar, 4711) == 4711 && g(ar, ar2) == 20); diff --git a/gesamt/codea_intelli_05.instr b/gesamt/codea_intelli_05.instr new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/gesamt/codea_intelli_05.instr @@ -0,0 +1 @@ +5 diff --git a/gesamt/codea_intelli_06.0 b/gesamt/codea_intelli_06.0 new file mode 100644 index 0000000..62d9d7e --- /dev/null +++ b/gesamt/codea_intelli_06.0 @@ -0,0 +1,5 @@ +struct x y z end; + +method f() + return (x - y) * z; +end; diff --git a/gesamt/codea_intelli_06.call b/gesamt/codea_intelli_06.call new file mode 100644 index 0000000..42435f0 --- /dev/null +++ b/gesamt/codea_intelli_06.call @@ -0,0 +1,9 @@ +extern long long f(long long*); + + +long long ar[10]; +int i = 1; +for(; i <= 10; i++) + ar[i-1] = i; + +RET(f(ar) == -3); diff --git a/gesamt/codea_intelli_06.instr b/gesamt/codea_intelli_06.instr new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/gesamt/codea_intelli_06.instr @@ -0,0 +1 @@ +4 diff --git a/gesamt/codea_intelli_07.0 b/gesamt/codea_intelli_07.0 new file mode 100644 index 0000000..0394e3c --- /dev/null +++ b/gesamt/codea_intelli_07.0 @@ -0,0 +1,5 @@ +struct x y z end; + +method f(a) + return (a - (-3*8)).y; +end; diff --git a/gesamt/codea_intelli_07.call b/gesamt/codea_intelli_07.call new file mode 100644 index 0000000..1c49d3f --- /dev/null +++ b/gesamt/codea_intelli_07.call @@ -0,0 +1,8 @@ +extern long long f(long long*, long long*); + +long long ar[10]; +int i = 1; +for(; i <= 10; i++) + ar[i-1] = i; + +RET(f(ar, ar) == 5); diff --git a/gesamt/codea_intelli_07.instr b/gesamt/codea_intelli_07.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_intelli_07.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_intelli_08.0 b/gesamt/codea_intelli_08.0 new file mode 100644 index 0000000..ca5e813 --- /dev/null +++ b/gesamt/codea_intelli_08.0 @@ -0,0 +1,5 @@ +struct x y z end; + +method f(a) + return a.y - a.x - a.z; +end; diff --git a/gesamt/codea_intelli_08.call b/gesamt/codea_intelli_08.call new file mode 100644 index 0000000..2153dc3 --- /dev/null +++ b/gesamt/codea_intelli_08.call @@ -0,0 +1,8 @@ +extern long long f(long long*, long long*); + +long long ar[10]; +int i = 1; +for(; i <= 10; i++) + ar[i-1] = i; + +RET(f(ar, ar) == -2); diff --git a/gesamt/codea_intelli_08.instr b/gesamt/codea_intelli_08.instr new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/gesamt/codea_intelli_08.instr @@ -0,0 +1 @@ +4 diff --git a/gesamt/codea_lewurm_00.0 b/gesamt/codea_lewurm_00.0 new file mode 100644 index 0000000..297740c --- /dev/null +++ b/gesamt/codea_lewurm_00.0 @@ -0,0 +1,3 @@ +method f(a b c) + return (a-5) - (b-c) - this; +end; diff --git a/gesamt/codea_lewurm_00.call b/gesamt/codea_lewurm_00.call new file mode 100644 index 0000000..d32445c --- /dev/null +++ b/gesamt/codea_lewurm_00.call @@ -0,0 +1,3 @@ +long f(long, long, long, long); + +RET(f(1, 100, 10, 5) == 89); diff --git a/gesamt/codea_lewurm_00.instr b/gesamt/codea_lewurm_00.instr new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/gesamt/codea_lewurm_00.instr @@ -0,0 +1 @@ +5 diff --git a/gesamt/codea_lewurm_01.0 b/gesamt/codea_lewurm_01.0 new file mode 100644 index 0000000..c6fd5ac --- /dev/null +++ b/gesamt/codea_lewurm_01.0 @@ -0,0 +1,3 @@ +method f(x) + return x; +end; diff --git a/gesamt/codea_lewurm_01.call b/gesamt/codea_lewurm_01.call new file mode 100644 index 0000000..7102d60 --- /dev/null +++ b/gesamt/codea_lewurm_01.call @@ -0,0 +1,2 @@ +extern long f(long, long); +RET((f(0xDEAD, 5)==5) && (f(0xDEAD, -3)==-3)); diff --git a/gesamt/codea_lewurm_01.instr b/gesamt/codea_lewurm_01.instr new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/gesamt/codea_lewurm_01.instr @@ -0,0 +1 @@ +4 diff --git a/gesamt/codea_lewurm_02.0 b/gesamt/codea_lewurm_02.0 new file mode 100644 index 0000000..10a2205 --- /dev/null +++ b/gesamt/codea_lewurm_02.0 @@ -0,0 +1,3 @@ +method f(a b c d) + return this-(a-b-c-d); +end; diff --git a/gesamt/codea_lewurm_02.call b/gesamt/codea_lewurm_02.call new file mode 100644 index 0000000..2dcfbe9 --- /dev/null +++ b/gesamt/codea_lewurm_02.call @@ -0,0 +1,2 @@ +extern long f(long,long,long,long,long); +RET(f(100,50,15,10,5)==80); diff --git a/gesamt/codea_lewurm_02.instr b/gesamt/codea_lewurm_02.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_lewurm_02.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_lewurm_03.0 b/gesamt/codea_lewurm_03.0 new file mode 100644 index 0000000..33170d8 --- /dev/null +++ b/gesamt/codea_lewurm_03.0 @@ -0,0 +1,3 @@ +method f() + return this; +end; diff --git a/gesamt/codea_lewurm_03.call b/gesamt/codea_lewurm_03.call new file mode 100644 index 0000000..aba4bb3 --- /dev/null +++ b/gesamt/codea_lewurm_03.call @@ -0,0 +1,2 @@ +extern long f(long); +RET(f(-1337)==-1337); diff --git a/gesamt/codea_lewurm_03.instr b/gesamt/codea_lewurm_03.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_lewurm_03.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_lewurm_04.0 b/gesamt/codea_lewurm_04.0 new file mode 100644 index 0000000..b43a1a7 --- /dev/null +++ b/gesamt/codea_lewurm_04.0 @@ -0,0 +1,3 @@ +method f() + return 666-this; +end; diff --git a/gesamt/codea_lewurm_04.call b/gesamt/codea_lewurm_04.call new file mode 100644 index 0000000..bc992d7 --- /dev/null +++ b/gesamt/codea_lewurm_04.call @@ -0,0 +1,2 @@ +extern long f(long); +RET(f(111)==555); diff --git a/gesamt/codea_lewurm_04.instr b/gesamt/codea_lewurm_04.instr new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/gesamt/codea_lewurm_04.instr @@ -0,0 +1 @@ +3 diff --git a/gesamt/codea_lewurm_05.0 b/gesamt/codea_lewurm_05.0 new file mode 100644 index 0000000..a14beea --- /dev/null +++ b/gesamt/codea_lewurm_05.0 @@ -0,0 +1,3 @@ +method Long(a b c d e) + return e - d - c - b - a - this; +end; diff --git a/gesamt/codea_lewurm_05.call b/gesamt/codea_lewurm_05.call new file mode 100644 index 0000000..d791072 --- /dev/null +++ b/gesamt/codea_lewurm_05.call @@ -0,0 +1,3 @@ +long Long(long, long, long, long, long, long); + +RET( Long(2, 6, 12, 25, 50, 100) == 5); diff --git a/gesamt/codea_lewurm_05.instr b/gesamt/codea_lewurm_05.instr new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/gesamt/codea_lewurm_05.instr @@ -0,0 +1 @@ +7 diff --git a/gesamt/codea_lewurm_06.0 b/gesamt/codea_lewurm_06.0 new file mode 100644 index 0000000..83e538d --- /dev/null +++ b/gesamt/codea_lewurm_06.0 @@ -0,0 +1,3 @@ +method f(a b) + return a - ( b * -1 * a * -1 * b * -1 * -4 ); +end; diff --git a/gesamt/codea_lewurm_06.call b/gesamt/codea_lewurm_06.call new file mode 100644 index 0000000..26ffaf9 --- /dev/null +++ b/gesamt/codea_lewurm_06.call @@ -0,0 +1,2 @@ +long f(long, long, long); +RET(f(0xCAFEBABE, 20, 10)==-7980); diff --git a/gesamt/codea_lewurm_06.instr b/gesamt/codea_lewurm_06.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codea_lewurm_06.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codea_lewurm_07.0 b/gesamt/codea_lewurm_07.0 new file mode 100644 index 0000000..156ef51 --- /dev/null +++ b/gesamt/codea_lewurm_07.0 @@ -0,0 +1,19 @@ +method w(a) + return this < a; +end; + +method x() + return this < 3; +end; + +method y() + return 3 < this; +end; + +method z() + return 3 < 3; +end; + +method override() + return 0x55555; +end; diff --git a/gesamt/codea_lewurm_07.call b/gesamt/codea_lewurm_07.call new file mode 100644 index 0000000..5df2bd6 --- /dev/null +++ b/gesamt/codea_lewurm_07.call @@ -0,0 +1,7 @@ +long w(long,long); +long x(long); +long y(long); +long z(long); +long override(long); + +RET(w(20,30)==1 && override(0x1)==0x55555 && w(30,20)==0 && override(1)==0x55555 && x(400)==0 && override(0x1)==0x55555 && y(400)==1 && override(0x1)==0x55555 && z(400)==0 && override(0x1)==0x55555); diff --git a/gesamt/codea_lewurm_07.instr b/gesamt/codea_lewurm_07.instr new file mode 100644 index 0000000..9902f17 --- /dev/null +++ b/gesamt/codea_lewurm_07.instr @@ -0,0 +1 @@ +28 diff --git a/gesamt/codea_lewurm_08.0 b/gesamt/codea_lewurm_08.0 new file mode 100644 index 0000000..69e5dd9 --- /dev/null +++ b/gesamt/codea_lewurm_08.0 @@ -0,0 +1,19 @@ +method w(a) + return this = a; +end; + +method x() + return this = 3; +end; + +method y() + return 3 = this; +end; + +method z() + return -13 = -13; +end; + +method override() + return 0x55555; +end; diff --git a/gesamt/codea_lewurm_08.call b/gesamt/codea_lewurm_08.call new file mode 100644 index 0000000..e1de119 --- /dev/null +++ b/gesamt/codea_lewurm_08.call @@ -0,0 +1,7 @@ +long w(long,long); +long x(long); +long y(long); +long z(long); +long override(long); + +RET(w(30,30)==1 && override(0x1)==0x55555 && w(30,20)==0 && override(1)==0x55555 && x(400)==0 && override(0x1)==0x55555 && y(3)==1 && override(0x1)==0x55555 && z(400)==1 && override(0x1)==0x55555); diff --git a/gesamt/codea_lewurm_08.instr b/gesamt/codea_lewurm_08.instr new file mode 100644 index 0000000..9902f17 --- /dev/null +++ b/gesamt/codea_lewurm_08.instr @@ -0,0 +1 @@ +28 diff --git a/gesamt/codea_lewurm_09.0 b/gesamt/codea_lewurm_09.0 new file mode 100644 index 0000000..b42b238 --- /dev/null +++ b/gesamt/codea_lewurm_09.0 @@ -0,0 +1,12 @@ +struct j k l end; +method w() + return this.k; +end; + +method x() + return l; +end; + +method y() + return (this-8).k; +end; diff --git a/gesamt/codea_lewurm_09.call b/gesamt/codea_lewurm_09.call new file mode 100644 index 0000000..c16667e --- /dev/null +++ b/gesamt/codea_lewurm_09.call @@ -0,0 +1,6 @@ +long w(long); +long x(long); +long y(long); + +long t[3] = {5,6,7}; +RET(w((long)t)==6 && x((long)t)==7 && y((long)t)==5); diff --git a/gesamt/codea_lewurm_09.instr b/gesamt/codea_lewurm_09.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_lewurm_09.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_lewurm_10.0 b/gesamt/codea_lewurm_10.0 new file mode 100644 index 0000000..b8ed559 --- /dev/null +++ b/gesamt/codea_lewurm_10.0 @@ -0,0 +1,11 @@ +method w() + return not this; +end; + +method x() + return not (not this); +end; + +method y() + return not (not (not this)); +end; diff --git a/gesamt/codea_lewurm_10.call b/gesamt/codea_lewurm_10.call new file mode 100644 index 0000000..fff444f --- /dev/null +++ b/gesamt/codea_lewurm_10.call @@ -0,0 +1,5 @@ +long w(long); +long x(long); +long y(long); + +RET(w(0)==1 && x(0)==0 && y(1)==0); diff --git a/gesamt/codea_lewurm_10.instr b/gesamt/codea_lewurm_10.instr new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/gesamt/codea_lewurm_10.instr @@ -0,0 +1 @@ +12 diff --git a/gesamt/codea_lewurm_11.0 b/gesamt/codea_lewurm_11.0 new file mode 100644 index 0000000..ac14b1a --- /dev/null +++ b/gesamt/codea_lewurm_11.0 @@ -0,0 +1,13 @@ +struct a b c end; + +method try0() + return 0x00100000.c; +end; + +method try1() + return 0x01000000.c; +end; + +method try2() + return 0xA0000000.c; +end; diff --git a/gesamt/codea_lewurm_11.call b/gesamt/codea_lewurm_11.call new file mode 100644 index 0000000..067edca --- /dev/null +++ b/gesamt/codea_lewurm_11.call @@ -0,0 +1,46 @@ +#define TRIES 3 + +/* ugly. copied from 'bits/mman.h' */ +#define PROT_READ 0x1 +#define PROT_WRITE 0x2 +#define MAP_PRIVATE 0x02 +#define MAP_FIXED 0x10 +#define MAP_ANONYMOUS 0x20 + +void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); + +long try0(long); +long try1(long); +long try2(long); + +/* try these adresses until one is free */ +long *tries[TRIES] = { + (long *)0x00100000, + (long *)0x01000000, + (long *)0xA0000000 +}; + +int t = 0; +long *addr = NULL; + +for (t = 0; t < TRIES; t++) { + addr = mmap(tries[t], 4096, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); + + if (tries[t] == addr) + break; +} + +if ((void *)-1 == addr) { + puts("unable to map memory"); + RET(1); /* keep the statistic clean */ +} + +addr[2] = 1337; + +switch (t) { +case 0: RET(try0(0xcafebabe) == 1337); +case 1: RET(try1(0xcafebabe) == 1337); +case 2: RET(try2(0xcafebabe) == 1337); +} + diff --git a/gesamt/codea_lewurm_11.instr b/gesamt/codea_lewurm_11.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_lewurm_11.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_lewurm_12.0 b/gesamt/codea_lewurm_12.0 new file mode 100644 index 0000000..78f2b1c --- /dev/null +++ b/gesamt/codea_lewurm_12.0 @@ -0,0 +1,12 @@ +method f1() + return (this*2*3)*1; +end; +method f2() + return (this)*1; +end; +method f3() + return this*1; +end; +method f4() + return (this*1)*(this*1)*1; +end; diff --git a/gesamt/codea_lewurm_12.call b/gesamt/codea_lewurm_12.call new file mode 100644 index 0000000..e8615de --- /dev/null +++ b/gesamt/codea_lewurm_12.call @@ -0,0 +1,7 @@ +long f1(long); +long f2(long); +long f3(long); +long f4(long); +RET((f1(4) == 24) && + (f2(4) == 4) && + (f3(4) == 4)); diff --git a/gesamt/codea_lewurm_12.instr b/gesamt/codea_lewurm_12.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_lewurm_12.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_lewurm_13.0 b/gesamt/codea_lewurm_13.0 new file mode 100644 index 0000000..a190acd --- /dev/null +++ b/gesamt/codea_lewurm_13.0 @@ -0,0 +1,9 @@ +method f1() + return (this-0-0)-0-0-6; +end; +method f2() + return (this)-0; +end; +method f3() + return this-0; +end; diff --git a/gesamt/codea_lewurm_13.call b/gesamt/codea_lewurm_13.call new file mode 100644 index 0000000..f1a4291 --- /dev/null +++ b/gesamt/codea_lewurm_13.call @@ -0,0 +1,6 @@ +long f1(long); +long f2(long); +long f3(long); +RET((f1(4) == -2) && + (f2(4) == 4) && + (f3(4) == 4)); diff --git a/gesamt/codea_lewurm_13.instr b/gesamt/codea_lewurm_13.instr new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/gesamt/codea_lewurm_13.instr @@ -0,0 +1 @@ +7 diff --git a/gesamt/codea_lewurm_14.0 b/gesamt/codea_lewurm_14.0 new file mode 100644 index 0000000..83e59da --- /dev/null +++ b/gesamt/codea_lewurm_14.0 @@ -0,0 +1,21 @@ +struct foo bar end; + +method f1(a b) + return a.foo * 5; +end; + +method f2(a b) + return b.foo - (100 - a.foo); +end; + +method f3(a b) + return b.foo - (100 - 50 - a.foo); +end; + +method f4(a b) + return a.foo * a.bar; +end; + +method f5(a b) + return b.foo - (100 - a.foo - b.foo); +end; diff --git a/gesamt/codea_lewurm_14.call b/gesamt/codea_lewurm_14.call new file mode 100644 index 0000000..7288b0a --- /dev/null +++ b/gesamt/codea_lewurm_14.call @@ -0,0 +1,15 @@ +long f1(long, long*, long*); +long f2(long, long*, long*); +long f3(long, long*, long*); +long f4(long, long*, long*); +long f5(long, long*, long*); + +long muh[] = {0x05f05f, 0x223344}; +long kuh[] = {0x00AACC, 0x563425}; + +RET(f1(0, muh, kuh) == muh[0] * 5 && + f2(0, muh, kuh) == kuh[0] - (100 - muh[0]) && + f3(0, muh, kuh) == kuh[0] - (100 - 50 - muh[0]) && + f5(0, muh, kuh) == kuh[0] - (100 - muh[0] - kuh[0]) && + f4(0, muh, kuh) == muh[0] * muh[1] + ); diff --git a/gesamt/codea_lewurm_14.instr b/gesamt/codea_lewurm_14.instr new file mode 100644 index 0000000..aabe6ec --- /dev/null +++ b/gesamt/codea_lewurm_14.instr @@ -0,0 +1 @@ +21 diff --git a/gesamt/codea_mrstrcmp_00.0 b/gesamt/codea_mrstrcmp_00.0 new file mode 100644 index 0000000..ce70add --- /dev/null +++ b/gesamt/codea_mrstrcmp_00.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return u; +end; + diff --git a/gesamt/codea_mrstrcmp_00.call b/gesamt/codea_mrstrcmp_00.call new file mode 100644 index 0000000..95aa118 --- /dev/null +++ b/gesamt/codea_mrstrcmp_00.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(v, NULL) == v[0]); + diff --git a/gesamt/codea_mrstrcmp_00.instr b/gesamt/codea_mrstrcmp_00.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_00.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_01.0 b/gesamt/codea_mrstrcmp_01.0 new file mode 100644 index 0000000..6892b27 --- /dev/null +++ b/gesamt/codea_mrstrcmp_01.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return this.u; +end; + diff --git a/gesamt/codea_mrstrcmp_01.call b/gesamt/codea_mrstrcmp_01.call new file mode 100644 index 0000000..95aa118 --- /dev/null +++ b/gesamt/codea_mrstrcmp_01.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(v, NULL) == v[0]); + diff --git a/gesamt/codea_mrstrcmp_01.instr b/gesamt/codea_mrstrcmp_01.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_01.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_02.0 b/gesamt/codea_mrstrcmp_02.0 new file mode 100644 index 0000000..1c4c7f2 --- /dev/null +++ b/gesamt/codea_mrstrcmp_02.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return v; +end; + diff --git a/gesamt/codea_mrstrcmp_02.call b/gesamt/codea_mrstrcmp_02.call new file mode 100644 index 0000000..c57834a --- /dev/null +++ b/gesamt/codea_mrstrcmp_02.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(v, NULL) == v[1]); + diff --git a/gesamt/codea_mrstrcmp_02.instr b/gesamt/codea_mrstrcmp_02.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_02.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_03.0 b/gesamt/codea_mrstrcmp_03.0 new file mode 100644 index 0000000..ac311d3 --- /dev/null +++ b/gesamt/codea_mrstrcmp_03.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return w; +end; + diff --git a/gesamt/codea_mrstrcmp_03.call b/gesamt/codea_mrstrcmp_03.call new file mode 100644 index 0000000..227a120 --- /dev/null +++ b/gesamt/codea_mrstrcmp_03.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(v, NULL) == v[2]); + diff --git a/gesamt/codea_mrstrcmp_03.instr b/gesamt/codea_mrstrcmp_03.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_03.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_04.0 b/gesamt/codea_mrstrcmp_04.0 new file mode 100644 index 0000000..c600cab --- /dev/null +++ b/gesamt/codea_mrstrcmp_04.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return x; +end; + diff --git a/gesamt/codea_mrstrcmp_04.call b/gesamt/codea_mrstrcmp_04.call new file mode 100644 index 0000000..685043f --- /dev/null +++ b/gesamt/codea_mrstrcmp_04.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(v, NULL) == v[3]); + diff --git a/gesamt/codea_mrstrcmp_04.instr b/gesamt/codea_mrstrcmp_04.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_04.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_05.0 b/gesamt/codea_mrstrcmp_05.0 new file mode 100644 index 0000000..ad12c0b --- /dev/null +++ b/gesamt/codea_mrstrcmp_05.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return this.x; +end; + diff --git a/gesamt/codea_mrstrcmp_05.call b/gesamt/codea_mrstrcmp_05.call new file mode 100644 index 0000000..685043f --- /dev/null +++ b/gesamt/codea_mrstrcmp_05.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(v, NULL) == v[3]); + diff --git a/gesamt/codea_mrstrcmp_05.instr b/gesamt/codea_mrstrcmp_05.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_05.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_06.0 b/gesamt/codea_mrstrcmp_06.0 new file mode 100644 index 0000000..112dc7a --- /dev/null +++ b/gesamt/codea_mrstrcmp_06.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return a.v; +end; + diff --git a/gesamt/codea_mrstrcmp_06.call b/gesamt/codea_mrstrcmp_06.call new file mode 100644 index 0000000..fec17fd --- /dev/null +++ b/gesamt/codea_mrstrcmp_06.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(NULL, v) == v[1]); + diff --git a/gesamt/codea_mrstrcmp_06.instr b/gesamt/codea_mrstrcmp_06.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_06.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_07.0 b/gesamt/codea_mrstrcmp_07.0 new file mode 100644 index 0000000..59fefe2 --- /dev/null +++ b/gesamt/codea_mrstrcmp_07.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return a.w; +end; + diff --git a/gesamt/codea_mrstrcmp_07.call b/gesamt/codea_mrstrcmp_07.call new file mode 100644 index 0000000..8b9f053 --- /dev/null +++ b/gesamt/codea_mrstrcmp_07.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(NULL, v) == v[2]); + diff --git a/gesamt/codea_mrstrcmp_07.instr b/gesamt/codea_mrstrcmp_07.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_07.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_08.0 b/gesamt/codea_mrstrcmp_08.0 new file mode 100644 index 0000000..63d2815 --- /dev/null +++ b/gesamt/codea_mrstrcmp_08.0 @@ -0,0 +1,8 @@ +struct + u v w x y z +end; + +method f(a) + return (a - (-8 * 4) ).v; +end; + diff --git a/gesamt/codea_mrstrcmp_08.call b/gesamt/codea_mrstrcmp_08.call new file mode 100644 index 0000000..ee3ad06 --- /dev/null +++ b/gesamt/codea_mrstrcmp_08.call @@ -0,0 +1,6 @@ +long f(long *, long *); + +long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; + +RET(f(NULL, v) == v[5]); + diff --git a/gesamt/codea_mrstrcmp_08.instr b/gesamt/codea_mrstrcmp_08.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_mrstrcmp_08.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_mrstrcmp_09.0 b/gesamt/codea_mrstrcmp_09.0 new file mode 100644 index 0000000..cc32430 --- /dev/null +++ b/gesamt/codea_mrstrcmp_09.0 @@ -0,0 +1,3 @@ +method f(a b) + return a - b; +end; diff --git a/gesamt/codea_mrstrcmp_09.call b/gesamt/codea_mrstrcmp_09.call new file mode 100644 index 0000000..27d2e6f --- /dev/null +++ b/gesamt/codea_mrstrcmp_09.call @@ -0,0 +1,4 @@ +long f(long, long, long); + +RET(f(0, 20, 10) == 10 && + f(0, 10, 20) == -10); diff --git a/gesamt/codea_mrstrcmp_09.instr b/gesamt/codea_mrstrcmp_09.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_mrstrcmp_09.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_mrstrcmp_10.0 b/gesamt/codea_mrstrcmp_10.0 new file mode 100644 index 0000000..f01fa2b --- /dev/null +++ b/gesamt/codea_mrstrcmp_10.0 @@ -0,0 +1,3 @@ +method f(a b) + return 20 - b; +end; diff --git a/gesamt/codea_mrstrcmp_10.call b/gesamt/codea_mrstrcmp_10.call new file mode 100644 index 0000000..0b6c75e --- /dev/null +++ b/gesamt/codea_mrstrcmp_10.call @@ -0,0 +1,5 @@ +long f(long, long, long); + +RET(f(0, 0, 10) == 10 && + f(0, 0, 20) == 0 && + f(0, 0, 30) == -10); diff --git a/gesamt/codea_mrstrcmp_10.instr b/gesamt/codea_mrstrcmp_10.instr new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/gesamt/codea_mrstrcmp_10.instr @@ -0,0 +1 @@ +9 diff --git a/gesamt/codea_mrstrcmp_11.0 b/gesamt/codea_mrstrcmp_11.0 new file mode 100644 index 0000000..0beb6dc --- /dev/null +++ b/gesamt/codea_mrstrcmp_11.0 @@ -0,0 +1,3 @@ +method f(a b) + return b - 20; +end; diff --git a/gesamt/codea_mrstrcmp_11.call b/gesamt/codea_mrstrcmp_11.call new file mode 100644 index 0000000..995bbed --- /dev/null +++ b/gesamt/codea_mrstrcmp_11.call @@ -0,0 +1,5 @@ +long f(long, long, long); + +RET(f(0, 0, 10) == -10 && + f(0, 0, 20) == 0 && + f(0, 0, 30) == 10); diff --git a/gesamt/codea_mrstrcmp_11.instr b/gesamt/codea_mrstrcmp_11.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_mrstrcmp_11.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_mrstrcmp_12.0 b/gesamt/codea_mrstrcmp_12.0 new file mode 100644 index 0000000..3104add --- /dev/null +++ b/gesamt/codea_mrstrcmp_12.0 @@ -0,0 +1,3 @@ +method f(a b) + return a - (10 - b) - 20; +end; diff --git a/gesamt/codea_mrstrcmp_12.call b/gesamt/codea_mrstrcmp_12.call new file mode 100644 index 0000000..ff29661 --- /dev/null +++ b/gesamt/codea_mrstrcmp_12.call @@ -0,0 +1,5 @@ +long f(long, long, long); + +RET(f(0, 10, 20) == (10 - (10 - 20) - 20) && + f(0, 40, 20) == (40 - (10 - 20) - 20) && + f(0, 0, 30) == ( 0 - (10 - 30) - 20)); diff --git a/gesamt/codea_mrstrcmp_12.instr b/gesamt/codea_mrstrcmp_12.instr new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/gesamt/codea_mrstrcmp_12.instr @@ -0,0 +1 @@ +15 diff --git a/gesamt/codea_mrstrcmp_13.0 b/gesamt/codea_mrstrcmp_13.0 new file mode 100644 index 0000000..84dfd8c --- /dev/null +++ b/gesamt/codea_mrstrcmp_13.0 @@ -0,0 +1,19 @@ +method f1(a b) + return a - (-1 * b); +end; + +method f2(a b) + return a - (-2 * b); +end; + +method f4(a b) + return a - (-4 * b); +end; + +method f8(a b) + return a - (-8 * b); +end; + +method f(a b c d) + return a - (-8 * (b - (-4 * (c - (-2 * d))))); +end; diff --git a/gesamt/codea_mrstrcmp_13.call b/gesamt/codea_mrstrcmp_13.call new file mode 100644 index 0000000..91ca672 --- /dev/null +++ b/gesamt/codea_mrstrcmp_13.call @@ -0,0 +1,55 @@ +#define F1(a,b) ((long)(a) - (-1UL * (long)(b))) +#define F2(a,b) ((long)(a) - (-2UL * (long)(b))) +#define F4(a,b) ((long)(a) - (-4UL * (long)(b))) +#define F8(a,b) ((long)(a) - (-8UL * (long)(b))) +#define F(a,b,c,d) ((long)(a) - (-8UL * ((long)(b) - (-4UL * ((long)(c) - (-2UL * (long)(d))))))) + +long f1(long, long, long); +long f2(long, long, long); +long f4(long, long, long); +long f8(long, long, long); +long f(long, long, long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f4(0, 3, 20) == F4( 3, 20) && + f4(0, -100, 80) == F4(-100, 80) && + f4(0, 50, -9) == F4( 50, -9) && + f4(0, -77, -50) == F4( -77, -50) && + + f8(0, 3, 20) == F8( 3, 20) && + f8(0, -100, 80) == F8(-100, 80) && + f8(0, 50, -9) == F8( 50, -9) && + f8(0, -77, -50) == F8( -77, -50) && + + f(0, 10, 20, 30, 40) == F( 10, 20, 30, 40) && + f(0, -10, 20, -30, 40) == F(-10, 20, -30, 40) && + f(0, 10, -20, 30, -40) == F( 10, -20, 30, -40) && + f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f4(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F4(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f8(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F8(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f4(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F4(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f8(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F8(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)); + diff --git a/gesamt/codea_mrstrcmp_13.instr b/gesamt/codea_mrstrcmp_13.instr new file mode 100644 index 0000000..900731f --- /dev/null +++ b/gesamt/codea_mrstrcmp_13.instr @@ -0,0 +1 @@ +64 diff --git a/gesamt/codea_mrstrcmp_14.0 b/gesamt/codea_mrstrcmp_14.0 new file mode 100644 index 0000000..0d0c4d5 --- /dev/null +++ b/gesamt/codea_mrstrcmp_14.0 @@ -0,0 +1,19 @@ +method f1(a b) + return a - (b * -1); +end; + +method f2(a b) + return a - (b * -2); +end; + +method f4(a b) + return a - (b * -4); +end; + +method f8(a b) + return a - (b * -8); +end; + +method f(a b c d) + return a - ((b - ((c - (d * -2)) * -4)) * -8); +end; diff --git a/gesamt/codea_mrstrcmp_14.call b/gesamt/codea_mrstrcmp_14.call new file mode 100644 index 0000000..91ca672 --- /dev/null +++ b/gesamt/codea_mrstrcmp_14.call @@ -0,0 +1,55 @@ +#define F1(a,b) ((long)(a) - (-1UL * (long)(b))) +#define F2(a,b) ((long)(a) - (-2UL * (long)(b))) +#define F4(a,b) ((long)(a) - (-4UL * (long)(b))) +#define F8(a,b) ((long)(a) - (-8UL * (long)(b))) +#define F(a,b,c,d) ((long)(a) - (-8UL * ((long)(b) - (-4UL * ((long)(c) - (-2UL * (long)(d))))))) + +long f1(long, long, long); +long f2(long, long, long); +long f4(long, long, long); +long f8(long, long, long); +long f(long, long, long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f4(0, 3, 20) == F4( 3, 20) && + f4(0, -100, 80) == F4(-100, 80) && + f4(0, 50, -9) == F4( 50, -9) && + f4(0, -77, -50) == F4( -77, -50) && + + f8(0, 3, 20) == F8( 3, 20) && + f8(0, -100, 80) == F8(-100, 80) && + f8(0, 50, -9) == F8( 50, -9) && + f8(0, -77, -50) == F8( -77, -50) && + + f(0, 10, 20, 30, 40) == F( 10, 20, 30, 40) && + f(0, -10, 20, -30, 40) == F(-10, 20, -30, 40) && + f(0, 10, -20, 30, -40) == F( 10, -20, 30, -40) && + f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f4(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F4(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f8(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F8(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f4(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F4(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f8(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F8(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)); + diff --git a/gesamt/codea_mrstrcmp_14.instr b/gesamt/codea_mrstrcmp_14.instr new file mode 100644 index 0000000..900731f --- /dev/null +++ b/gesamt/codea_mrstrcmp_14.instr @@ -0,0 +1 @@ +64 diff --git a/gesamt/codea_mrstrcmp_15.0 b/gesamt/codea_mrstrcmp_15.0 new file mode 100644 index 0000000..f175bdc --- /dev/null +++ b/gesamt/codea_mrstrcmp_15.0 @@ -0,0 +1,3 @@ +method f(a b) + return (a or 0x0A) or (0x50 or b); +end; diff --git a/gesamt/codea_mrstrcmp_15.call b/gesamt/codea_mrstrcmp_15.call new file mode 100644 index 0000000..f61301e --- /dev/null +++ b/gesamt/codea_mrstrcmp_15.call @@ -0,0 +1,4 @@ +long f(long, long, long); + +RET(f(0, 0x00, 0x00) == 0x5A); + diff --git a/gesamt/codea_mrstrcmp_15.instr b/gesamt/codea_mrstrcmp_15.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_mrstrcmp_15.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_mrstrcmp_16.0 b/gesamt/codea_mrstrcmp_16.0 new file mode 100644 index 0000000..ec04302 --- /dev/null +++ b/gesamt/codea_mrstrcmp_16.0 @@ -0,0 +1,3 @@ +method f(a b) + return (a = 0x0A) = (0x50 = b); +end; diff --git a/gesamt/codea_mrstrcmp_16.call b/gesamt/codea_mrstrcmp_16.call new file mode 100644 index 0000000..723a087 --- /dev/null +++ b/gesamt/codea_mrstrcmp_16.call @@ -0,0 +1,7 @@ +long f(long, long, long); + +RET(f(0, 0x00, 0x00) == 1 && + f(0, 0x0A, 0xFF) == 0 && + f(0, 0xFF, 0x50) == 0 && + f(0, 0x0A, 0x50) == 1); + diff --git a/gesamt/codea_mrstrcmp_16.instr b/gesamt/codea_mrstrcmp_16.instr new file mode 100644 index 0000000..425151f --- /dev/null +++ b/gesamt/codea_mrstrcmp_16.instr @@ -0,0 +1 @@ +40 diff --git a/gesamt/codea_mrstrcmp_17.0 b/gesamt/codea_mrstrcmp_17.0 new file mode 100644 index 0000000..209c6f5 --- /dev/null +++ b/gesamt/codea_mrstrcmp_17.0 @@ -0,0 +1,16 @@ +method f(a) + return (a < 0x0A); +end; + +method g(a) + return (0x0A < a); +end; + +method h() + return (0x0A < 0x09); +end; + +method i() + return (0x0A < 0x0B); +end; + diff --git a/gesamt/codea_mrstrcmp_17.call b/gesamt/codea_mrstrcmp_17.call new file mode 100644 index 0000000..df80c78 --- /dev/null +++ b/gesamt/codea_mrstrcmp_17.call @@ -0,0 +1,18 @@ +long f(long, long); +long g(long, long); +long h(long); +long i(long); + +RET(f(0, 0x05) == 1 && + f(0, -0x05) == 1 && + f(0, 0x0A) == 0 && + f(0, 0x0B) == 0 && + + g(0, 0x05) == 0 && + g(0, -0x05) == 0 && + g(0, 0x0A) == 0 && + g(0, 0x0B) == 1 && + + h(0) == 0 && + i(0) == 1); + diff --git a/gesamt/codea_mrstrcmp_17.instr b/gesamt/codea_mrstrcmp_17.instr new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/gesamt/codea_mrstrcmp_17.instr @@ -0,0 +1 @@ +36 diff --git a/gesamt/codea_skinner33_00.0 b/gesamt/codea_skinner33_00.0 new file mode 100644 index 0000000..b8ed559 --- /dev/null +++ b/gesamt/codea_skinner33_00.0 @@ -0,0 +1,11 @@ +method w() + return not this; +end; + +method x() + return not (not this); +end; + +method y() + return not (not (not this)); +end; diff --git a/gesamt/codea_skinner33_00.call b/gesamt/codea_skinner33_00.call new file mode 100644 index 0000000..bc046a1 --- /dev/null +++ b/gesamt/codea_skinner33_00.call @@ -0,0 +1,5 @@ +long w(long); +long x(long); +long y(long); + +RET(w(6)==0 && x(4)==1 && y(8)==0 && w(5) == 0 && x(3) == 1 && y(7) == 0 && w(0) == 1 && x(0) == 0 && y(0) == 1); diff --git a/gesamt/codea_skinner33_00.instr b/gesamt/codea_skinner33_00.instr new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/gesamt/codea_skinner33_00.instr @@ -0,0 +1 @@ +36 diff --git a/gesamt/codea_skinner33_01.0 b/gesamt/codea_skinner33_01.0 new file mode 100644 index 0000000..25fab69 --- /dev/null +++ b/gesamt/codea_skinner33_01.0 @@ -0,0 +1,23 @@ +method w() + return not 0; +end; + +method x() + return not (not 0); +end; + +method y() + return not 3; +end; + +method z() + return not (not 3); +end; + +method aa() + return not (not (not 0)); +end; + +method ab() + return not (not (not 3)); +end; diff --git a/gesamt/codea_skinner33_01.call b/gesamt/codea_skinner33_01.call new file mode 100644 index 0000000..af3f291 --- /dev/null +++ b/gesamt/codea_skinner33_01.call @@ -0,0 +1,8 @@ +long w(long); +long x(long); +long y(long); +long z(long); +long aa(long); +long ab(long); + +RET(w(0xDEAD)==1 && x(1337)==0 && y(42)==0 && z(3141) == 1 && aa(0xabc) == 1 && ab(0xdef) == 0); diff --git a/gesamt/codea_skinner33_01.instr b/gesamt/codea_skinner33_01.instr new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/gesamt/codea_skinner33_01.instr @@ -0,0 +1 @@ +12 diff --git a/gesamt/codea_skinner33_02.0 b/gesamt/codea_skinner33_02.0 new file mode 100644 index 0000000..03a1db6 --- /dev/null +++ b/gesamt/codea_skinner33_02.0 @@ -0,0 +1,11 @@ +method w(a) + return not a; +end; + +method x(a) + return not (not a); +end; + +method y(a) + return not (not (not a)); +end; diff --git a/gesamt/codea_skinner33_02.call b/gesamt/codea_skinner33_02.call new file mode 100644 index 0000000..0af1b55 --- /dev/null +++ b/gesamt/codea_skinner33_02.call @@ -0,0 +1,5 @@ +long w(long,long); +long x(long,long); +long y(long,long); + +RET(w(6,6)==0 && x(4,4)==1 && y(8,8)==0 && w(5,5) == 0 && x(3,3) == 1 && y(7,7) == 0 && w(0,0) == 1 && x(0,0) == 0 && y(0,0) == 1); diff --git a/gesamt/codea_skinner33_02.instr b/gesamt/codea_skinner33_02.instr new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/gesamt/codea_skinner33_02.instr @@ -0,0 +1 @@ +36 diff --git a/gesamt/codea_skinner33_03.0 b/gesamt/codea_skinner33_03.0 new file mode 100644 index 0000000..126a981 --- /dev/null +++ b/gesamt/codea_skinner33_03.0 @@ -0,0 +1,13 @@ +struct a b c end; + +method try0() + return (0x000FFFFB - -5).c; +end; + +method try1() + return (0x00FFFFFD - -3).c; +end; + +method try2() + return (0x9FFFFFFB - -5).c; +end; diff --git a/gesamt/codea_skinner33_03.call b/gesamt/codea_skinner33_03.call new file mode 100644 index 0000000..60973c5 --- /dev/null +++ b/gesamt/codea_skinner33_03.call @@ -0,0 +1,48 @@ +#define TRIES 3 + +/* ugly. copied from 'bits/mman.h' */ +#define PROT_READ 0x1 +#define PROT_WRITE 0x2 +#define MAP_PRIVATE 0x02 +#define MAP_FIXED 0x10 +#define MAP_ANONYMOUS 0x20 + +void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); + +long try0(long); +long try1(long); +long try2(long); + +/* try these adresses until one is free */ +long *tries[TRIES] = { + (long *)0x00100000, + (long *)0x01000000, + (long *)0xA0000000 +}; + +int t = 0; +long *addr = NULL; + +for (t = 0; t < TRIES; t++) { + addr = mmap(tries[t], 4096, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); + + if (tries[t] == addr) + break; +} + +if ((void *)-1 == addr) { + puts("unable to map memory"); + RET(1); /* keep the statistic clean */ +} + +addr[2] = 1337; + +printf("try %d\n", t); + +switch (t) { +case 0: RET(try0(0xcafebabe) == 1337); +case 1: RET(try1(0xcafebabe) == 1337); +case 2: RET(try2(0xcafebabe) == 1337); +} + diff --git a/gesamt/codea_skinner33_03.instr b/gesamt/codea_skinner33_03.instr new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/gesamt/codea_skinner33_03.instr @@ -0,0 +1 @@ +2 diff --git a/gesamt/codea_skinner33_04.0 b/gesamt/codea_skinner33_04.0 new file mode 100644 index 0000000..10b8940 --- /dev/null +++ b/gesamt/codea_skinner33_04.0 @@ -0,0 +1,15 @@ +method f1(a b) + return a - (-3 * b); +end; + +method f2(a b) + return a - (2 * b); +end; + +method f3(a b) + return a - (5 * b); +end; + +method f(a b c d) + return a - (8 * (b - (-4 * (c - (-3 * d))))); +end; diff --git a/gesamt/codea_skinner33_04.call b/gesamt/codea_skinner33_04.call new file mode 100644 index 0000000..d83320d --- /dev/null +++ b/gesamt/codea_skinner33_04.call @@ -0,0 +1,50 @@ +#define F1(a,b) ((long)(a) - (-3UL * (long)(b))) +#define F2(a,b) ((long)(a) - (2UL * (long)(b))) +#define F3(a,b) ((long)(a) - (5UL * (long)(b))) +#define F(a,b,c,d) ((long)(a) - (8UL * ((long)(b) - (-4UL * ((long)(c) - (-3UL * (long)(d))))))) + +/* based on mrstrcmp_13 + in our language the lea opts are only possible for -1, -2, -4 and -8 + this testcase tests other constants +*/ + +long f1(long, long, long); +long f2(long, long, long); +long f3(long, long, long); +long f(long, long, long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f3(0, 3, 20) == F3( 3, 20) && + f3(0, -100, 80) == F3(-100, 80) && + f3(0, 50, -9) == F3( 50, -9) && + f3(0, -77, -50) == F3( -77, -50) && + + f(0, 10, 20, 30, 40) == F( 10, 20, 30, 40) && + f(0, -10, 20, -30, 40) == F(-10, 20, -30, 40) && + f(0, 10, -20, 30, -40) == F( 10, -20, 30, -40) && + f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f3(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F3(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f3(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F3(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_04.instr b/gesamt/codea_skinner33_04.instr new file mode 100644 index 0000000..b16e5f7 --- /dev/null +++ b/gesamt/codea_skinner33_04.instr @@ -0,0 +1 @@ +104 diff --git a/gesamt/codea_skinner33_05.0 b/gesamt/codea_skinner33_05.0 new file mode 100644 index 0000000..e680181 --- /dev/null +++ b/gesamt/codea_skinner33_05.0 @@ -0,0 +1,11 @@ +method f1(a b) + return (-3 * b) - a; +end; + +method f2(a b) + return (2 * b) - a; +end; + +method f3(a b) + return (5 * b) - a; +end; diff --git a/gesamt/codea_skinner33_05.call b/gesamt/codea_skinner33_05.call new file mode 100644 index 0000000..5c88f7a --- /dev/null +++ b/gesamt/codea_skinner33_05.call @@ -0,0 +1,43 @@ +#define F1(a,b) ((-3UL * (long)(b)) - (long)(a)) +#define F2(a,b) ((2UL * (long)(b)) - (long)(a)) +#define F3(a,b) ((5UL * (long)(b)) - (long)(a)) + + +/* based on mrstrcmp_13 + this testcase tests an other order of ops where no lea is possible +*/ + +long f1(long, long, long); +long f2(long, long, long); +long f3(long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f3(0, 3, 20) == F3( 3, 20) && + f3(0, -100, 80) == F3(-100, 80) && + f3(0, 50, -9) == F3( 50, -9) && + f3(0, -77, -50) == F3( -77, -50) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f3(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F3(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f3(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F3(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_05.instr b/gesamt/codea_skinner33_05.instr new file mode 100644 index 0000000..fb1e7bc --- /dev/null +++ b/gesamt/codea_skinner33_05.instr @@ -0,0 +1 @@ +54 diff --git a/gesamt/codea_skinner33_06.0 b/gesamt/codea_skinner33_06.0 new file mode 100644 index 0000000..cc943e1 --- /dev/null +++ b/gesamt/codea_skinner33_06.0 @@ -0,0 +1,15 @@ +method f1(a b) + return a - (b * -3); +end; + +method f2(a b) + return a - (b * 2); +end; + +method f3(a b) + return a - (b * 5); +end; + +method f(a b c d) + return a - ((b - ((c - (d * -3)) * -4)) * 8); +end; diff --git a/gesamt/codea_skinner33_06.call b/gesamt/codea_skinner33_06.call new file mode 100644 index 0000000..7ea7701 --- /dev/null +++ b/gesamt/codea_skinner33_06.call @@ -0,0 +1,50 @@ +#define F1(a,b) ((long)(a) - ((long)(b) * -3UL)) +#define F2(a,b) ((long)(a) - ((long)(b) * 2UL)) +#define F3(a,b) ((long)(a) - ((long)(b) * 5UL)) +#define F(a,b,c,d) ((long)(a) - (8UL * ((long)(b) - (-4UL * ((long)(c) - (-3UL * (long)(d))))))) + + +/* based on mrstrcmp_14 + in our language the lea opts are only possible for -1, -2, -4 and -8 + this testcase tests other constants and other op order in mul +*/ + +long f1(long, long, long); +long f2(long, long, long); +long f3(long, long, long); +long f(long, long, long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f3(0, 3, 20) == F3( 3, 20) && + f3(0, -100, 80) == F3(-100, 80) && + f3(0, 50, -9) == F3( 50, -9) && + f3(0, -77, -50) == F3( -77, -50) && + + f(0, 10, 20, 30, 40) == F( 10, 20, 30, 40) && + f(0, -10, 20, -30, 40) == F(-10, 20, -30, 40) && + f(0, 10, -20, 30, -40) == F( 10, -20, 30, -40) && + f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f3(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F3(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f3(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F3(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); diff --git a/gesamt/codea_skinner33_06.instr b/gesamt/codea_skinner33_06.instr new file mode 100644 index 0000000..b16e5f7 --- /dev/null +++ b/gesamt/codea_skinner33_06.instr @@ -0,0 +1 @@ +104 diff --git a/gesamt/codea_skinner33_07.0 b/gesamt/codea_skinner33_07.0 new file mode 100644 index 0000000..3191ec2 --- /dev/null +++ b/gesamt/codea_skinner33_07.0 @@ -0,0 +1,7 @@ +method f1(a b c) + return a - ((b - c) * -2); +end; + +method f2(a b c) + return a - ((b - c) * -3); +end; diff --git a/gesamt/codea_skinner33_07.call b/gesamt/codea_skinner33_07.call new file mode 100644 index 0000000..62902cc --- /dev/null +++ b/gesamt/codea_skinner33_07.call @@ -0,0 +1,28 @@ +#define F1(a,b,c) ((long)(a) -(((long)(b) - (long)(c)) * -2UL)) +#define F2(a,b,c) ((long)(a) -(((long)(b) - (long)(c)) * -3UL)) + + +long f1(long, long, long, long); +long f2(long, long, long, long); + +RET(f1(0, 3, 20, 15) == F1( 3, 20, 15) && + f1(0, -100, 80, 23) == F1(-100, 80, 23) && + f1(0, 50, -9, -5) == F1( 50, -9, -5) && + f1(0, -77, -50, 87) == F1( -77, -50, 87) && + + f2(0, 3, 20, 15) == F2( 3, 20, 15) && + f2(0, -100, 80, 23) == F2(-100, 80, 23) && + f2(0, 50, -9, -5) == F2( 50, -9, -5) && + f2(0, -77, -50, 87) == F2( -77, -50, 87) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_07.instr b/gesamt/codea_skinner33_07.instr new file mode 100644 index 0000000..21e72e8 --- /dev/null +++ b/gesamt/codea_skinner33_07.instr @@ -0,0 +1 @@ +48 diff --git a/gesamt/codea_skinner33_08.0 b/gesamt/codea_skinner33_08.0 new file mode 100644 index 0000000..55a4687 --- /dev/null +++ b/gesamt/codea_skinner33_08.0 @@ -0,0 +1,7 @@ +method f1(a b c) + return a - (-2 * (b - c)); +end; + +method f2(a b c) + return a - (-3 * (b - c)); +end; diff --git a/gesamt/codea_skinner33_08.call b/gesamt/codea_skinner33_08.call new file mode 100644 index 0000000..2fbb006 --- /dev/null +++ b/gesamt/codea_skinner33_08.call @@ -0,0 +1,28 @@ +#define F1(a,b,c) ((long)(a) -(-2UL * ((long)(b) - (long)(c)))) +#define F2(a,b,c) ((long)(a) -(-3UL * ((long)(b) - (long)(c)))) + + +long f1(long, long, long, long); +long f2(long, long, long, long); + +RET(f1(0, 3, 20, 15) == F1( 3, 20, 15) && + f1(0, -100, 80, 23) == F1(-100, 80, 23) && + f1(0, 50, -9, -5) == F1( 50, -9, -5) && + f1(0, -77, -50, 87) == F1( -77, -50, 87) && + + f2(0, 3, 20, 15) == F2( 3, 20, 15) && + f2(0, -100, 80, 23) == F2(-100, 80, 23) && + f2(0, 50, -9, -5) == F2( 50, -9, -5) && + f2(0, -77, -50, 87) == F2( -77, -50, 87) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_08.instr b/gesamt/codea_skinner33_08.instr new file mode 100644 index 0000000..21e72e8 --- /dev/null +++ b/gesamt/codea_skinner33_08.instr @@ -0,0 +1 @@ +48 diff --git a/gesamt/codea_skinner33_09.0 b/gesamt/codea_skinner33_09.0 new file mode 100644 index 0000000..ae8403d --- /dev/null +++ b/gesamt/codea_skinner33_09.0 @@ -0,0 +1,7 @@ +method f1(a b c) + return ((b - c) * -2) - a; +end; + +method f2(a b c) + return ((b - c) * -3) - a; +end; diff --git a/gesamt/codea_skinner33_09.call b/gesamt/codea_skinner33_09.call new file mode 100644 index 0000000..224059c --- /dev/null +++ b/gesamt/codea_skinner33_09.call @@ -0,0 +1,28 @@ +#define F1(a,b,c) ((((long)(b) - (long)(c)) * -2UL) - (long)(a)) +#define F2(a,b,c) ((((long)(b) - (long)(c)) * -3UL) - (long)(a)) + + +long f1(long, long, long, long); +long f2(long, long, long, long); + +RET(f1(0, 3, 20, 15) == F1( 3, 20, 15) && + f1(0, -100, 80, 23) == F1(-100, 80, 23) && + f1(0, 50, -9, -5) == F1( 50, -9, -5) && + f1(0, -77, -50, 87) == F1( -77, -50, 87) && + + f2(0, 3, 20, 15) == F2( 3, 20, 15) && + f2(0, -100, 80, 23) == F2(-100, 80, 23) && + f2(0, 50, -9, -5) == F2( 50, -9, -5) && + f2(0, -77, -50, 87) == F2( -77, -50, 87) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_09.instr b/gesamt/codea_skinner33_09.instr new file mode 100644 index 0000000..abdfb05 --- /dev/null +++ b/gesamt/codea_skinner33_09.instr @@ -0,0 +1 @@ +60 diff --git a/gesamt/codea_skinner33_10.0 b/gesamt/codea_skinner33_10.0 new file mode 100644 index 0000000..6c08195 --- /dev/null +++ b/gesamt/codea_skinner33_10.0 @@ -0,0 +1,7 @@ +method f1(a b c) + return (-2 * (b - c)) - a; +end; + +method f2(a b c) + return (-3 * (b - c)) - a; +end; diff --git a/gesamt/codea_skinner33_10.call b/gesamt/codea_skinner33_10.call new file mode 100644 index 0000000..a2eb7e9 --- /dev/null +++ b/gesamt/codea_skinner33_10.call @@ -0,0 +1,28 @@ +#define F1(a,b,c) ((-2UL * ((long)(b) - (long)(c))) - (long)(a)) +#define F2(a,b,c) ((-3UL * ((long)(b) - (long)(c))) - (long)(a)) + + +long f1(long, long, long, long); +long f2(long, long, long, long); + +RET(f1(0, 3, 20, 15) == F1( 3, 20, 15) && + f1(0, -100, 80, 23) == F1(-100, 80, 23) && + f1(0, 50, -9, -5) == F1( 50, -9, -5) && + f1(0, -77, -50, 87) == F1( -77, -50, 87) && + + f2(0, 3, 20, 15) == F2( 3, 20, 15) && + f2(0, -100, 80, 23) == F2(-100, 80, 23) && + f2(0, 50, -9, -5) == F2( 50, -9, -5) && + f2(0, -77, -50, 87) == F2( -77, -50, 87) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_10.instr b/gesamt/codea_skinner33_10.instr new file mode 100644 index 0000000..abdfb05 --- /dev/null +++ b/gesamt/codea_skinner33_10.instr @@ -0,0 +1 @@ +60 diff --git a/gesamt/codea_skinner33_11.0 b/gesamt/codea_skinner33_11.0 new file mode 100644 index 0000000..2aebf85 --- /dev/null +++ b/gesamt/codea_skinner33_11.0 @@ -0,0 +1,7 @@ +method f1(a b) + return (a - b) - (-3 * b); +end; + +method f2(a b) + return (a -b) - (-2 * b); +end; diff --git a/gesamt/codea_skinner33_11.call b/gesamt/codea_skinner33_11.call new file mode 100644 index 0000000..3c9cdce --- /dev/null +++ b/gesamt/codea_skinner33_11.call @@ -0,0 +1,27 @@ +#define F1(a,b) (((long)(a) - (long)(b)) - (-3UL * (long)(b))) +#define F2(a,b) (((long)(a) - (long)(b)) - (-2UL * (long)(b))) + +long f1(long, long, long); +long f2(long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_11.instr b/gesamt/codea_skinner33_11.instr new file mode 100644 index 0000000..21e72e8 --- /dev/null +++ b/gesamt/codea_skinner33_11.instr @@ -0,0 +1 @@ +48 diff --git a/gesamt/codea_skinner33_12.0 b/gesamt/codea_skinner33_12.0 new file mode 100644 index 0000000..1835cfe --- /dev/null +++ b/gesamt/codea_skinner33_12.0 @@ -0,0 +1,7 @@ +method f1(a b) + return (a - b) - (b * -3); +end; + +method f2(a b) + return (a -b) - (b * -2); +end; diff --git a/gesamt/codea_skinner33_12.call b/gesamt/codea_skinner33_12.call new file mode 100644 index 0000000..f18e5a2 --- /dev/null +++ b/gesamt/codea_skinner33_12.call @@ -0,0 +1,27 @@ +#define F1(a,b) (((long)(a) - (long)(b)) - ((long)(b) * -3UL)) +#define F2(a,b) (((long)(a) - (long)(b)) - ((long)(b)* -2UL)) + +long f1(long, long, long); +long f2(long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_12.instr b/gesamt/codea_skinner33_12.instr new file mode 100644 index 0000000..21e72e8 --- /dev/null +++ b/gesamt/codea_skinner33_12.instr @@ -0,0 +1 @@ +48 diff --git a/gesamt/codea_skinner33_13.0 b/gesamt/codea_skinner33_13.0 new file mode 100644 index 0000000..5cf8b8b --- /dev/null +++ b/gesamt/codea_skinner33_13.0 @@ -0,0 +1,7 @@ +method f1(a b) + return (a - b) - (-3 * (b - a)); +end; + +method f2(a b) + return (a - b) - (-2 * (b - a)); +end; diff --git a/gesamt/codea_skinner33_13.call b/gesamt/codea_skinner33_13.call new file mode 100644 index 0000000..77dace7 --- /dev/null +++ b/gesamt/codea_skinner33_13.call @@ -0,0 +1,27 @@ +#define F1(a,b) (((long)(a) - (long)(b)) - (-3UL * ((long)(b) - (long)(a)))) +#define F2(a,b) (((long)(a) - (long)(b)) - (-2UL * ((long)(b) - (long)(a)))) + +long f1(long, long, long); +long f2(long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_13.instr b/gesamt/codea_skinner33_13.instr new file mode 100644 index 0000000..8e14edc --- /dev/null +++ b/gesamt/codea_skinner33_13.instr @@ -0,0 +1 @@ +78 diff --git a/gesamt/codea_skinner33_14.0 b/gesamt/codea_skinner33_14.0 new file mode 100644 index 0000000..f03aab8 --- /dev/null +++ b/gesamt/codea_skinner33_14.0 @@ -0,0 +1,7 @@ +method f1(a b) + return (a - b) - ((b - a) * -3); +end; + +method f2(a b) + return (a - b) - ((b - a) * -2); +end; diff --git a/gesamt/codea_skinner33_14.call b/gesamt/codea_skinner33_14.call new file mode 100644 index 0000000..714f7bd --- /dev/null +++ b/gesamt/codea_skinner33_14.call @@ -0,0 +1,27 @@ +#define F1(a,b) (((long)(a) - (long)(b)) - (((long)(b) -(long)(a))* -3UL)) +#define F2(a,b) (((long)(a) - (long)(b)) - (((long)(b) -(long)(a))* -2UL)) + +long f1(long, long, long); +long f2(long, long, long); + +RET(f1(0, 3, 20) == F1( 3, 20) && + f1(0, -100, 80) == F1(-100, 80) && + f1(0, 50, -9) == F1( 50, -9) && + f1(0, -77, -50) == F1( -77, -50) && + + f2(0, 3, 20) == F2( 3, 20) && + f2(0, -100, 80) == F2(-100, 80) && + f2(0, 50, -9) == F2( 50, -9) && + f2(0, -77, -50) == F2( -77, -50) && + + f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) == + F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) && + + f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) && + f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) == + F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) + ); + diff --git a/gesamt/codea_skinner33_14.instr b/gesamt/codea_skinner33_14.instr new file mode 100644 index 0000000..8e14edc --- /dev/null +++ b/gesamt/codea_skinner33_14.instr @@ -0,0 +1 @@ +78 diff --git a/gesamt/codea_skinner33_15.0 b/gesamt/codea_skinner33_15.0 new file mode 100644 index 0000000..028c96d --- /dev/null +++ b/gesamt/codea_skinner33_15.0 @@ -0,0 +1,85 @@ +struct foo bar end; + +method f1(a b) + return 4 or 5; +end; + +method f2(a b) + return a.foo or 0x55555555; +end; + +method f3(a b) + return 0x55555555 or b.bar; +end; + +method f4(a b) + return (a.bar - b.foo) or (a.foo - b.bar); +end; + +method f5(a b) + return (a.bar < b.foo) or this; +end; + +method f6(a b) + return this or (b.bar = a.foo); +end; + +method f7(a b) + return a or b; +end; + +method f8(a b) + return this or 0x112233; +end; + +method f9(a b) + return 0x11EEEEFF or this; +end; + +method f10(a b) + return (a.foo - 5) or 6; +end; + +method f11(a b) + return 7 or (b.bar - 3); +end; + +method f12(a b) + return (a.bar - 3) or b.foo; +end; + +method f13(a b) + return a.foo or (b.bar - -3); +end; + +method f14(a b) + return this or a.foo; +end; + +method f15(a b) + return b.bar or this; +end; + +method f16(a b) + return b.bar or 0; +end; + +method f17(a b) + return 0 or a.foo; +end; + +method f18(a b) + return 0 or this; +end; + +method f19(a b) + return this or 0; +end; + +method f20(a b) + return 0 or (b.foo * 1); +end; + +method f21(a b) + return (a.foo * 1) or 0; +end; diff --git a/gesamt/codea_skinner33_15.call b/gesamt/codea_skinner33_15.call new file mode 100644 index 0000000..371933d --- /dev/null +++ b/gesamt/codea_skinner33_15.call @@ -0,0 +1,50 @@ +#define OR(a,b) ((long)(a) | (long)(b)) + +long f1(long, long*, long*); +long f2(long, long*, long*); +long f3(long, long*, long*); +long f4(long, long*, long*); +long f5(long, long*, long*); +long f6(long, long*, long*); +long f7(long, long*, long*); +long f8(long, long*, long*); +long f9(long, long*, long*); +long f10(long, long*, long*); +long f11(long, long*, long*); +long f12(long, long*, long*); +long f13(long, long*, long*); +long f14(long, long*, long*); +long f15(long, long*, long*); +long f16(long, long*, long*); +long f17(long, long*, long*); +long f18(long, long*, long*); +long f19(long, long*, long*); +long f20(long, long*, long*); +long f21(long, long*, long*); + +long muh[] = {0x05f05f, 0x223344}; +long kuh[] = {0x00AACC, 0x563425}; + +RET( f1(5, muh, kuh) == OR( 4, 5) && + f2(5, muh, kuh) == OR( muh[0], 0x55555555) && + f3(5, muh, kuh) == OR( 0x55555555, kuh[1]) && + f4(5, muh, kuh) == OR(muh[1]-kuh[0], muh[0]-kuh[1]) && + f5(5, muh, kuh) == OR( 0, 5) && + f6(5, muh, kuh) == OR( 5, 0) && + f7(5, muh, kuh) == OR( muh, kuh) && + f8(5, muh, kuh) == OR( 5, 0x112233) && + f9(5, muh, kuh) == OR( 0x11EEEEFF, 5) && + f10(5, muh, kuh) == OR( muh[0]-5, 6) && + f11(5, muh, kuh) == OR( 7, kuh[1]-3) && + f12(5, muh, kuh) == OR( muh[1]-3, kuh[0]) && + f13(5, muh, kuh) == OR( muh[0], kuh[1]+3) && + f14(5, muh, kuh) == OR( 5, muh[0]) && + f15(5, muh, kuh) == OR( kuh[1], 5) && + f16(5, muh, kuh) == OR( kuh[1], 0) && + f17(5, muh, kuh) == OR( 0, muh[0]) && + f18(5, muh, kuh) == OR( 0, 5) && + f19(5, muh, kuh) == OR( 5, 0) && + f20(5, muh, kuh) == OR( 0, kuh[0]) && + f21(5, muh, kuh) == OR( muh[0], 0) + ); + diff --git a/gesamt/codea_skinner33_15.instr b/gesamt/codea_skinner33_15.instr new file mode 100644 index 0000000..b5489e5 --- /dev/null +++ b/gesamt/codea_skinner33_15.instr @@ -0,0 +1 @@ +69 diff --git a/gesamt/codea_skinner33_16.0 b/gesamt/codea_skinner33_16.0 new file mode 100644 index 0000000..ddec0ea --- /dev/null +++ b/gesamt/codea_skinner33_16.0 @@ -0,0 +1,33 @@ +struct foo bar end; + +method f1(a) + return not(this-a.bar); +end; + +method f2(a) + return not(a.foo); +end; + +method f3(a) + return not(not(a.foo)); +end; + +method f4(a) + return not(a.bar); +end; + +method f5(a) + return not(not(a.bar)); +end; + +method f6(a) + return not(not(a.foo - a.bar)); +end; + +method f7(a) + return not(not(a.foo * a.bar)); +end; + +method f8(a) + return not(this*a.bar); +end; diff --git a/gesamt/codea_skinner33_16.call b/gesamt/codea_skinner33_16.call new file mode 100644 index 0000000..fba7203 --- /dev/null +++ b/gesamt/codea_skinner33_16.call @@ -0,0 +1,25 @@ +long f1(long, long*); +long f2(long, long*); +long f3(long, long*); +long f4(long, long*); +long f5(long, long*); +long f6(long, long*); +long f7(long, long*); +long f8(long, long*); + +long muh[] = {6,4}; +long kuh[] = {1,0}; +long zod[] = {0,1}; +long pui[] = {1,1}; + +printf("%d = %d , %d = %d, %d = %d, %d = %d \n", f8(5,muh) , 1 , f8(4,muh) , 1 , f8(0,muh) , 0 , f8(0,zod) , 0 ); + +RET(f1(5,muh) == 0 && f1(4,muh) == 1 && + f2(5,kuh) == 0 && f2(5,zod) == 1 && + f3(5,kuh) == 1 && f3(5,zod) == 0 && f3(5,muh) == 1 && + f4(5,kuh) == 1 && f4(5,zod) == 0 && f4(5,muh) == 0 && + f5(5,kuh) == 0 && f5(5,zod) == 1 && + f6(5,muh) == 1 && f6(5,kuh) == 1 && f6(5,pui) == 0 && + f7(5,muh) == 1 && f7(5,kuh) == 0 && f7(5,pui) == 1 && + f8(5,muh) == 0 && f8(4,muh) == 0 && f8(0,muh) == 1 && f8(0,zod) == 1 + ); diff --git a/gesamt/codea_skinner33_16.instr b/gesamt/codea_skinner33_16.instr new file mode 100644 index 0000000..a57f6ce --- /dev/null +++ b/gesamt/codea_skinner33_16.instr @@ -0,0 +1 @@ +131 diff --git a/gesamt/codea_skinner33_17.0 b/gesamt/codea_skinner33_17.0 new file mode 100644 index 0000000..e6f4035 --- /dev/null +++ b/gesamt/codea_skinner33_17.0 @@ -0,0 +1,45 @@ +struct foo bar end; + +method f1(a) + return 5 * a.foo; +end; + +method f2(a) + return a.bar * this; +end; + +method f3(a) + return (a.foo-3) < (a.bar-3); +end; + +method f4(a) + return (a.foo*1) < 6; +end; + +method f5(a) + return 5 < (a.bar * 1); +end; + +method f6(a) + return (1 * a.foo) < this; +end; + +method f7(a) + return a.foo < (a.bar * 1); +end; + +method f8(a) + return a.foo < this; +end; + +method f9(a) + return this < a.bar; +end; + +method f10(a) + return a.foo < 6; +end; + +method f11(a) + return 5 < a.bar; +end; diff --git a/gesamt/codea_skinner33_17.call b/gesamt/codea_skinner33_17.call new file mode 100644 index 0000000..ae188f3 --- /dev/null +++ b/gesamt/codea_skinner33_17.call @@ -0,0 +1,28 @@ + +long f1(long, long*); +long f2(long, long*); +long f3(long, long*); +long f4(long, long*); +long f5(long, long*); +long f6(long, long*); +long f7(long, long*); +long f8(long, long*); +long f9(long, long*); +long f10(long, long*); +long f11(long, long*); + +long muh[] = {5, 6}; +long kuh[] = {6, 5}; + +RET(f1(4,muh) == 25 && + f2(5,muh) == 30 && + f3(5,muh) == 1 && f3(5,kuh) == 0 && + f4(5,muh) == 1 && f4(5,kuh) == 0 && + f5(5,muh) == 1 && f5(5,kuh) == 0 && + f6(6,muh) == 1 && f6(6,kuh) == 0 && + f7(5,muh) == 1 && f7(5,kuh) == 0 && + f8(5,muh) == 0 && f8(7,kuh) == 1 && + f9(5,muh) == 1 && f9(5,kuh) == 0 && + f10(5,muh) == 1 && f10(5,kuh) == 0 && + f11(5,muh) == 1 && f11(5,kuh) == 0 +); diff --git a/gesamt/codea_skinner33_17.instr b/gesamt/codea_skinner33_17.instr new file mode 100644 index 0000000..c67f579 --- /dev/null +++ b/gesamt/codea_skinner33_17.instr @@ -0,0 +1 @@ +93 diff --git a/gesamt/codea_skinner33_18.0 b/gesamt/codea_skinner33_18.0 new file mode 100644 index 0000000..41e359c --- /dev/null +++ b/gesamt/codea_skinner33_18.0 @@ -0,0 +1,38 @@ +struct foo bar end; + +method f1(a) + return (a.foo * 1) = 5; +end; + +method f2(a) + return 5 = (a.bar * 1); +end; + +method f3(a) + return (a.foo * 1) = this; +end; + +method f4(a) + return this = (a.bar * 1); +end; + +method f5(a) + return a.foo = (this * 1); +end; + +method f6(a) + return a.foo = 5; +end; + +method f7(a) + return 5 = a.bar; +end; + +method f8(a) + return a.foo = this; +end; + +method f9(a) + return this = a.bar; +end; + diff --git a/gesamt/codea_skinner33_18.call b/gesamt/codea_skinner33_18.call new file mode 100644 index 0000000..f8d0291 --- /dev/null +++ b/gesamt/codea_skinner33_18.call @@ -0,0 +1,24 @@ + +long f1(long, long*); +long f2(long, long*); +long f3(long, long*); +long f4(long, long*); +long f5(long, long*); +long f6(long, long*); +long f7(long, long*); +long f8(long, long*); +long f9(long, long*); + +long muh[] = {5, 6}; +long kuh[] = {6, 5}; + +RET(f1(4,muh) == 1 && f1(5,kuh) == 0 && + f2(5,muh) == 0 && f2(5,kuh) == 1 && + f3(5,muh) == 1 && f3(5,kuh) == 0 && + f4(5,muh) == 0 && f4(5,kuh) == 1 && + f5(5,muh) == 1 && f5(5,kuh) == 0 && + f6(6,muh) == 1 && f6(6,kuh) == 0 && + f7(5,muh) == 0 && f7(5,kuh) == 1 && + f8(5,muh) == 1 && f8(5,kuh) == 0 && + f9(5,muh) == 0 && f9(5,kuh) == 1 +); diff --git a/gesamt/codea_skinner33_18.instr b/gesamt/codea_skinner33_18.instr new file mode 100644 index 0000000..dde92dd --- /dev/null +++ b/gesamt/codea_skinner33_18.instr @@ -0,0 +1 @@ +82 diff --git a/gesamt/codea_skinner33_19.0 b/gesamt/codea_skinner33_19.0 new file mode 100644 index 0000000..3a12e4b --- /dev/null +++ b/gesamt/codea_skinner33_19.0 @@ -0,0 +1,31 @@ +method f1(a b) + return not(a or b); +end; + +method f2(a b) + return not(not(a or b)); +end; + +method f3(a b) + return not(a - b); +end; + +method f4(a b) + return not(not(a - b)); +end; + +method f5(a b) + return not(a < b); +end; + +method f6(a b) + return not(not(a < b)); +end; + +method f7(a b) + return not(a = b); +end; + +method f8(a b) + return not(not(a = b)); +end; diff --git a/gesamt/codea_skinner33_19.call b/gesamt/codea_skinner33_19.call new file mode 100644 index 0000000..2d6d7b8 --- /dev/null +++ b/gesamt/codea_skinner33_19.call @@ -0,0 +1,22 @@ +long f1(long,long,long); +long f2(long,long,long); +long f3(long,long,long); +long f4(long,long,long); +long f5(long,long,long); +long f6(long,long,long); +long f7(long,long,long); +long f8(long,long,long); + +RET( +f1(0,0,0) == 1 && f1(0,1,1) == 0 && +f2(0,0,0) == 0 && f2(0,1,1) == 1 && + +f3(0,4,4) == 1 && f3(0,4,3) == 0 && +f4(0,4,4) == 0 && f4(0,4,3) == 1 && + +f5(0,5,4) == 1 && f5(0,4,5) == 0 && +f6(0,5,4) == 0 && f6(0,4,5) == 1 && + +f7(0,5,4) == 1 && f7(0,5,5) == 0 && +f8(0,5,4) == 0 && f8(0,5,5) == 1 +); diff --git a/gesamt/codea_skinner33_19.instr b/gesamt/codea_skinner33_19.instr new file mode 100644 index 0000000..dd47563 --- /dev/null +++ b/gesamt/codea_skinner33_19.instr @@ -0,0 +1 @@ +76 diff --git a/gesamt/codea_skinner33_20.0 b/gesamt/codea_skinner33_20.0 new file mode 100644 index 0000000..5a8927a --- /dev/null +++ b/gesamt/codea_skinner33_20.0 @@ -0,0 +1,11 @@ +method f1(a) + return this - (a - 0); +end; + +method f2(a) + return (this - a) - (0 - a); +end; + +method f3(a) + return 5 - (a - 0); +end; diff --git a/gesamt/codea_skinner33_20.call b/gesamt/codea_skinner33_20.call new file mode 100644 index 0000000..7f800a6 --- /dev/null +++ b/gesamt/codea_skinner33_20.call @@ -0,0 +1,5 @@ +long f1(long, long); +long f2(long, long); +long f3(long, long); + +RET(f1(5,3) == 2 && f2(8,3) == 8 && f3(4,2) == 3); diff --git a/gesamt/codea_skinner33_20.instr b/gesamt/codea_skinner33_20.instr new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/gesamt/codea_skinner33_20.instr @@ -0,0 +1 @@ +10 diff --git a/gesamt/codea_skinner33_21.0 b/gesamt/codea_skinner33_21.0 new file mode 100644 index 0000000..6078010 --- /dev/null +++ b/gesamt/codea_skinner33_21.0 @@ -0,0 +1,5 @@ +struct a b c end; + +method m(x) + return ((this-0)-8).c; +end; diff --git a/gesamt/codea_skinner33_21.call b/gesamt/codea_skinner33_21.call new file mode 100644 index 0000000..bbbc716 --- /dev/null +++ b/gesamt/codea_skinner33_21.call @@ -0,0 +1,3 @@ +long s[]={12,23,34,45,53,61}; +extern long m(long *,long); +RET(m(s,12)==23 && m(s+2,13)==45); diff --git a/gesamt/codea_skinner33_21.instr b/gesamt/codea_skinner33_21.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_skinner33_21.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_snafu_00.0 b/gesamt/codea_snafu_00.0 new file mode 100644 index 0000000..3806e12 --- /dev/null +++ b/gesamt/codea_snafu_00.0 @@ -0,0 +1,11 @@ +method foo(a b c) + return a; +end; + +method bar(a b c) + return b; +end; + +method foobar(a b c) + return c; +end; diff --git a/gesamt/codea_snafu_00.call b/gesamt/codea_snafu_00.call new file mode 100644 index 0000000..000b197 --- /dev/null +++ b/gesamt/codea_snafu_00.call @@ -0,0 +1,5 @@ +extern long foo(long this, long, long, long); +extern long bar(long this, long, long, long); +extern long foobar(long this, long, long, long); + +RET( (foo(0xDEAD, 3, 4, 5) == 3) && (bar(0xDEAD, 3, 4, 5) == 4) && (foobar(0xDEAD, 3, 4, 5) == 5)); diff --git a/gesamt/codea_snafu_00.instr b/gesamt/codea_snafu_00.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codea_snafu_00.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codea_snafu_01.0 b/gesamt/codea_snafu_01.0 new file mode 100644 index 0000000..3383891 --- /dev/null +++ b/gesamt/codea_snafu_01.0 @@ -0,0 +1,11 @@ +method a() + return 5 - 3; +end; + +method b(x) + return 5 - x; +end; + +method c(x) + return x - 3; +end; diff --git a/gesamt/codea_snafu_01.call b/gesamt/codea_snafu_01.call new file mode 100644 index 0000000..06d5289 --- /dev/null +++ b/gesamt/codea_snafu_01.call @@ -0,0 +1,5 @@ +extern long a(long this); +extern long b(long this, long x); +extern long c(long this, long x); + +RET( (a(0xDEAD) == 2) && (b(0xDEAD, 23) == -18) && (c(0xDEAD, 23) == 20)); diff --git a/gesamt/codea_snafu_01.instr b/gesamt/codea_snafu_01.instr new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/gesamt/codea_snafu_01.instr @@ -0,0 +1 @@ +7 diff --git a/gesamt/codea_snafu_02.0 b/gesamt/codea_snafu_02.0 new file mode 100644 index 0000000..5b79633 --- /dev/null +++ b/gesamt/codea_snafu_02.0 @@ -0,0 +1,11 @@ +method q(x y) + return 5 - ((x - 3) - y); +end; + +method r(x y) + return (x - y) - 10; +end; + +method s(x y) + return 6 - (x - 1); +end; diff --git a/gesamt/codea_snafu_02.call b/gesamt/codea_snafu_02.call new file mode 100644 index 0000000..a371164 --- /dev/null +++ b/gesamt/codea_snafu_02.call @@ -0,0 +1,5 @@ +extern long q(long this, long, long); +extern long r(long this, long, long); +extern long s(long this, long, long); + +RET((q(0xDEAD, 33, 15) == -10) && (r(0xDEAD, 33, 15) == 8) && (s(0xDEAD, 33, 15) == -26)); diff --git a/gesamt/codea_snafu_02.instr b/gesamt/codea_snafu_02.instr new file mode 100644 index 0000000..8351c19 --- /dev/null +++ b/gesamt/codea_snafu_02.instr @@ -0,0 +1 @@ +14 diff --git a/gesamt/codea_snafu_03.0 b/gesamt/codea_snafu_03.0 new file mode 100644 index 0000000..c43ec47 --- /dev/null +++ b/gesamt/codea_snafu_03.0 @@ -0,0 +1,11 @@ +method Long(a b c d e) + return (a - (e - 20)) - (b - (c - (99 - d))); +end; + +method Loong(a b c d e) + return a - (b - (c - (d - (e - (a - (b - (c - (d - (e - 10))))))))); +end; + +method Looong(a b c d e) + return (11 - a) - (22 - b) - (33 - c - (44 - d)) - (55 - (77 - e - -66)); +end; diff --git a/gesamt/codea_snafu_03.call b/gesamt/codea_snafu_03.call new file mode 100644 index 0000000..e5891be --- /dev/null +++ b/gesamt/codea_snafu_03.call @@ -0,0 +1,16 @@ +long Long(long this, long, long, long, long, long); +long Loong(long this, long, long, long, long, long); +long Looong(long this, long, long, long, long, long); + +long erw1 = 9935366; +long erw2 = 10; +long erw3 = 11309; +long ret1 = Long(0xDEAD, 23, 66, 1024, 9999999, 65535); +long ret2 = Loong(0xDEAD, 11, 22, 33, 44, 55); +long ret3 = Looong(0xDEAD, 34, 92934, 2991, 12389, 72281); + +printf("Long(erwartet: %i) : %i\n", erw1, ret1); +printf("Loong(erwartet: %i) : %i\n", erw2, ret2); +printf("Looong(erwartet: %i) : %i\n", erw3, ret3); + +RET(ret1 == erw1 && ret2 == erw2 && ret3 == erw3); diff --git a/gesamt/codea_snafu_03.instr b/gesamt/codea_snafu_03.instr new file mode 100644 index 0000000..87523dd --- /dev/null +++ b/gesamt/codea_snafu_03.instr @@ -0,0 +1 @@ +41 diff --git a/gesamt/codea_snafu_04.0 b/gesamt/codea_snafu_04.0 new file mode 100644 index 0000000..aeff3a0 --- /dev/null +++ b/gesamt/codea_snafu_04.0 @@ -0,0 +1,15 @@ +method pvs1(a b) + return (this - a) * b; +end; + +method pvs2(a b) + return this - (a * b); +end; + +method pvs3(a b) + return (this * a) - b; +end; + +method pvs4(a b) + return this * (a - b); +end; diff --git a/gesamt/codea_snafu_04.call b/gesamt/codea_snafu_04.call new file mode 100644 index 0000000..7a9fd9a --- /dev/null +++ b/gesamt/codea_snafu_04.call @@ -0,0 +1,7 @@ +long pvs1(long, long, long); +long pvs2(long, long, long); +long pvs3(long, long, long); +long pvs4(long, long, long); + + +RET((pvs1(2,3,5) == -5) && (pvs2(2,3,5) == -13) && (pvs3(2,3,5) == 1) && (pvs4(2,3,5) == -4)); diff --git a/gesamt/codea_snafu_04.instr b/gesamt/codea_snafu_04.instr new file mode 100644 index 0000000..98d9bcb --- /dev/null +++ b/gesamt/codea_snafu_04.instr @@ -0,0 +1 @@ +17 diff --git a/gesamt/codea_snafu_05.0 b/gesamt/codea_snafu_05.0 new file mode 100644 index 0000000..bb0ff4b --- /dev/null +++ b/gesamt/codea_snafu_05.0 @@ -0,0 +1,3 @@ +method meh(a b c d) + return (this * (a - b)) - (c - (a * d)); +end; diff --git a/gesamt/codea_snafu_05.call b/gesamt/codea_snafu_05.call new file mode 100644 index 0000000..49e372a --- /dev/null +++ b/gesamt/codea_snafu_05.call @@ -0,0 +1,3 @@ +long meh(long, long, long, long, long); + +RET(meh(2,11,5,15,32) == 349); diff --git a/gesamt/codea_snafu_05.instr b/gesamt/codea_snafu_05.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codea_snafu_05.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codea_snafu_06.0 b/gesamt/codea_snafu_06.0 new file mode 100644 index 0000000..a4acd84 --- /dev/null +++ b/gesamt/codea_snafu_06.0 @@ -0,0 +1,21 @@ +struct a b end; + +method test64() + return this - -2139062144; +end; + +method num() + return 15 - 4 - 2 - 6 - 7; +end; + +method num2() + return 15 - (4 - 2 - 6 - 7); +end; + +method globcmp() + return this.a < this.b; +end; + +method globcmp2() + return this.a = this.b; +end; diff --git a/gesamt/codea_snafu_06.call b/gesamt/codea_snafu_06.call new file mode 100644 index 0000000..ecb435a --- /dev/null +++ b/gesamt/codea_snafu_06.call @@ -0,0 +1,21 @@ +long test64(long); +long num(long); +long num2(long); +long globcmp(long*); +long globcmp2(long*); + + +long foo[] = {1337, 42}; +long bar[] = {23, 23}; +long foobar[] = {23, 42}; + +RET((test64(0x1000000000) == (long) 0x1000000000 - (int) 0x80808080) + && (num(0) == -4) + && (num2(0) == 26) + && (globcmp(foo) == 0) + && (globcmp(bar) == 0) + && (globcmp(foobar) == 1) + && (globcmp2(foo) == 0) + && (globcmp2(bar) == 1) + && (globcmp2(foobar) == 0) + ); diff --git a/gesamt/codea_snafu_06.instr b/gesamt/codea_snafu_06.instr new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/gesamt/codea_snafu_06.instr @@ -0,0 +1 @@ +36 diff --git a/gesamt/codeb_georg_asma_00.call b/gesamt/codeb_georg_asma_00.call new file mode 100644 index 0000000..1c4a165 --- /dev/null +++ b/gesamt/codeb_georg_asma_00.call @@ -0,0 +1,19 @@ +/* BOF georg_asma_00.call */ +#include /* strcmp() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asma(char *); +int ret = (asma(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asma_00.call */ diff --git a/gesamt/codeb_georg_asma_00.instr b/gesamt/codeb_georg_asma_00.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codeb_georg_asma_00.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codeb_georg_asma_01.0 b/gesamt/codeb_georg_asma_01.0 new file mode 100644 index 0000000..6daa90f --- /dev/null +++ b/gesamt/codeb_georg_asma_01.0 @@ -0,0 +1,43 @@ +/** asma - aka tolower() first 16 bytes. + * + * unsigned char *asma(unsigned char *s) + * { + * int i; + * for (i=0; i<16; i++) + * { + * unsigned char c = s[i]; + * c += (c >= 'A' && c <= 'Z') ? 'a'-'A' : 0; + * s[i] = c; + * } + * return s; + * } + */ +/* AMD64 Little Endian byte order + * p[0] c0 c1 c2 c3 c4 c5 c6 c7 + * p[1] c1 c2 c3 c4 c5 c6 c7 c8 + * p[1] * 256 00 c1 c2 c3 c4 c5 c6 c7 + * p[0] - 256 * p[1] c0 + */ +/* WISHLIST signed!? p w/o i */ +struct f end; +method asma() + var p := this; + var i := 0; + while i < 16 + do + var a := (p-(0-i)).f; + var b := (p-(-1-i)).f; + var c := a - (256 * b); + + /* add 'a'-'A' iff 'A' <= c <= 'Z' */ + if 0x40 < c then if c < 0x5B then + c := c--0x20; + end; + end; + + (p-(0-i)).f := (256 * b) -(0-c); + + i := i--1; + end; + return this; +end; diff --git a/gesamt/codeb_georg_asma_01.call b/gesamt/codeb_georg_asma_01.call new file mode 100644 index 0000000..1c4a165 --- /dev/null +++ b/gesamt/codeb_georg_asma_01.call @@ -0,0 +1,19 @@ +/* BOF georg_asma_00.call */ +#include /* strcmp() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asma(char *); +int ret = (asma(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asma_00.call */ diff --git a/gesamt/codeb_georg_asma_01.instr b/gesamt/codeb_georg_asma_01.instr new file mode 100644 index 0000000..d3824c2 --- /dev/null +++ b/gesamt/codeb_georg_asma_01.instr @@ -0,0 +1 @@ +324 diff --git a/gesamt/codeb_georg_asma_02.0 b/gesamt/codeb_georg_asma_02.0 new file mode 100644 index 0000000..85f8ff5 --- /dev/null +++ b/gesamt/codeb_georg_asma_02.0 @@ -0,0 +1,42 @@ +/** asma - aka tolower() first 16 bytes. + * + * unsigned char *asma(unsigned char *s) + * { + * int i; + * for (i=0; i<16; i++) + * { + * unsigned char c = s[i]; + * c += (c >= 'A' && c <= 'Z') ? 'a'-'A' : 0; + * s[i] = c; + * } + * return s; + * } + */ +/* AMD64 Little Endian byte order + * p[0] c0 c1 c2 c3 c4 c5 c6 c7 + * p[1] c1 c2 c3 c4 c5 c6 c7 c8 + * p[1] * 256 00 c1 c2 c3 c4 c5 c6 c7 + * p[0] - 256 * p[1] c0 + */ +/* WISHLIST signed!? p w/o i */ +struct f end; +method asma() + var i := 0; + while i < 16 + do + var a := (this-(0-i)).f; + var b := (this-(-1-i)).f; + var c := a - (256 * b); + + /* add 'a'-'A' iff 'A' <= c <= 'Z' */ + if 0x40 < c then if c < 0x5B then + c := c--0x20; + end; + end; + + (this-(0-i)).f := (256 * b) -(0-c); + + i := i--1; + end; + return this; +end; diff --git a/gesamt/codeb_georg_asma_02.call b/gesamt/codeb_georg_asma_02.call new file mode 100644 index 0000000..1c4a165 --- /dev/null +++ b/gesamt/codeb_georg_asma_02.call @@ -0,0 +1,19 @@ +/* BOF georg_asma_00.call */ +#include /* strcmp() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asma(char *); +int ret = (asma(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asma_00.call */ diff --git a/gesamt/codeb_georg_asma_02.instr b/gesamt/codeb_georg_asma_02.instr new file mode 100644 index 0000000..3860ed9 --- /dev/null +++ b/gesamt/codeb_georg_asma_02.instr @@ -0,0 +1 @@ +323 diff --git a/gesamt/codeb_georg_asma_03.0 b/gesamt/codeb_georg_asma_03.0 new file mode 100644 index 0000000..3d56525 --- /dev/null +++ b/gesamt/codeb_georg_asma_03.0 @@ -0,0 +1,43 @@ +/** asma - aka tolower() first 16 bytes. + * + * unsigned char *asma(unsigned char *s) + * { + * int i; + * for (i=0; i<16; i++) + * { + * unsigned char c = s[i]; + * c += (c >= 'A' && c <= 'Z') ? 'a'-'A' : 0; + * s[i] = c; + * } + * return s; + * } + */ +/* AMD64 Little Endian byte order + * p[0] c0 c1 c2 c3 c4 c5 c6 c7 + * p[1] c1 c2 c3 c4 c5 c6 c7 c8 + * p[1] * 256 00 c1 c2 c3 c4 c5 c6 c7 + * p[0] - 256 * p[1] c0 + */ +/* WISHLIST signed!? */ +struct f end; +method asma() + var p := this; + var q := this--16; + while p < q + do + var a := p.f; + var b := (p--1).f; + var c := a - (256 * b); + + /* add 'a'-'A' iff 'A' <= c <= 'Z' */ + if 0x40 < c then if c < 0x5B then + c := c--0x20; + end; + end; + + p.f := (256 * b) -(0-c); + + p := p--1; + end; + return this; +end; diff --git a/gesamt/codeb_georg_asma_03.call b/gesamt/codeb_georg_asma_03.call new file mode 100644 index 0000000..1c4a165 --- /dev/null +++ b/gesamt/codeb_georg_asma_03.call @@ -0,0 +1,19 @@ +/* BOF georg_asma_00.call */ +#include /* strcmp() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asma(char *); +int ret = (asma(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asma_00.call */ diff --git a/gesamt/codeb_georg_asma_03.instr b/gesamt/codeb_georg_asma_03.instr new file mode 100644 index 0000000..7f05eed --- /dev/null +++ b/gesamt/codeb_georg_asma_03.instr @@ -0,0 +1 @@ +244 diff --git a/gesamt/codeb_georg_asma_04.0 b/gesamt/codeb_georg_asma_04.0 new file mode 100644 index 0000000..3eab8c4 --- /dev/null +++ b/gesamt/codeb_georg_asma_04.0 @@ -0,0 +1,41 @@ +/** asma - aka tolower() first 16 bytes. + * + * unsigned char *asma(unsigned char *s) + * { + * int i; + * for (i=0; i<16; i++) + * { + * unsigned char c = s[i]; + * c += (c >= 'A' && c <= 'Z') ? 'a'-'A' : 0; + * s[i] = c; + * } + * return s; + * } + */ +/* AMD64 Little Endian byte order + * p[0] c0 c1 c2 c3 c4 c5 c6 c7 + * p[1] c1 c2 c3 c4 c5 c6 c7 c8 + * p[1] * 256 00 c1 c2 c3 c4 c5 c6 c7 + * p[0] - 256 * p[1] c0 + */ +/* WISHLIST signed!? */ +struct f end; +method asma() + var p := this; + var q := this--16; + while p < q + do + var c := p.f - (256 * (p--1).f); + + /* add 'a'-'A' iff 'A' <= c <= 'Z' */ + if 0x40 < c then if c < 0x5B then + c := c--0x20; + end; + end; + + p.f := (256 * (p--1).f)-(0-c); + + p := p--1; + end; + return this; +end; diff --git a/gesamt/codeb_georg_asma_04.call b/gesamt/codeb_georg_asma_04.call new file mode 100644 index 0000000..1c4a165 --- /dev/null +++ b/gesamt/codeb_georg_asma_04.call @@ -0,0 +1,19 @@ +/* BOF georg_asma_00.call */ +#include /* strcmp() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefUVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asma(char *); +int ret = (asma(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asma_00.call */ diff --git a/gesamt/codeb_georg_asma_04.instr b/gesamt/codeb_georg_asma_04.instr new file mode 100644 index 0000000..0d38910 --- /dev/null +++ b/gesamt/codeb_georg_asma_04.instr @@ -0,0 +1 @@ +212 diff --git a/gesamt/codeb_georg_asmb_00.call b/gesamt/codeb_georg_asmb_00.call new file mode 100644 index 0000000..22696b6 --- /dev/null +++ b/gesamt/codeb_georg_asmb_00.call @@ -0,0 +1,25 @@ +/* BOF georg_asmb_00.call */ +#include /* strcmp() strlen() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDE\0UVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDE\0UVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefuvwxyz6789abcde\0UVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asmb(char *); +int ret = (asmb(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + x[sizeof(x)-2] = '\0'; /* just 2b sure */ + y[sizeof(y)-2] = '\0'; /* just 2b sure */ + z[sizeof(z)-2] = '\0'; /* just 2b sure */ + x[strlen(x)] = '#'; + y[strlen(y)] = '#'; + z[strlen(z)] = '#'; + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asmb_00.call */ diff --git a/gesamt/codeb_georg_asmb_00.instr b/gesamt/codeb_georg_asmb_00.instr new file mode 100644 index 0000000..aabe6ec --- /dev/null +++ b/gesamt/codeb_georg_asmb_00.instr @@ -0,0 +1 @@ +21 diff --git a/gesamt/codeb_georg_asmb_01.0 b/gesamt/codeb_georg_asmb_01.0 new file mode 100644 index 0000000..3f6ecc7 --- /dev/null +++ b/gesamt/codeb_georg_asmb_01.0 @@ -0,0 +1,40 @@ +/** asmb - aka tolower(), maybe more than strlen(). + * + * unsigned char *asmb(unsigned char *s) + * { + * unsigned long i; + * for (i=0; s[i]; i++) + * { + * unsigned char c = s[i]; + * c += (c >= 'A' && c <= 'Z') ? 'a'-'A' : 0; + * s[i] = c; + * } + * return s; + * } + */ +/* AMD64 Little Endian byte order + * p[0] c0 c1 c2 c3 c4 c5 c6 c7 + * p[1] c1 c2 c3 c4 c5 c6 c7 c8 + * p[1] * 256 00 c1 c2 c3 c4 c5 c6 c7 + * p[0] - 256 * p[1] c0 + */ +/* WISHLIST signed!? */ +struct f end; +method asmb() + var p := this; + while p.f - (256 * (p--1).f) + do + var c := p.f - (256 * (p--1).f); + + /* add 'a'-'A' iff 'A' <= c <= 'Z' */ + if 0x40 < c then if c < 0x5B then + c := c--0x20; + end; + end; + + p.f := (256 * (p--1).f)-(0-c); + + p := p--1; + end; + return this; +end; diff --git a/gesamt/codeb_georg_asmb_01.call b/gesamt/codeb_georg_asmb_01.call new file mode 100644 index 0000000..22696b6 --- /dev/null +++ b/gesamt/codeb_georg_asmb_01.call @@ -0,0 +1,25 @@ +/* BOF georg_asmb_00.call */ +#include /* strcmp() strlen() */ +char x[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDE\0UVWxyz6789abcDEFUVWxyz6789abcDEF"; +char y[] = "UVWxyz6789abcDEFUVWxyz6789abcDEFUVWxyz6789abcDE\0UVWxyz6789abcDEFUVWxyz6789abcDEF"; +char z[] = "UVWxyz6789abcDEFuvwxyz6789abcdefuvwxyz6789abcde\0UVWxyz6789abcDEFUVWxyz6789abcDEF"; +char *p = &y[16]; +extern char *asmb(char *); +int ret = (asmb(p)==p && (strcmp(y,z)==0)); +if (ret != 1) { + x[sizeof(x)-1] = '\0'; /* just 2b sure */ + y[sizeof(y)-1] = '\0'; /* just 2b sure */ + z[sizeof(z)-1] = '\0'; /* just 2b sure */ + x[sizeof(x)-2] = '\0'; /* just 2b sure */ + y[sizeof(y)-2] = '\0'; /* just 2b sure */ + z[sizeof(z)-2] = '\0'; /* just 2b sure */ + x[strlen(x)] = '#'; + y[strlen(y)] = '#'; + z[strlen(z)] = '#'; + fprintf(stderr, "### %s:%d:%s() x '%s'\n", __FILE__, __LINE__, __FUNCTION__, x); + fprintf(stderr, "### %s:%d:%s() y '%s'\n", __FILE__, __LINE__, __FUNCTION__, y); + fprintf(stderr, "### %s:%d:%s() z '%s'\n", __FILE__, __LINE__, __FUNCTION__, z); +} +RET(ret); +/* vim: set filetype=c: */ +/* EOF georg_asmb_00.call */ diff --git a/gesamt/codeb_georg_asmb_01.instr b/gesamt/codeb_georg_asmb_01.instr new file mode 100644 index 0000000..761fcd3 --- /dev/null +++ b/gesamt/codeb_georg_asmb_01.instr @@ -0,0 +1 @@ +499 diff --git a/gesamt/codeb_georg_fib_000.call b/gesamt/codeb_georg_fib_000.call new file mode 100644 index 0000000..e04b865 --- /dev/null +++ b/gesamt/codeb_georg_fib_000.call @@ -0,0 +1,2 @@ +extern long fib(long); +RET(fib(-1)==-1 && fib(0)==0 && fib(1)==1 && fib(2)==1 && fib(3)==2 && fib(7)+fib(8)==fib(9)); diff --git a/gesamt/codeb_georg_fib_001.0 b/gesamt/codeb_georg_fib_001.0 new file mode 100644 index 0000000..17f99e4 --- /dev/null +++ b/gesamt/codeb_georg_fib_001.0 @@ -0,0 +1,21 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib() + if this < 2 then return this; end; + var a := 0; + var b := 1; + var c := this; + var x := this; + while not (x < 2) + do + c := a-(0-b); + a := b; + b := c; + x := x-1; + end; + return c; +end; diff --git a/gesamt/codeb_georg_fib_001.call b/gesamt/codeb_georg_fib_001.call new file mode 100644 index 0000000..e04b865 --- /dev/null +++ b/gesamt/codeb_georg_fib_001.call @@ -0,0 +1,2 @@ +extern long fib(long); +RET(fib(-1)==-1 && fib(0)==0 && fib(1)==1 && fib(2)==1 && fib(3)==2 && fib(7)+fib(8)==fib(9)); diff --git a/gesamt/codeb_georg_fib_001.instr b/gesamt/codeb_georg_fib_001.instr new file mode 100644 index 0000000..3bc92d4 --- /dev/null +++ b/gesamt/codeb_georg_fib_001.instr @@ -0,0 +1 @@ +201 diff --git a/gesamt/codeb_georg_fib_020.call b/gesamt/codeb_georg_fib_020.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_020.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_021.0 b/gesamt/codeb_georg_fib_021.0 new file mode 100644 index 0000000..f0c2f9d --- /dev/null +++ b/gesamt/codeb_georg_fib_021.0 @@ -0,0 +1,20 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + if x < 2 then return x; end; + var a := 0; + var b := 1; + var c := x; + while not (x < 2) + do + c := a-(0-b); + a := b; + b := c; + x := x-1; + end; + return c; +end; diff --git a/gesamt/codeb_georg_fib_021.call b/gesamt/codeb_georg_fib_021.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_021.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_021.instr b/gesamt/codeb_georg_fib_021.instr new file mode 100644 index 0000000..0f11735 --- /dev/null +++ b/gesamt/codeb_georg_fib_021.instr @@ -0,0 +1 @@ +196 diff --git a/gesamt/codeb_georg_fib_022.0 b/gesamt/codeb_georg_fib_022.0 new file mode 100644 index 0000000..b2ea26c --- /dev/null +++ b/gesamt/codeb_georg_fib_022.0 @@ -0,0 +1,19 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + var c := x; + while not (x < 2) + do + c := a-(0-b); + a := b; + b := c; + x := x-1; + end; + return c; +end; diff --git a/gesamt/codeb_georg_fib_022.call b/gesamt/codeb_georg_fib_022.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_022.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_022.instr b/gesamt/codeb_georg_fib_022.instr new file mode 100644 index 0000000..86a0307 --- /dev/null +++ b/gesamt/codeb_georg_fib_022.instr @@ -0,0 +1 @@ +192 diff --git a/gesamt/codeb_georg_fib_023.0 b/gesamt/codeb_georg_fib_023.0 new file mode 100644 index 0000000..fe8cb87 --- /dev/null +++ b/gesamt/codeb_georg_fib_023.0 @@ -0,0 +1,21 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + var c := x; + while not (x < 2) + do + var A := a; + var B := b; + a := B; + b := A-(0-B); + c := b; + x := x-1; + end; + return c; +end; diff --git a/gesamt/codeb_georg_fib_023.call b/gesamt/codeb_georg_fib_023.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_023.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_023.instr b/gesamt/codeb_georg_fib_023.instr new file mode 100644 index 0000000..eb08bc0 --- /dev/null +++ b/gesamt/codeb_georg_fib_023.instr @@ -0,0 +1 @@ +240 diff --git a/gesamt/codeb_georg_fib_024.0 b/gesamt/codeb_georg_fib_024.0 new file mode 100644 index 0000000..f1b037c --- /dev/null +++ b/gesamt/codeb_georg_fib_024.0 @@ -0,0 +1,20 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + if x < 2 then return x; end; + while not (x < 2) + do + var A := a; + var B := b; + a := B; + b := A-(0-B); + x := x-1; + end; + return b; +end; diff --git a/gesamt/codeb_georg_fib_024.call b/gesamt/codeb_georg_fib_024.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_024.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_024.instr b/gesamt/codeb_georg_fib_024.instr new file mode 100644 index 0000000..7b47338 --- /dev/null +++ b/gesamt/codeb_georg_fib_024.instr @@ -0,0 +1 @@ +221 diff --git a/gesamt/codeb_georg_fib_025.0 b/gesamt/codeb_georg_fib_025.0 new file mode 100644 index 0000000..673e43c --- /dev/null +++ b/gesamt/codeb_georg_fib_025.0 @@ -0,0 +1,19 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + if x < 2 then return x; end; + while not (x < 2) + do + var A := a; + a := b; + b := A-(0-b); + x := x-1; + end; + return b; +end; diff --git a/gesamt/codeb_georg_fib_025.call b/gesamt/codeb_georg_fib_025.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_025.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_025.instr b/gesamt/codeb_georg_fib_025.instr new file mode 100644 index 0000000..5381652 --- /dev/null +++ b/gesamt/codeb_georg_fib_025.instr @@ -0,0 +1 @@ +197 diff --git a/gesamt/codeb_georg_fib_026.0 b/gesamt/codeb_georg_fib_026.0 new file mode 100644 index 0000000..983f882 --- /dev/null +++ b/gesamt/codeb_georg_fib_026.0 @@ -0,0 +1,19 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + if x < 2 then return x; end; + while not (x < 2) + do + var A := a; + a := b; + b := b-(0-A); + x := x-1; + end; + return b; +end; diff --git a/gesamt/codeb_georg_fib_026.call b/gesamt/codeb_georg_fib_026.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_026.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_026.instr b/gesamt/codeb_georg_fib_026.instr new file mode 100644 index 0000000..5381652 --- /dev/null +++ b/gesamt/codeb_georg_fib_026.instr @@ -0,0 +1 @@ +197 diff --git a/gesamt/codeb_georg_fib_027.0 b/gesamt/codeb_georg_fib_027.0 new file mode 100644 index 0000000..d10cd9a --- /dev/null +++ b/gesamt/codeb_georg_fib_027.0 @@ -0,0 +1,20 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + if x < 2 then return x; end; + while not (x < 2) + do + var A := a; + a := b; + b := 0-b; + b := A-b; + x := x-1; + end; + return b; +end; diff --git a/gesamt/codeb_georg_fib_027.call b/gesamt/codeb_georg_fib_027.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_027.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_027.instr b/gesamt/codeb_georg_fib_027.instr new file mode 100644 index 0000000..4438e30 --- /dev/null +++ b/gesamt/codeb_georg_fib_027.instr @@ -0,0 +1 @@ +293 diff --git a/gesamt/codeb_georg_fib_028.0 b/gesamt/codeb_georg_fib_028.0 new file mode 100644 index 0000000..a0e88d7 --- /dev/null +++ b/gesamt/codeb_georg_fib_028.0 @@ -0,0 +1,23 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +method fib(x) + var a := 0; + var b := 1; + if x < 2 + then + return x; + end; + while not (x < 2) + do + var A := a; + a := b; + b := 0-b; + b := A-b; + x := x-1; + end; + return b; +end; diff --git a/gesamt/codeb_georg_fib_028.call b/gesamt/codeb_georg_fib_028.call new file mode 100644 index 0000000..dbf1d12 --- /dev/null +++ b/gesamt/codeb_georg_fib_028.call @@ -0,0 +1,2 @@ +extern long fib(long,long); +RET(fib(0,-1)==-1 && fib(0,0)==0 && fib(0,1)==1 && fib(0,2)==1 && fib(0,3)==2 && fib(0,7)+fib(0,8)==fib(0,9)); diff --git a/gesamt/codeb_georg_fib_028.instr b/gesamt/codeb_georg_fib_028.instr new file mode 100644 index 0000000..4438e30 --- /dev/null +++ b/gesamt/codeb_georg_fib_028.instr @@ -0,0 +1 @@ +293 diff --git a/gesamt/codeb_georg_fib_040.call b/gesamt/codeb_georg_fib_040.call new file mode 100644 index 0000000..29e7471 --- /dev/null +++ b/gesamt/codeb_georg_fib_040.call @@ -0,0 +1,3 @@ +long s[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; +extern long fib(long *,long); +RET(fib(s,-1)==-1 && fib(s,0)==0 && fib(s,1)==1 && fib(s,2)==1 && fib(s,3)==2 && fib(s,7)+fib(s,8)==fib(s,9)); diff --git a/gesamt/codeb_georg_fib_041.0 b/gesamt/codeb_georg_fib_041.0 new file mode 100644 index 0000000..1daf7d1 --- /dev/null +++ b/gesamt/codeb_georg_fib_041.0 @@ -0,0 +1,21 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +struct f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 end; + +method fib(x) + if x < 0 then return -1; end; f0 := 0; + if x < 1 then return f0; end; f1 := 1; + if x < 2 then return f1; end; f2 := 1; + if x < 3 then return f2; end; f3 := 2; + if x < 4 then return f3; end; f4 := 3; + if x < 5 then return f4; end; f5 := 5; + if x < 6 then return f5; end; f6 := 8; + if x < 7 then return f6; end; f7 := 13; + if x < 8 then return f7; end; f8 := 21; + if x < 9 then return f8; end; f9 := 34; + return f9; +end; diff --git a/gesamt/codeb_georg_fib_041.call b/gesamt/codeb_georg_fib_041.call new file mode 100644 index 0000000..29e7471 --- /dev/null +++ b/gesamt/codeb_georg_fib_041.call @@ -0,0 +1,3 @@ +long s[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; +extern long fib(long *,long); +RET(fib(s,-1)==-1 && fib(s,0)==0 && fib(s,1)==1 && fib(s,2)==1 && fib(s,3)==2 && fib(s,7)+fib(s,8)==fib(s,9)); diff --git a/gesamt/codeb_georg_fib_041.instr b/gesamt/codeb_georg_fib_041.instr new file mode 100644 index 0000000..b4f334f --- /dev/null +++ b/gesamt/codeb_georg_fib_041.instr @@ -0,0 +1 @@ +141 diff --git a/gesamt/codeb_georg_fib_042.0 b/gesamt/codeb_georg_fib_042.0 new file mode 100644 index 0000000..96c17d7 --- /dev/null +++ b/gesamt/codeb_georg_fib_042.0 @@ -0,0 +1,21 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +struct f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 end; + +method fib(x) + if x < 0 then return -1; end; f0 := 0; + if x < 1 then return f0; end; f1 := 1; + if x < 2 then return f1; end; f2 := f0-(0-f1); + if x < 3 then return f2; end; f3 := f1-(0-f2); + if x < 4 then return f3; end; f4 := f2-(0-f3); + if x < 5 then return f4; end; f5 := f3-(0-f4); + if x < 6 then return f5; end; f6 := f4-(0-f5); + if x < 7 then return f6; end; f7 := f5-(0-f6); + if x < 8 then return f7; end; f8 := f6-(0-f7); + if x < 9 then return f8; end; f9 := f7-(0-f8); + return f9; +end; diff --git a/gesamt/codeb_georg_fib_042.call b/gesamt/codeb_georg_fib_042.call new file mode 100644 index 0000000..29e7471 --- /dev/null +++ b/gesamt/codeb_georg_fib_042.call @@ -0,0 +1,3 @@ +long s[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; +extern long fib(long *,long); +RET(fib(s,-1)==-1 && fib(s,0)==0 && fib(s,1)==1 && fib(s,2)==1 && fib(s,3)==2 && fib(s,7)+fib(s,8)==fib(s,9)); diff --git a/gesamt/codeb_georg_fib_042.instr b/gesamt/codeb_georg_fib_042.instr new file mode 100644 index 0000000..997def4 --- /dev/null +++ b/gesamt/codeb_georg_fib_042.instr @@ -0,0 +1 @@ +237 diff --git a/gesamt/codeb_georg_fib_043.0 b/gesamt/codeb_georg_fib_043.0 new file mode 100644 index 0000000..4db524a --- /dev/null +++ b/gesamt/codeb_georg_fib_043.0 @@ -0,0 +1,22 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +struct f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 end; + +method fib(x) + var t := this; + if x < 0 then return -1; end; t.f0 := 0; + if x < 1 then return f0; end; t.f1 := 1; + if x < 2 then return f1; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 3 then return f2; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 4 then return f3; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 5 then return f4; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 6 then return f5; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 7 then return f6; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 8 then return f7; end; t.f2 := t.f0-(0-t.f1); t := t--8; + if x < 9 then return f8; end; t.f2 := t.f0-(0-t.f1); t := t--8; + return f9; +end; diff --git a/gesamt/codeb_georg_fib_043.call b/gesamt/codeb_georg_fib_043.call new file mode 100644 index 0000000..29e7471 --- /dev/null +++ b/gesamt/codeb_georg_fib_043.call @@ -0,0 +1,3 @@ +long s[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; +extern long fib(long *,long); +RET(fib(s,-1)==-1 && fib(s,0)==0 && fib(s,1)==1 && fib(s,2)==1 && fib(s,3)==2 && fib(s,7)+fib(s,8)==fib(s,9)); diff --git a/gesamt/codeb_georg_fib_043.instr b/gesamt/codeb_georg_fib_043.instr new file mode 100644 index 0000000..c48f9e0 --- /dev/null +++ b/gesamt/codeb_georg_fib_043.instr @@ -0,0 +1 @@ +269 diff --git a/gesamt/codeb_georg_fib_044.0 b/gesamt/codeb_georg_fib_044.0 new file mode 100644 index 0000000..c8e1a16 --- /dev/null +++ b/gesamt/codeb_georg_fib_044.0 @@ -0,0 +1,24 @@ +/* fibonacci */ + +/* F_0 = 0 */ +/* F_1 = 1 */ +/* F_n = F_{n-1} + F_{n-2} */ + +struct a b c end; + +method fib(x) + if x < 0 then return x; end; + a := 0; + if x < 1 then return x; end; + b := 1; + if x < 2 then return x; end; + var t := this; + + while not (x < 2) + do + t.c := t.a-(0-t.b); + t := t--8; + x := x-1; + end; + return (t-8).c; +end; diff --git a/gesamt/codeb_georg_fib_044.call b/gesamt/codeb_georg_fib_044.call new file mode 100644 index 0000000..29e7471 --- /dev/null +++ b/gesamt/codeb_georg_fib_044.call @@ -0,0 +1,3 @@ +long s[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; +extern long fib(long *,long); +RET(fib(s,-1)==-1 && fib(s,0)==0 && fib(s,1)==1 && fib(s,2)==1 && fib(s,3)==2 && fib(s,7)+fib(s,8)==fib(s,9)); diff --git a/gesamt/codeb_georg_fib_044.instr b/gesamt/codeb_georg_fib_044.instr new file mode 100644 index 0000000..95de1ee --- /dev/null +++ b/gesamt/codeb_georg_fib_044.instr @@ -0,0 +1 @@ +297 diff --git a/gesamt/codeb_intelli_01.0 b/gesamt/codeb_intelli_01.0 new file mode 100644 index 0000000..69c53bb --- /dev/null +++ b/gesamt/codeb_intelli_01.0 @@ -0,0 +1,6 @@ +struct goo gaa gee end; + +method s(x y) + var foobar := (this.gaa * x.goo) - (y * -2); + return foobar * foobar; +end; diff --git a/gesamt/codeb_intelli_01.call b/gesamt/codeb_intelli_01.call new file mode 100644 index 0000000..4f63ce3 --- /dev/null +++ b/gesamt/codeb_intelli_01.call @@ -0,0 +1,5 @@ +extern long s(long *this, long*, long); + +long ar[] = {111, 222, 333}; + +RET(s(ar, ar, 5) == ((ar[1] * ar[0]) - (5 * -2)) * ((ar[1] * ar[0]) - (5 * -2))); diff --git a/gesamt/codeb_intelli_01.instr b/gesamt/codeb_intelli_01.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codeb_intelli_01.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codeb_intelli_02.0 b/gesamt/codeb_intelli_02.0 new file mode 100644 index 0000000..122a65d --- /dev/null +++ b/gesamt/codeb_intelli_02.0 @@ -0,0 +1,13 @@ +method a() + var u := 3; + var v := this; + return u - (v - 10); +end; + +method b() + var u := 10; + var v := u; + return (u - (-1 * v)); +end; + + diff --git a/gesamt/codeb_intelli_02.call b/gesamt/codeb_intelli_02.call new file mode 100644 index 0000000..f4b6a3d --- /dev/null +++ b/gesamt/codeb_intelli_02.call @@ -0,0 +1,5 @@ +extern long a(long long this); +extern long b(long long this); + + +RET(a(20) == -7 && b(0xDEAD) == 20); diff --git a/gesamt/codeb_intelli_02.instr b/gesamt/codeb_intelli_02.instr new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/gesamt/codeb_intelli_02.instr @@ -0,0 +1 @@ +9 diff --git a/gesamt/codeb_intelli_03.0 b/gesamt/codeb_intelli_03.0 new file mode 100644 index 0000000..0e1c22e --- /dev/null +++ b/gesamt/codeb_intelli_03.0 @@ -0,0 +1,17 @@ +struct x y z end; + +method a() + var u := this.x; + var v := 4711; + u := u * this.y; + v := u - (0 - v); + return u - v; +end; + +method b(a) + var u := 10; + u := a.z; + return u * 2; +end; + + diff --git a/gesamt/codeb_intelli_03.call b/gesamt/codeb_intelli_03.call new file mode 100644 index 0000000..a9c4795 --- /dev/null +++ b/gesamt/codeb_intelli_03.call @@ -0,0 +1,6 @@ +extern long a(long long *this); +extern long b(long long this, long long *a); + +long long ar[3] = { 2, 4, 8 }; + +RET(a(ar) == -4711 && b(0xDEAD, ar) == 16); diff --git a/gesamt/codeb_intelli_03.instr b/gesamt/codeb_intelli_03.instr new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/gesamt/codeb_intelli_03.instr @@ -0,0 +1 @@ +12 diff --git a/gesamt/codeb_intelli_04.0 b/gesamt/codeb_intelli_04.0 new file mode 100644 index 0000000..85a12c1 --- /dev/null +++ b/gesamt/codeb_intelli_04.0 @@ -0,0 +1,8 @@ +struct x y z end; + +method a() + this.x := /*0*/815; + /*z := y * this.x;*/ + return this.x; +end; + diff --git a/gesamt/codeb_intelli_04.call b/gesamt/codeb_intelli_04.call new file mode 100644 index 0000000..130f710 --- /dev/null +++ b/gesamt/codeb_intelli_04.call @@ -0,0 +1,6 @@ +extern long a(long long *this); + + +long long ar[3] = { 2, 4, 8 }; + +RET(a(ar) == 815 && ar[0] == 815); diff --git a/gesamt/codeb_intelli_04.instr b/gesamt/codeb_intelli_04.instr new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/gesamt/codeb_intelli_04.instr @@ -0,0 +1 @@ +3 diff --git a/gesamt/codeb_intelli_05.0 b/gesamt/codeb_intelli_05.0 new file mode 100644 index 0000000..a110dc3 --- /dev/null +++ b/gesamt/codeb_intelli_05.0 @@ -0,0 +1,11 @@ +struct x y z end; + +method a() + this.x := /*0*/815; + z := y * this.x; + return this.z; +end; + + + + diff --git a/gesamt/codeb_intelli_05.call b/gesamt/codeb_intelli_05.call new file mode 100644 index 0000000..fb14422 --- /dev/null +++ b/gesamt/codeb_intelli_05.call @@ -0,0 +1,6 @@ +extern long a(long long *this); + + +long long ar[3] = { 2, 4, 8 }; + +RET(a(ar) == 3260 && ar[2] == 3260 && ar[0] == 815); \ No newline at end of file diff --git a/gesamt/codeb_intelli_05.instr b/gesamt/codeb_intelli_05.instr new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/gesamt/codeb_intelli_05.instr @@ -0,0 +1 @@ +6 diff --git a/gesamt/codeb_intelli_06.0 b/gesamt/codeb_intelli_06.0 new file mode 100644 index 0000000..8033ef1 --- /dev/null +++ b/gesamt/codeb_intelli_06.0 @@ -0,0 +1,8 @@ +struct x y z end; + +method b(a) + a.x := 3; + a.y := 2; + a.z := (a.x * a.y) - 10; + return a; +end; diff --git a/gesamt/codeb_intelli_06.call b/gesamt/codeb_intelli_06.call new file mode 100644 index 0000000..6f32852 --- /dev/null +++ b/gesamt/codeb_intelli_06.call @@ -0,0 +1,5 @@ +extern long long* b(long long this, long long *a); + +long long ar[3] = { 2, 4, 8 }; + +RET(b(0xDEAD, ar) == ar && ar[0] == 3 && ar[1] == 2 && ar[2] == -4); diff --git a/gesamt/codeb_intelli_06.instr b/gesamt/codeb_intelli_06.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codeb_intelli_06.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codeb_intelli_07.0 b/gesamt/codeb_intelli_07.0 new file mode 100644 index 0000000..a56f9e9 --- /dev/null +++ b/gesamt/codeb_intelli_07.0 @@ -0,0 +1,8 @@ +struct x y z end; + +method m(x) + var a := x; + this.x := (this.y or this.z) = a; + x := 47; + return this.y * x; +end; diff --git a/gesamt/codeb_intelli_07.call b/gesamt/codeb_intelli_07.call new file mode 100644 index 0000000..d66845c --- /dev/null +++ b/gesamt/codeb_intelli_07.call @@ -0,0 +1,5 @@ +extern long long m(long long *this, long long x); + +long long ar[3] = { 2, 4, 8 }; + +RET(m(ar, 12) == 188 && ar[0] == 1 && ar[1] == 4 && ar[2] == 8); diff --git a/gesamt/codeb_intelli_07.instr b/gesamt/codeb_intelli_07.instr new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/gesamt/codeb_intelli_07.instr @@ -0,0 +1 @@ +11 diff --git a/gesamt/codeb_intelli_08.0 b/gesamt/codeb_intelli_08.0 new file mode 100644 index 0000000..c11c52b --- /dev/null +++ b/gesamt/codeb_intelli_08.0 @@ -0,0 +1,6 @@ +method m() + if this < 10 then + return 3; + end; + return 0; +end; diff --git a/gesamt/codeb_intelli_08.call b/gesamt/codeb_intelli_08.call new file mode 100644 index 0000000..5d374dc --- /dev/null +++ b/gesamt/codeb_intelli_08.call @@ -0,0 +1,3 @@ +extern long long m(long long this); + +RET(m(9) == 3 && m(10) == 0); \ No newline at end of file diff --git a/gesamt/codeb_intelli_08.instr b/gesamt/codeb_intelli_08.instr new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/gesamt/codeb_intelli_08.instr @@ -0,0 +1 @@ +8 diff --git a/gesamt/codeb_intelli_09.0 b/gesamt/codeb_intelli_09.0 new file mode 100644 index 0000000..e911c52 --- /dev/null +++ b/gesamt/codeb_intelli_09.0 @@ -0,0 +1,11 @@ +method m(a) + var u := 10; + if this < 50 then + if 10 < a then + return a - 10; + end; + var x := 20; + u := u - (x * -1); + end; + return u; +end; diff --git a/gesamt/codeb_intelli_09.call b/gesamt/codeb_intelli_09.call new file mode 100644 index 0000000..372469e --- /dev/null +++ b/gesamt/codeb_intelli_09.call @@ -0,0 +1,3 @@ +extern long long m(long long this, long long a); + +RET(m(51, 0) == 10 && m(-3, 5) == 30 && m(35, 18) == 8); \ No newline at end of file diff --git a/gesamt/codeb_intelli_09.instr b/gesamt/codeb_intelli_09.instr new file mode 100644 index 0000000..d6b2404 --- /dev/null +++ b/gesamt/codeb_intelli_09.instr @@ -0,0 +1 @@ +19 diff --git a/gesamt/codeb_intelli_10.0 b/gesamt/codeb_intelli_10.0 new file mode 100644 index 0000000..812d872 --- /dev/null +++ b/gesamt/codeb_intelli_10.0 @@ -0,0 +1,14 @@ +method m(a) + var u := 10; + if this < 50 then + if 10 < a then + return a - 10; + end; + var x:= 20; + if this < 0 then + x := x or 64; + end; + u := u * x; + end; + return u; +end; diff --git a/gesamt/codeb_intelli_10.call b/gesamt/codeb_intelli_10.call new file mode 100644 index 0000000..39c3e6d --- /dev/null +++ b/gesamt/codeb_intelli_10.call @@ -0,0 +1,3 @@ +extern long long m(long long this, long long a); + +RET(m(60, 0) == 10 && m(0, 10) == 200 && m(35, 18) == 8 && m(-10, 0) == 840); \ No newline at end of file diff --git a/gesamt/codeb_intelli_10.instr b/gesamt/codeb_intelli_10.instr new file mode 100644 index 0000000..e522732 --- /dev/null +++ b/gesamt/codeb_intelli_10.instr @@ -0,0 +1 @@ +38 diff --git a/gesamt/codeb_intelli_11.0 b/gesamt/codeb_intelli_11.0 new file mode 100644 index 0000000..2927030 --- /dev/null +++ b/gesamt/codeb_intelli_11.0 @@ -0,0 +1,8 @@ +method m() + if 5 < 10 then + return 10; + else + return 5; + end; +end; + diff --git a/gesamt/codeb_intelli_11.call b/gesamt/codeb_intelli_11.call new file mode 100644 index 0000000..3a71fea --- /dev/null +++ b/gesamt/codeb_intelli_11.call @@ -0,0 +1,3 @@ +extern long long m(long long this); + +RET(m(0xCCACC) == 10); \ No newline at end of file diff --git a/gesamt/codeb_intelli_11.instr b/gesamt/codeb_intelli_11.instr new file mode 100644 index 0000000..d8263ee --- /dev/null +++ b/gesamt/codeb_intelli_11.instr @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/gesamt/codeb_intelli_12.0 b/gesamt/codeb_intelli_12.0 new file mode 100644 index 0000000..a33d8fc --- /dev/null +++ b/gesamt/codeb_intelli_12.0 @@ -0,0 +1,29 @@ +method m() + if this < -100 then + return -4711; + else + if (-10 < this) then + if (this < -5) then + if (this = -6) then + return 1; + else + return 2; + end; + else + if this = -4 then + return 3; + end; + if this = -3 then + return 6; + end; + if this = -2 then + return 7; + end; + end; + else + return 4; + end; + end; + return 5; +end; + diff --git a/gesamt/codeb_intelli_12.call b/gesamt/codeb_intelli_12.call new file mode 100644 index 0000000..1f1c37a --- /dev/null +++ b/gesamt/codeb_intelli_12.call @@ -0,0 +1,5 @@ +extern long long m(long long this); + +RET(m(-2) == 7 && m(-1) == 5); + +//RET(m(-200) == -4711 && m(-6) == 1 && m(-7) == 2 && m(-4) == 3 && m(-11) == 4 && m(-3) == 6 && m(-2) == 7 && m(-1) == 5); diff --git a/gesamt/codeb_intelli_12.instr b/gesamt/codeb_intelli_12.instr new file mode 100644 index 0000000..f04c001 --- /dev/null +++ b/gesamt/codeb_intelli_12.instr @@ -0,0 +1 @@ +29 diff --git a/gesamt/codeb_intelli_13.0 b/gesamt/codeb_intelli_13.0 new file mode 100644 index 0000000..a5183d4 --- /dev/null +++ b/gesamt/codeb_intelli_13.0 @@ -0,0 +1,8 @@ +method m() + var x := 10; + while 0 < x do + x := x-1; + end; + return x; +end; + diff --git a/gesamt/codeb_intelli_13.call b/gesamt/codeb_intelli_13.call new file mode 100644 index 0000000..bb251ad --- /dev/null +++ b/gesamt/codeb_intelli_13.call @@ -0,0 +1,3 @@ +extern long long m(long long this); + +RET(m(0xBABE) == 0); \ No newline at end of file diff --git a/gesamt/codeb_intelli_13.instr b/gesamt/codeb_intelli_13.instr new file mode 100644 index 0000000..a787364 --- /dev/null +++ b/gesamt/codeb_intelli_13.instr @@ -0,0 +1 @@ +34 diff --git a/gesamt/codeb_intelli_14.0 b/gesamt/codeb_intelli_14.0 new file mode 100644 index 0000000..b1b91cc --- /dev/null +++ b/gesamt/codeb_intelli_14.0 @@ -0,0 +1,16 @@ +struct x end; + +method m(s) + var i := 0; + var sum := 0; + while i < s do + (this - (-8 * i)).x := (this - (-8 * i)).x * 10; + if (this - (-8 * i)).x = 47110 then + (this - (-8 * i)).x := 0815; + end; + sum := sum - ((this - (-8 * i)).x * -1); + i := i - (-1); + end; + return sum; +end; + diff --git a/gesamt/codeb_intelli_14.call b/gesamt/codeb_intelli_14.call new file mode 100644 index 0000000..d3fedd8 --- /dev/null +++ b/gesamt/codeb_intelli_14.call @@ -0,0 +1,7 @@ +extern long long m(long long *this, long long s); + +long long ar[] = { 1, 2, 3, 4}; +long long ar2[] = { -7, 4711, 3, 4}; + +RET(m(ar, 3) == 60 && ar[0] == 10 && ar[1] == 20 && ar[2] == 30 && ar[3] == 4 +&& m(ar2, 2) == 745 && ar2[0] == -70 && ar2[1] == 815 && ar2[2] == 3); diff --git a/gesamt/codeb_intelli_14.instr b/gesamt/codeb_intelli_14.instr new file mode 100644 index 0000000..f6b91e0 --- /dev/null +++ b/gesamt/codeb_intelli_14.instr @@ -0,0 +1 @@ +56 diff --git a/gesamt/codeb_intelli_15.0 b/gesamt/codeb_intelli_15.0 new file mode 100644 index 0000000..7ed79aa --- /dev/null +++ b/gesamt/codeb_intelli_15.0 @@ -0,0 +1,32 @@ +struct x end; + +method m1(size) + var x:= size - (-10); + x := (x * 0) - 20; + var i:= 0; + while not (i = size) do + if i < 1 then + (this - (i * -8)).x := (this - (i * -8)).x - (-20); + else + (this - (i * -8)).x := (this - ((i - 1) * -8)).x or 128; + end; + i := i - -1; + end; + return x; +end; + +method m2(y) + if 100 < y then + return 0; + end; + var x := -10; + while x < y do + x := x * -2; + end; + if y < 0 then + return -1 * x; + else + return 1 * x; + end; +end; + diff --git a/gesamt/codeb_intelli_15.call b/gesamt/codeb_intelli_15.call new file mode 100644 index 0000000..a004b8d --- /dev/null +++ b/gesamt/codeb_intelli_15.call @@ -0,0 +1,7 @@ +extern long long m1(long long *this, long long size); +extern long long m2(long long this, long long y); + +long long ar[] = { 2, 4, 8, 16, 32 }; + +RET(m1(ar, 3) == -20 && ar[0] == 22 && ar[1] == 150 && ar[2] == 150 && +m2(0xABC, 101) == 0 && m2(0xABC, -5) == -20 && m2(0xABC, 100) == 320); \ No newline at end of file diff --git a/gesamt/codeb_intelli_15.instr b/gesamt/codeb_intelli_15.instr new file mode 100644 index 0000000..d15a2cc --- /dev/null +++ b/gesamt/codeb_intelli_15.instr @@ -0,0 +1 @@ +80 diff --git a/gesamt/codeb_skinner33_00.0 b/gesamt/codeb_skinner33_00.0 new file mode 100644 index 0000000..a1c1a9e --- /dev/null +++ b/gesamt/codeb_skinner33_00.0 @@ -0,0 +1,27 @@ +struct bar end; + +method foo(bar) + while not(0 = bar) do + bar := (bar - 1); + this.bar := (this.bar * 2); + end; + return this.bar; +end; + +method bar(x) + while 1 do + x := x - (-1); + if not(x = 10) then + x := x * 1; + else + return x; + end; + end; +end; + +method blu(a) + while 0 do + return 3; + end; + return 4; +end; diff --git a/gesamt/codeb_skinner33_00.call b/gesamt/codeb_skinner33_00.call new file mode 100644 index 0000000..147d180 --- /dev/null +++ b/gesamt/codeb_skinner33_00.call @@ -0,0 +1,8 @@ + +long foo(long*, long); +long bar(long, long); +long blu(long, long); + +long inp[] = {2}; + +RET(foo(inp, 4) == 32 && blu(1337,42) == 4 && bar(0xDEAD,4) == 10 && bar(0x1337, 9) == 10); diff --git a/gesamt/codeb_skinner33_00.instr b/gesamt/codeb_skinner33_00.instr new file mode 100644 index 0000000..ea70ce0 --- /dev/null +++ b/gesamt/codeb_skinner33_00.instr @@ -0,0 +1 @@ +72 diff --git a/gesamt/codeb_skinner33_01.0 b/gesamt/codeb_skinner33_01.0 new file mode 100644 index 0000000..d6a008f --- /dev/null +++ b/gesamt/codeb_skinner33_01.0 @@ -0,0 +1,30 @@ +struct a end; + + +method foo(x) + if (x-1) then + return 5*(this*3); + else + return 4*(2*this); + end; +end; + +method bar(n) + var x := 5; + var y := 6; + if n then + return x - a; + end; + if n < 7 then + return y * a; + end; + return x; +end; + +method bla() + if a then + return 5; + else + return a; + end; +end; diff --git a/gesamt/codeb_skinner33_01.call b/gesamt/codeb_skinner33_01.call new file mode 100644 index 0000000..17eb2f8 --- /dev/null +++ b/gesamt/codeb_skinner33_01.call @@ -0,0 +1,9 @@ + +long foo(long, long); +long bar(long*, long); +long bla(long*); + +long muh[] = {3}, kuh[] = {0}; + +RET(foo(5,1) == 40 && foo(4,0) == 60 && bar(muh, 1) == 2 && bar(muh,0) == 18 && bla(muh) == 5 && bla(kuh) == 0); + diff --git a/gesamt/codeb_skinner33_01.instr b/gesamt/codeb_skinner33_01.instr new file mode 100644 index 0000000..bb95160 --- /dev/null +++ b/gesamt/codeb_skinner33_01.instr @@ -0,0 +1 @@ +33 diff --git a/gesamt/codeb_skinner33_02.0 b/gesamt/codeb_skinner33_02.0 new file mode 100644 index 0000000..17c6bb5 --- /dev/null +++ b/gesamt/codeb_skinner33_02.0 @@ -0,0 +1,24 @@ + +struct a b end; + +method foo() + var x := 5; + if this * x then + return (x - this) * x; + end; + return x; +end; + +method bar(n) + var x := n; + this.a := x; + return x; +end; + +method bla(m n) + if not((m-n) < (m*n)) then + return m; + else + return n; + end; +end; diff --git a/gesamt/codeb_skinner33_02.call b/gesamt/codeb_skinner33_02.call new file mode 100644 index 0000000..e07c489 --- /dev/null +++ b/gesamt/codeb_skinner33_02.call @@ -0,0 +1,10 @@ + +long foo(long); +long bar(long*, long); +long bla(long, long, long); + +long muh[] = {1, 3}; +long kuh[] = {2,6}; + +RET(foo(1) == 20 && foo(0) == 5 && bar(muh, 5) == 5 && muh[0] == 5 && bar(muh,10) == 10 && muh[0] == 10 && bla(0xDEAF, 10,1) == 1 && bla(0xABC, 10,-1) == 10 ); + diff --git a/gesamt/codeb_skinner33_02.instr b/gesamt/codeb_skinner33_02.instr new file mode 100644 index 0000000..e522732 --- /dev/null +++ b/gesamt/codeb_skinner33_02.instr @@ -0,0 +1 @@ +38 diff --git a/gesamt/codeb_skinner33_03.0 b/gesamt/codeb_skinner33_03.0 new file mode 100644 index 0000000..00bdbf4 --- /dev/null +++ b/gesamt/codeb_skinner33_03.0 @@ -0,0 +1,77 @@ +struct a end; + +method foo(b) + if 0 * b then + return b; + else + return (b - a); + end; +end; + +method bar(b c) + if b - b then + return 3; + else + if b - this then + return 2; + else + if b * 0 then + return 3; + else + if c * 1 then + return 1; + else + return 4; + end; + end; + end; + end; +end; + +method bla() + if a * 0 then + return 3; + else + if a * 1 then + return 1; + else + return 2; + end; + end; +end; + +method blub() + if 0 * a then + return 3; + else + if 1 * a then + return 1; + else + return 2; + end; + end; +end; + +method miau(n) + if 0 * (a - n) then + return 3; + else + if 1 * (a -n) then + return 2; + else + return (n-(a-1)); + end; + end; +end; + +method null(n) + if (a - n) * 0 then + return 3; + else + if (a -n) * 1 then + return 2; + else + return (a - (n Eingabe von $i:" + cat $i + echo + RESFILE=test${beispiel}out$$ + $PROGRAM <$i >$RESFILE + retval=$? + echo -n "Übersetzung: " + if test $retval -eq 0 + then + echo "Status korrekt" + else + echo "[Errot] Status=$retval. Erwartet: 0" + let errorfound=1 + fi + echo + echo "Ausgabe:" + if [ -f ~/test/scripts/clr.py ]; then + cat $RESFILE | ~/test/scripts/clr.py + else + cat $RESFILE + fi + mv -f $RESFILE $RESFILE.s + CALLFILE=${i%.*}.call + echo + if [ ! -f $CALLFILE ]; then + echo "Fehler: Datei $CALLFILE existiert nicht, kann Code nicht ausführen..." + exit 1 + else + echo "Übersetze und linke das Testprogramm:" + if cc -g -I. -DCALL=\"$CALLFILE\" $LOC/testmain.c $LOC/callingconvention.o $RESFILE.s; then + echo + echo "Rufe folgendes Codefragment auf:" + cat $CALLFILE + echo + gdb ./a.out + else + echo "[Error] Erzeugter Code konnte nicht assembliert und gelinkt werden." + let errorfound=1 + fi + fi + rm -f a.out $RESFILE $RESFILE.s +fi -- 2.25.1