expr.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
---------------------------> Sather 1.1 source file <--------------------------
-- Copyright (C) International Computer Science Institute, 1995.  COPYRIGHT  --
-- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
-- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in    --
-- the file "Doc/License" of the Sather distribution.  The license is also   --
-- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA.  --
--------> Please email comments to sather-bugs@icsi.berkeley.edu. <----------

-- $AM_EXPR: Supertype of expression-like components.
-- AM_EXPR: Implementation to be included by $AM_EXPR nodes. 
-- AM_LOCAL_EXPR: Local variable expression.
-- AM_ARRAY_EXPR: An array creation expression.
-- AM_BND_CREATE_EXPR: Bound routine and iter creation expression.
-- AM_IF_EXPR: Conditional expression.
-- AM_NEW_EXPR: New expression.
-- AM_IS_VOID_EXPR: Test for "void".
-- AM_GLOBAL_EXPR: Global variable expression.
-- AM_ATTR_EXPR: An expression referencing an attribute of an object.
-- AM_VATTR_ASSIGN_EXPR: Assignment to an attribute of a value object.
-- AM_VARR_ASSIGN_EXPR: Assignment to an array element of a value object.   
-- AM_EXCEPT_EXPR: An expression referring to the exception global.
-- AM_STMT_EXPR: An expression with embedded statements.
-- AM_ASIZE_EXPR: the AREF asize read expression
--
-- pSather: (preliminary, just to do semantic checks)
-- AM_HERE_EXPR
-- AM_ANY_EXPR
-- AM_WHERE_EXPR
-- AM_NEAR_EXPR
-- AM_FAR_EXPR
-- AM_AT_EXPR
--
-- Although it belongs to pSather it is used in Sather as well (return 1)
-- AM_CLUSTER_EXPR
-- AM_CLUSTER_SIZE_EXPR



abstract class $AM_EXPR < $AM, $HASH

abstract class $AM_EXPR < $AM, $HASH is -- Supertype of expression-like components. tp:$TP; -- The type of the expression. source: SFILE_ID; source(set: SFILE_ID); copy:$AM_EXPR; end;

class AM_EXPR

class AM_EXPR is -- Supertype of expression-like components. include AM; -- This is used to determine if two expressions are equal, and thus can -- be optimized out. is_eq(a:$OB):BOOL is -- Equality note: changed from "a:$AM_EXPR". return SYS::ob_eq(self,a);-- SYS::ob_eq end; -- this is defined as ~is_eq so that classes don't have to define it again -- if they don't want to. is_neq(a:$OB):BOOL is return ~is_eq(a); end; -- This hash function might be used by the namespace manager, so return -- the object ID if no other hash function is defined. hash:INT is return SYS::id(self).hash;-- SYS::id INT::hash end; end;

class AM_LOCAL_EXPR < $AM_EXPR

class AM_LOCAL_EXPR < $AM_EXPR is -- Local variable expression. include AM_EXPR; attr is_volatile:BOOL; -- True if the variable must be declared -- "volatile". This is necessary in protect statments because -- otherwise longjmp will incorrectly restore the values of locals -- which happen to be held in registers. attr name:IDENT; -- The name of the local in the Sather -- program, if any. attr tp_at:$TP; -- The declared type of the variable. attr needs_init:BOOL; -- True if this local must be initialized -- to 0 at the start of the routine. attr no_assign:BOOL; -- True if this variable may not be -- assigned to because it is currently being typecased on. -- (Used internally). attr is_hot:BOOL; -- set to one if this varaiable is a -- 'hot' argument of an iter. -- This is set by the optimizer! create(src:SFILE_ID, name:IDENT, tp:$TP):SAME is r::=new; r.source:=src; r.name:=name; r.tp_at:=tp;-- AM_LOCAL_EXPR::source AM_LOCAL_EXPR::name AM_LOCAL_EXPR::tp_at return r end; create(src:SFILE_ID, name:IDENT, tp:$TP, as_tp:AS_TYPE_SPEC):SAME is r::=new; r.source:=src; r.name:=name; r.tp_at:=tp; r.as_type:=as_tp;-- AM_LOCAL_EXPR::source AM_LOCAL_EXPR::name AM_LOCAL_EXPR::tp_at AM_LOCAL_EXPR::as_type return r end; is_named:BOOL is -- True if this is a named local variable. return ~void(name) end; tp:$TP is return tp_at end;-- AM_LOCAL_EXPR::tp_at attr as_type : AS_TYPE_SPEC; is_eq(a:$OB):BOOL is -- this is true because a namespace for locals is maintained in trans.sa return SYS::ob_eq(self,a); -- SYS::ob_eq end; hash:INT is -- this is true because a namespace for locals is maintained in trans.sa return SYS::id(self).hash;-- SYS::id INT::hash end; copy:$AM_EXPR is return self; end; end;

