56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
}
return invoke( c, callee, *bestSol, *bestUC );
}
optional< Value > invoke( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
{
if( !IsBuiltinFunc( callee ) && !ParseFuncBody( c, callee ) )
return nullopt;
auto ppCallPat = Postprocess( unifiedCallPat, uc );
if( !ppCallPat )
return nullopt;
auto callDecomp = Decompose( *ppCallPat,
|
|
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
}
return invoke( c, callee, *bestSol, *bestUC );
}
optional< Value > invoke( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
{
if( !IsBuiltinFunc( callee ) && !CompileFunc( c, callee ) )
return nullopt;
auto ppCallPat = Postprocess( unifiedCallPat, uc );
if( !ppCallPat )
return nullopt;
auto callDecomp = Decompose( *ppCallPat,
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
optional< Term > getSignature( const Value& callee ) const final
{
return GetFuncSig( callee );
}
optional< Value > prepareFunc( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
{
if( !IsBuiltinFunc( callee ) && !ParseFuncBody( c, callee ) )
return nullopt;
return callee;
}
};
void SetupFunctionInvocationRule( Env& e )
|
|
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
optional< Term > getSignature( const Value& callee ) const final
{
return GetFuncSig( callee );
}
optional< Value > prepareFunc( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
{
if( !IsBuiltinFunc( callee ) && !CompileFunc( c, callee ) )
return nullopt;
return callee;
}
};
void SetupFunctionInvocationRule( Env& e )
|