%	hardware.s
%
%	Purpose:	Hardware description
%	Copyright:	R.A. van Engelen, Leiden University, 1997

compoly(_G2509) is intrinsic(module = compoly).

has_cost isa feature.
:- insert (has_cost can
(set_feature(_G2512, [Cost], Object) do
( number(Cost) -> insert Object can get_cost(_G2518, Cost)
; error('Number expected: ~p', [Cost])
)
)
).
has_load_cost isa feature. :- insert (has_load_cost can
(set_feature(_G2512, [Cost], Name) do
( (atom(Name) ->
( number(Cost) -> insert Name can get_load_cost(_G2520, Cost)
; error('Number expected: ~p', [Cost])
)
)
; error('Name expected: ~p', [Name])
)
)
).
has_store_cost isa feature. :- insert (has_store_cost can
(set_feature(_G2512, [Cost], Name) do
( (atom(Name) ->
( number(Cost) -> insert Name can get_store_cost(_G2520, Cost)
; error('Number expected: ~p', [Cost])
)
)
; error('Name expected: ~p', [Name])
)
)
).
variable has load_cost(1). variable has store_cost(10). temporary_var has store_cost(20). elemental_op has cost(1). log(_G2509) has cost(5). varidx(_G2509, _G2510) has cost(4).