class AM_ARRAY_EXPR < $AM_EXPR

class AM_ARRAY_EXPR < $AM_EXPR is -- An array creation expression. include AM_EXPR create->; include ARRAY{$AM_EXPR} append->,merge_with_by-> ; -- An array of the expressions -- specifying the values of the array entries. These must be -- evaluated left to right. The number specifies the size of -- the created array. attr tp_at:$TP; -- The type of the array. create(nargs:INT, source:SFILE_ID):SAME is -- A new definition for a routine or iter with `nargs' arguments -- (including self). r::=new(nargs); r.source:=source; return r end;-- AM_ARRAY_EXPR::source tp:$TP is return tp_at end; -- AM_ARRAY_EXPR::tp_at copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(size,source);-- AM_ARRAY_EXPR::create AM_ARRAY_EXPR::size AM_ARRAY_EXPR::source loop x::=elt!;-- AM_ARRAY_EXPR::elt! if ~void(x) then x:=x.copy; end;-- BOOL::not r.set!(x);-- AM_ARRAY_EXPR::set! end; r.tp_at:=tp_at;-- AM_ARRAY_EXPR::tp_at AM_ARRAY_EXPR::tp_at return r; end; end;

class AM_BND_CREATE_EXPR < $AM_EXPR

class AM_BND_CREATE_EXPR < $AM_EXPR is -- Bound routine or iter creation expression. include AM_EXPR create->; include ARRAY{AM_CALL_ARG} append->,merge_with_by->; -- An array of expressions for the -- bound up arguments in order. attr fun:SIG; -- The routine to bind up. attr bnd_args:ARRAY{INT}; -- The indices of the arguments -- which are bound up in order. 0 is self. attr unbnd_args:ARRAY{INT}; -- The indices of the arguments -- which are not bound in order. 0 is self. attr tp_at:$TP; -- The type of the bound expression. attr is_remote:BOOL; -- true if this bound routine is used for -- a remote procedure call in pSather attr clst:STR; -- string that represents the variable that -- stores the remote cluster create(nargs:INT, source:SFILE_ID):SAME is -- A new definition for a routine or iter with `nargs' arguments -- (including self). r::=new(nargs); r.source:=source; return r end;-- AM_BND_CREATE_EXPR::source tp:$TP is return tp_at end; -- AM_BND_CREATE_EXPR::tp_at copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(size,source);-- AM_BND_CREATE_EXPR::create AM_BND_CREATE_EXPR::size AM_BND_CREATE_EXPR::source r.fun:=fun;-- AM_BND_CREATE_EXPR::fun AM_BND_CREATE_EXPR::fun if ~void(unbnd_args) then r.unbnd_args:=unbnd_args.copy; end;-- AM_BND_CREATE_EXPR::unbnd_args BOOL::not AM_BND_CREATE_EXPR::unbnd_args AM_BND_CREATE_EXPR::unbnd_args ARRAY{1}::copy if ~void(bnd_args) then r.bnd_args:=bnd_args.copy; end;-- AM_BND_CREATE_EXPR::bnd_args BOOL::not AM_BND_CREATE_EXPR::bnd_args AM_BND_CREATE_EXPR::bnd_args ARRAY{1}::copy r.tp_at:=tp_at;-- AM_BND_CREATE_EXPR::tp_at AM_BND_CREATE_EXPR::tp_at return r; end; end;

