a68g-moids.h

     
   1  //! @file a68g-moids.h
   2  //! @author J. Marcel van der Veer
   3  
   4  //! @section Copyright
   5  //!
   6  //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
   7  //! Copyright 2001-2024 J. Marcel van der Veer [algol68g@xs4all.nl].
   8  
   9  //! @section License
  10  //!
  11  //! This program is free software; you can redistribute it and/or modify it 
  12  //! under the terms of the GNU General Public License as published by the 
  13  //! Free Software Foundation; either version 3 of the License, or 
  14  //! (at your option) any later version.
  15  //!
  16  //! This program is distributed in the hope that it will be useful, but 
  17  //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
  18  //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
  19  //! more details. You should have received a copy of the GNU General Public 
  20  //! License along with this program. If not, see [http://www.gnu.org/licenses/].
  21  
  22  //! @section Synopsis
  23  //!
  24  //! Definitions related to MOIDS.
  25  
  26  #if !defined (__A68G_MOIDS_H__)
  27  #define __A68G_MOIDS_H__
  28  
  29  BOOL_T basic_coercions (MOID_T *, MOID_T *, int, int);
  30  BOOL_T clause_allows_balancing (int);
  31  BOOL_T is_balanced (NODE_T *, SOID_T *, int);
  32  BOOL_T is_coercible_in_context (SOID_T *, SOID_T *, int);
  33  BOOL_T is_coercible (MOID_T *, MOID_T *, int, int);
  34  BOOL_T is_coercible_series (MOID_T *, MOID_T *, int, int);
  35  BOOL_T is_coercible_stowed (MOID_T *, MOID_T *, int, int);
  36  BOOL_T is_deprefable (MOID_T *);
  37  BOOL_T is_equal_modes (MOID_T *, MOID_T *, int);
  38  BOOL_T is_firmly_coercible (MOID_T *, MOID_T *, int);
  39  BOOL_T is_firm (MOID_T *, MOID_T *);
  40  BOOL_T is_meekly_coercible (MOID_T *, MOID_T *, int);
  41  BOOL_T is_mode_isnt_well (MOID_T *);
  42  BOOL_T is_moid_in_pack (MOID_T *, PACK_T *, int);
  43  BOOL_T is_name_struct (MOID_T *);
  44  BOOL_T is_nonproc (MOID_T *);
  45  BOOL_T is_printable_mode (MOID_T *);
  46  BOOL_T is_proc_ref_file_void_or_format (const MOID_T *);
  47  BOOL_T is_readable_mode (MOID_T *);
  48  BOOL_T is_ref_row (MOID_T *);
  49  BOOL_T is_rows_type (MOID_T *);
  50  BOOL_T is_softly_coercible (MOID_T *, MOID_T *, int);
  51  BOOL_T is_strongly_coercible (MOID_T *, MOID_T *, int);
  52  BOOL_T is_strong_name (MOID_T *, MOID_T *);
  53  BOOL_T is_strong_slice (MOID_T *, MOID_T *);
  54  BOOL_T is_subset (MOID_T *, MOID_T *, int);
  55  BOOL_T is_transput_mode (MOID_T *, char);
  56  BOOL_T is_unitable (MOID_T *, MOID_T *, int);
  57  BOOL_T is_weakly_coercible (MOID_T *, MOID_T *, int);
  58  BOOL_T is_widenable (MOID_T *, MOID_T *);
  59  char *mode_error_text (NODE_T *, MOID_T *, MOID_T *, int, int, int);
  60  MOID_T *absorb_related_subsets (MOID_T *);
  61  MOID_T *depref_completely (MOID_T *);
  62  MOID_T *depref_once (MOID_T *);
  63  MOID_T *depref_rows (MOID_T *, MOID_T *);
  64  MOID_T *deproc_completely (MOID_T *);
  65  MOID_T *derow (MOID_T *);
  66  MOID_T *determine_unique_mode (SOID_T *, int);
  67  MOID_T *get_balanced_mode (MOID_T *, int, BOOL_T, int);
  68  MOID_T *make_series_from_moids (MOID_T *, MOID_T *);
  69  MOID_T *make_united_mode (MOID_T *);
  70  MOID_T *pack_soids_in_moid (SOID_T *, int);
  71  MOID_T *unites_to (MOID_T *, MOID_T *);
  72  MOID_T *widens_to (const MOID_T *, const MOID_T *);
  73  void absorb_series_pack (MOID_T **);
  74  void absorb_series_union_pack (MOID_T **);
  75  void add_to_soid_list (SOID_T **, NODE_T *, SOID_T *);
  76  void cannot_coerce (NODE_T *, MOID_T *, MOID_T *, int, int, int);
  77  void coerce_enclosed (NODE_T *, SOID_T *);
  78  void coerce_formula (NODE_T *, SOID_T *);
  79  void coerce_operand (NODE_T *, SOID_T *);
  80  void coerce_unit (NODE_T *, SOID_T *);
  81  void free_soid_list (SOID_T *);
  82  void investigate_firm_relations (PACK_T *, PACK_T *, BOOL_T *, BOOL_T *);
  83  void make_coercion (NODE_T *, int, MOID_T *);
  84  void make_depreffing_coercion (NODE_T *, MOID_T *, MOID_T *);
  85  void make_ref_rowing_coercion (NODE_T *, MOID_T *, MOID_T *);
  86  void make_rowing_coercion (NODE_T *, MOID_T *, MOID_T *);
  87  void make_soid (SOID_T *, int, MOID_T *, int);
  88  void make_strong (NODE_T *, MOID_T *, MOID_T *);
  89  void make_uniting_coercion (NODE_T *, MOID_T *);
  90  void make_void (NODE_T *, MOID_T *);
  91  void make_widening_coercion (NODE_T *, MOID_T *, MOID_T *);
  92  void mode_check_enclosed (NODE_T *, SOID_T *, SOID_T *);
  93  void mode_check_formula (NODE_T *, SOID_T *, SOID_T *);
  94  void mode_check_unit (NODE_T *, SOID_T *, SOID_T *);
  95  void semantic_pitfall (NODE_T *, MOID_T *, int, int);
  96  void warn_for_voiding (NODE_T *, SOID_T *, SOID_T *, int);
  97  
  98  #define DEPREF A68_TRUE
  99  #define NO_DEPREF A68_FALSE
 100  
 101  #define IF_MODE_IS_WELL(n) (! ((n) == M_ERROR || (n) == M_UNDEFINED))
 102  #define INSERT_COERCIONS(n, p, q) make_strong ((n), (p), MOID (q))
 103  
 104  #endif
     


© 2002-2024 J.M. van der Veer (jmvdveer@xs4all.nl)