The abstract model of a C++ function is given by the sort
cpp_function
in the following trait.
This model is very abstract,
because the real semantics of C++ functions is given by
the function specification mechanisms of Larch/C++
(see section 6 Function Specifications).
% @(#)$Id: cpp_function.lsl,v 1.5 1997/06/03 20:49:42 leavens Exp $ % C++ functions cpp_function(TYPE): trait includes List(TYPE, List[TYPE]), NoContainedObjects(cpp_function) introduces returnType: cpp_function -> TYPE argumentTypes, exceptionTypes: cpp_function -> List[TYPE]
The sort TYPE
in the trait above stands for a Larch/C++ sort.
But the trait functions are more suggestive than useful.
See section 6.13 Specifying Higher-Order Functions for how to compare functions
against Larch/C++ function specifications,
and for how to specify functions
that take or return pointers to C++ functions.
Member functions are modeled in Larch/C++ as values
of the sort cpp_member_function
in the following trait.
% @(#)$Id: cpp_member_function.lsl,v 1.3 1995/12/23 02:51:47 leavens Exp $ % C++ member functions cpp_member_function(TYPE): trait includes cpp_function(cpp_member_function for cpp_function) introduces selfType: cpp_member_function -> TYPE isConst, isVolatile: cpp_member_function -> Bool
Go to the first, previous, next, last section, table of contents.