class AM_IF_EXPR < $AM_EXPR

class AM_IF_EXPR < $AM_EXPR is -- Conditional expression. Only one of the two branches will be -- executed. include AM_EXPR; attr test:$AM_EXPR; -- The boolean expression to test. attr if_true:$AM_EXPR; -- Expression with result if true. attr if_false:$AM_EXPR; -- Expression with result if false. attr tp_at:$TP; -- The type. copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_IF_EXPR::create AM_IF_EXPR::source if ~void(test) then r.test:=test.copy; end;-- AM_IF_EXPR::test BOOL::not AM_IF_EXPR::test AM_IF_EXPR::test if ~void(if_true) then r.if_true:=if_true.copy; end;-- AM_IF_EXPR::if_true BOOL::not AM_IF_EXPR::if_true AM_IF_EXPR::if_true if ~void(if_false) then r.if_false:=if_false.copy; end;-- AM_IF_EXPR::if_false BOOL::not AM_IF_EXPR::if_false AM_IF_EXPR::if_false r.tp_at:=tp_at;-- AM_IF_EXPR::tp_at AM_IF_EXPR::tp_at return r; end; is_eq(am:$OB):BOOL is -- Changed argument from $AM_EXPR typecase am when AM_IF_EXPR then if void(test)/=void(am.test) or -- AM_IF_EXPR::test BOOL::is_eq AM_IF_EXPR::test BOOL::not void(if_true)/=void(am.if_true) or-- AM_IF_EXPR::if_true BOOL::is_eq AM_IF_EXPR::if_true BOOL::not void(if_false)/=void(am.if_false) or-- AM_IF_EXPR::if_false BOOL::is_eq AM_IF_EXPR::if_false BOOL::not tp_at/=am.tp_at then return false;end;-- AM_IF_EXPR::tp_at AM_IF_EXPR::tp_at BOOL::not return (void(test) or test=am.test) and-- AM_IF_EXPR::test AM_IF_EXPR::test AM_IF_EXPR::test (void(if_true) or if_true=am.if_true) and-- AM_IF_EXPR::if_true AM_IF_EXPR::if_true AM_IF_EXPR::if_true (void(if_false) or if_false=am.if_false);-- AM_IF_EXPR::if_false AM_IF_EXPR::if_false AM_IF_EXPR::if_false else return false; end; end; tp:$TP is return tp_at end; -- AM_IF_EXPR::tp_at end;

class AM_NEW_EXPR < $AM_EXPR

class AM_NEW_EXPR < $AM_EXPR is -- New expression. include AM_EXPR; attr tp_at:$TP; -- The type of object to allocate. attr asz:$AM_EXPR; -- Number of array elements to -- allocate for array descendants. tp:$TP is return tp_at end;-- AM_NEW_EXPR::tp_at copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_NEW_EXPR::create AM_NEW_EXPR::source r.tp_at:=tp_at;-- AM_NEW_EXPR::tp_at AM_NEW_EXPR::tp_at if ~void(asz) then r.asz:=asz.copy; end;-- AM_NEW_EXPR::asz BOOL::not AM_NEW_EXPR::asz AM_NEW_EXPR::asz return r; end; end;

class AM_IS_VOID_EXPR < $AM_EXPR

