home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / misc / mas / mashelp / massym.def < prev    next >
Encoding:
Modula Definition  |  1991-03-18  |  1.8 KB  |  74 lines

  1.  
  2. DEFINITION MODULE MASSYM;
  3.  
  4. (* MAS Symbol Definition Module. *)
  5.  
  6.  
  7. (* Import lists and declarations. *)
  8.  
  9. FROM MASSTOR IMPORT LIST;
  10.  
  11.  
  12. VAR NOSHOW: LIST;
  13.  
  14. (* Procedure declarations. *)
  15.  
  16. PROCEDURE ATOM(X: LIST): BOOLEAN;
  17. (*Atom. Test if X is an atom. *)
  18.  
  19.  
  20. PROCEDURE ELEMP(X: LIST): BOOLEAN;
  21. (*Elementary Pointer. Test if X is an elementary SAC-2 structure. *)
  22.  
  23.  
  24. PROCEDURE MEMQ(AL,L: LIST): BOOLEAN;
  25. (*Membership test equal pointers.  a is an object, L a list. t=1 if 
  26. the pointer or atom a occurs in L and otherwise t=0.*)
  27.  
  28.  
  29. PROCEDURE OCCURQ(AL,L: LIST): BOOLEAN;
  30. (*Occurs test equal pointers. a and L are objects. t=TRUE if 
  31. the pointer or atom a occurs in L and otherwise t=FALSE. *)
  32.  
  33.  
  34. PROCEDURE UREAD(): LIST;
  35. (*Universal read. The next atom, symbol, string or list over atoms, 
  36. strings and symbols is read and stored under L. Blanks may occur 
  37. anywhere. Elements of a list may or may not be separated by a comma.*)
  38.  
  39.  
  40. PROCEDURE UWRITE(L: LIST);
  41. (*Universal write. L is an atom, symbol or a list over
  42. atoms and symbols. L is written in the output stream,
  43. followed by blines. *)
  44.  
  45.  
  46. PROCEDURE UWRIT1(L: LIST);
  47. (*Universal write, 1. subalgorithm. L is an atom, a symbol
  48. or a list over atoms or symbols. L is written in the output
  49. stream. *)
  50.  
  51.  
  52. PROCEDURE UNIFY(A,B: LIST; VAR S: LIST): BOOLEAN;
  53. (*Unification. A and B are objects. If there exists a 
  54. most general unificator of A and B, then S is the list of 
  55. substitutions. In this case TRUE is returned. If no unificator
  56. exists, then FALSE is returned and S is undefined. *)
  57.  
  58.  
  59. PROCEDURE GENARRAY(A: LIST): LIST;
  60. (*Generate array reference symbol. S is a generated symbol. *)
  61.  
  62.  
  63. PROCEDURE GENINDEX(A: LIST): LIST;
  64. (*Generate index set. I is an index set. *)
  65.  
  66.  
  67. PROCEDURE ARRAYDEC(A: LIST): LIST;
  68. (*Generate array name declarations. A is an array reference. *)
  69.  
  70.  
  71. END MASSYM.
  72.  
  73.  
  74.