class AM_IS_VOID_EXPR < $AM_EXPR is -- Test for "void". include AM_EXPR; attr tp_at:$TP; -- The type BOOL. attr arg:$AM_EXPR; -- Expression to test for void. tp:$TP is return tp_at end; -- AM_IS_VOID_EXPR::tp_at copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_IS_VOID_EXPR::create AM_IS_VOID_EXPR::source if ~void(arg) then r.arg:=arg.copy; end;-- AM_IS_VOID_EXPR::arg BOOL::not AM_IS_VOID_EXPR::arg AM_IS_VOID_EXPR::arg r.tp_at:=tp_at;-- AM_IS_VOID_EXPR::tp_at AM_IS_VOID_EXPR::tp_at return r; end; is_eq(a:$OB):BOOL is typecase a when AM_IS_VOID_EXPR then return arg.is_eq(a.arg);-- AM_IS_VOID_EXPR::arg AM_IS_VOID_EXPR::arg else return false; end; end; hash:INT is return arg.hash.bxor(0xf03); -- just change it a bit-- AM_IS_VOID_EXPR::arg INT::bxor end; end;

class AM_GLOBAL_EXPR < $AM_EXPR

class AM_GLOBAL_EXPR < $AM_EXPR is -- Global variable expression. include AM_EXPR; attr tp_at:$TP; -- The declared type of the global. attr name:IDENT; -- The Sather name, if any. attr class_tp:$TP; -- The class this came from. attr init:$AM_EXPR; -- The initialization expression, if -- any. This must consist of only the expression components -- which are legal for constant initializers. attr is_const:BOOL; -- True if this is a constant. tp:$TP is return tp_at end; -- AM_GLOBAL_EXPR::tp_at attr as_type : AS_TYPE_SPEC; copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_GLOBAL_EXPR::create AM_GLOBAL_EXPR::source r.tp_at:=tp_at;-- AM_GLOBAL_EXPR::tp_at AM_GLOBAL_EXPR::tp_at r.name:=name;-- AM_GLOBAL_EXPR::name AM_GLOBAL_EXPR::name r.class_tp:=class_tp;-- AM_GLOBAL_EXPR::class_tp AM_GLOBAL_EXPR::class_tp if ~void(init) then r.init:=init.copy; end;-- AM_GLOBAL_EXPR::init BOOL::not AM_GLOBAL_EXPR::init AM_GLOBAL_EXPR::init r.is_const:=is_const;-- AM_GLOBAL_EXPR::is_const AM_GLOBAL_EXPR::is_const return r; end; is_eq(a:$OB):BOOL is typecase a when AM_GLOBAL_EXPR then return name = a.name and class_tp = a.class_tp;-- AM_GLOBAL_EXPR::name IDENT::is_eq AM_GLOBAL_EXPR::name AM_GLOBAL_EXPR::class_tp AM_GLOBAL_EXPR::class_tp else return false; -- wrong type, this not equal end; end; hash:INT is return name.hash.bxor(class_tp.hash);-- AM_GLOBAL_EXPR::name IDENT::hash INT::bxor AM_GLOBAL_EXPR::class_tp end; end;

class AM_ATTR_EXPR < $AM_EXPR

class AM_ATTR_EXPR < $AM_EXPR is -- An expression referencing an attribute of an object. include AM_EXPR; attr ob:$AM_EXPR; -- The object. attr self_tp:$TP; -- The type of self, perhaps different from ob.tp -- after inlining. attr at:IDENT; -- The name of the attribute. attr tp_at:$TP; -- The type. attr secure:BOOL; -- if true, the generated code will not break if -- ob is NULL. This is used when evaluating some -- hoisted expressions and never if void check is -- used. copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_ATTR_EXPR::create AM_ATTR_EXPR::source if ~void(ob) then r.ob:=ob.copy; end;-- AM_ATTR_EXPR::ob BOOL::not AM_ATTR_EXPR::ob AM_ATTR_EXPR::ob r.self_tp:=self_tp;-- AM_ATTR_EXPR::self_tp AM_ATTR_EXPR::self_tp r.at:=at;-- AM_ATTR_EXPR::at AM_ATTR_EXPR::at r.tp_at:=tp_at;-- AM_ATTR_EXPR::tp_at AM_ATTR_EXPR::tp_at r.secure:=secure;-- AM_ATTR_EXPR::secure AM_ATTR_EXPR::secure return r; end; tp:$TP is return tp_at end;-- AM_ATTR_EXPR::tp_at attr as_type : AS_TYPE_SPEC; -- equality and hashing functions for optimization purposes is_eq(a:$OB):BOOL is -- Changed argument from $AM_EXPR typecase a when AM_ATTR_EXPR then return (at = a.at) and (ob = a.ob);-- AM_ATTR_EXPR::at IDENT::is_eq AM_ATTR_EXPR::at AM_ATTR_EXPR::ob AM_ATTR_EXPR::ob else return false; end; end; hash:INT is return at.hash.bxor(ob.hash);-- AM_ATTR_EXPR::at IDENT::hash INT::bxor AM_ATTR_EXPR::ob end; end;

class AM_VATTR_ASSIGN_EXPR < $AM_EXPR

class AM_VATTR_ASSIGN_EXPR < $AM_EXPR is -- Assignment to an attribute of a value object. include AM_EXPR; attr ob:$AM_EXPR; -- The value object. attr at:IDENT; -- The name of the attribute. attr val:$AM_EXPR; -- The new value. attr real_tp:$TP; -- declared type of object tp:$TP is return ob.tp end; -- Returns the object, so has same type.-- AM_VATTR_ASSIGN_EXPR::ob copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_VATTR_ASSIGN_EXPR::create AM_VATTR_ASSIGN_EXPR::source if ~void(ob) then r.ob:=ob.copy; end;-- AM_VATTR_ASSIGN_EXPR::ob BOOL::not AM_VATTR_ASSIGN_EXPR::ob AM_VATTR_ASSIGN_EXPR::ob r.at:=at;-- AM_VATTR_ASSIGN_EXPR::at AM_VATTR_ASSIGN_EXPR::at r.real_tp:=real_tp;-- AM_VATTR_ASSIGN_EXPR::real_tp AM_VATTR_ASSIGN_EXPR::real_tp if ~void(val) then r.val:=val.copy; end;-- AM_VATTR_ASSIGN_EXPR::val BOOL::not AM_VATTR_ASSIGN_EXPR::val AM_VATTR_ASSIGN_EXPR::val return r; end; end;

class AM_VARR_ASSIGN_EXPR < $AM_EXPR

class AM_VARR_ASSIGN_EXPR < $AM_EXPR is -- Assignment to an array element of a value object. include AM_EXPR; attr ob:$AM_EXPR; -- The value object. attr ind:$AM_EXPR; -- The index of the array element. attr val:$AM_EXPR; -- The new value. tp:$TP is return ob.tp end; -- Returns the object, so has same type.-- AM_VARR_ASSIGN_EXPR::ob copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_VARR_ASSIGN_EXPR::create AM_VARR_ASSIGN_EXPR::source if ~void(ob) then r.ob:=ob.copy; end;-- AM_VARR_ASSIGN_EXPR::ob BOOL::not AM_VARR_ASSIGN_EXPR::ob AM_VARR_ASSIGN_EXPR::ob if ~void(ind) then r.ind:=ind.copy; end;-- AM_VARR_ASSIGN_EXPR::ind BOOL::not AM_VARR_ASSIGN_EXPR::ind AM_VARR_ASSIGN_EXPR::ind if ~void(val) then r.val:=val.copy; end;-- AM_VARR_ASSIGN_EXPR::val BOOL::not AM_VARR_ASSIGN_EXPR::val AM_VARR_ASSIGN_EXPR::val return r; end; end;

class AM_EXCEPT_EXPR < $AM_EXPR

class AM_EXCEPT_EXPR < $AM_EXPR is -- An expression referring to the exception global. include AM_EXPR; attr tp_at:$TP; -- The type. create(tp:$TP):SAME is r::=new; r.tp_at:=tp; return r end;-- AM_EXCEPT_EXPR::tp_at tp:$TP is return tp_at end; -- AM_EXCEPT_EXPR::tp_at copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(tp_at);-- AM_EXCEPT_EXPR::create AM_EXCEPT_EXPR::tp_at return r; end; end;

class AM_STMT_EXPR < $AM_EXPR

class AM_STMT_EXPR < $AM_EXPR is -- An expression with embedded statements. include AM_EXPR; attr stmts:$AM_STMT; -- The statements to execute. attr expr:$AM_EXPR; -- The expression. attr replaced:$AM_EXPR; -- If this stmt_expr replaced some -- other code, this code may still be stored -- here for reference (used for inlined functions) copy:$AM_EXPR is -- does not copy the stuff used for inlining ! if void(self) then return void; end; r::=#SAME(source);-- AM_STMT_EXPR::create AM_STMT_EXPR::source if ~void(stmts) then r.stmts:=stmts.copy; end;-- AM_STMT_EXPR::stmts BOOL::not AM_STMT_EXPR::stmts AM_STMT_EXPR::stmts if ~void(expr) then r.expr:=expr.copy; end;-- AM_STMT_EXPR::expr BOOL::not AM_STMT_EXPR::expr AM_STMT_EXPR::expr return r; end; -- The following needed by the inlined calls -- Ivin attr locals:FLIST{AM_LOCAL_EXPR}; -- Local variables stmts need. attr calls:FLIST{$AM_EXPR}; -- The calls that occur in the statements. -- Append this to the enclosing loop statement's corresponding fields. attr its:FLIST{AM_ITER_CALL_EXPR}; attr bits:FLIST{AM_BND_ITER_CALL_EXPR}; attr firsts:FLIST{AM_LOCAL_EXPR}; tp:$TP is if void(expr) then return void else return expr.tp end end;-- AM_STMT_EXPR::expr AM_STMT_EXPR::expr end;

abstract class $AM_CALL_EXPR < $AM_EXPR

abstract class $AM_CALL_EXPR < $AM_EXPR is -- Supertype for calls. create(nargs:INT, source:SFILE_ID):$AM_CALL_EXPR; -- A new definition for a routine or iter with `nargs' arguments -- (including self). asize:INT; -- number of args aget(i:INT):AM_CALL_ARG; -- argument expressions tp:$TP; -- the return type end;

class AM_HERE_EXPR < $AM_EXPR

class AM_HERE_EXPR < $AM_EXPR is -- pSather include AM_EXPR; create(src:SFILE_ID):SAME is -- Create a new here object with source `src'. r::=new; r.source:=src; return r end;-- AM_HERE_EXPR::source tp:$TP is return TP_BUILTIN::int end; -- TP_BUILTIN::int copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_HERE_EXPR::create AM_HERE_EXPR::source return r; end; end;

class AM_ANY_EXPR < $AM_EXPR

class AM_ANY_EXPR < $AM_EXPR is -- pSather include AM_EXPR; create(src:SFILE_ID):SAME is -- Create a new any object with source `src'. r::=new; r.source:=src; return r end;-- AM_ANY_EXPR::source tp:$TP is return TP_BUILTIN::int end; -- TP_BUILTIN::int copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_ANY_EXPR::create AM_ANY_EXPR::source return r; end; end;

class AM_CLUSTER_EXPR < $AM_EXPR

class AM_CLUSTER_EXPR < $AM_EXPR is -- pSather include AM_EXPR; create(src:SFILE_ID):SAME is -- Create a new cluster object with source `src'. r::=new; r.source:=src; return r end;-- AM_CLUSTER_EXPR::source tp:$TP is return TP_BUILTIN::int end; -- TP_BUILTIN::int copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_CLUSTER_EXPR::create AM_CLUSTER_EXPR::source return r; end; end;

class AM_CLUSTER_SIZE_EXPR < $AM_EXPR

class AM_CLUSTER_SIZE_EXPR < $AM_EXPR is -- pSather include AM_EXPR; create(src:SFILE_ID):SAME is -- Create a new cluster object with source `src'. r::=new; r.source:=src; return r end;-- AM_CLUSTER_SIZE_EXPR::source tp:$TP is return TP_BUILTIN::int end; -- TP_BUILTIN::int copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_CLUSTER_SIZE_EXPR::create AM_CLUSTER_SIZE_EXPR::source return r; end; end;

class AM_WHERE_EXPR < $AM_EXPR

class AM_WHERE_EXPR < $AM_EXPR is -- pSather include AM_EXPR; attr arg:$AM_EXPR; -- Object for where. create(src:SFILE_ID):SAME is -- Create a new where object with source `src'. r::=new; r.source:=src; return r end;-- AM_WHERE_EXPR::source tp:$TP is return TP_BUILTIN::int end; -- TP_BUILTIN::int copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_WHERE_EXPR::create AM_WHERE_EXPR::source if ~void(arg) then r.arg:=arg.copy; end;-- AM_WHERE_EXPR::arg BOOL::not AM_WHERE_EXPR::arg AM_WHERE_EXPR::arg return r; end; end;

class AM_NEAR_EXPR < $AM_EXPR

class AM_NEAR_EXPR < $AM_EXPR is -- pSather include AM_EXPR; attr arg:$AM_EXPR; -- Object for near test. create(src:SFILE_ID):SAME is -- Create a new near object with source `src'. r::=new; r.source:=src; return r end;-- AM_NEAR_EXPR::source tp:$TP is return TP_BUILTIN::bool end; -- TP_BUILTIN::bool copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_NEAR_EXPR::create AM_NEAR_EXPR::source if ~void(arg) then r.arg:=arg.copy; end;-- AM_NEAR_EXPR::arg BOOL::not AM_NEAR_EXPR::arg AM_NEAR_EXPR::arg return r; end; end;

class AM_FAR_EXPR < $AM_EXPR

class AM_FAR_EXPR < $AM_EXPR is -- pSather include AM_EXPR; attr arg:$AM_EXPR; -- Object for far test. create(src:SFILE_ID):SAME is -- Create a new far object with source `src'. r::=new; r.source:=src; return r end;-- AM_FAR_EXPR::source tp:$TP is return TP_BUILTIN::bool end; -- TP_BUILTIN::bool copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_FAR_EXPR::create AM_FAR_EXPR::source if ~void(arg) then r.arg:=arg.copy; end;-- AM_FAR_EXPR::arg BOOL::not AM_FAR_EXPR::arg AM_FAR_EXPR::arg return r; end; end;

class AM_AT_EXPR < $AM_EXPR

class AM_AT_EXPR < $AM_EXPR is -- pSather include AM_EXPR; attr at:$AM_EXPR; -- at value. attr e:$AM_EXPR; -- Expression (in front of @) create(src:SFILE_ID):SAME is -- Create a new at object with source `src'. r::=new; r.source:=src; return r end;-- AM_AT_EXPR::source tp:$TP is return e.tp end; -- AM_AT_EXPR::e copy:$AM_EXPR is if void(self) then return void; end; r::=#SAME(source);-- AM_AT_EXPR::create AM_AT_EXPR::source if ~void(at) then r.at:=at.copy; end;-- AM_AT_EXPR::at BOOL::not AM_AT_EXPR::at AM_AT_EXPR::at if ~void(e) then r.e:=e.copy; end;-- AM_AT_EXPR::e BOOL::not AM_AT_EXPR::e AM_AT_EXPR::e return r; end; end;