You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we are trying to print an IntrinsicScalarFunction that is of type Logical (and luckily as of now we don't have any other intrinsic function of logical type registered, all logical type intrinsic functions are for solving symbolic cases)
But let's say we introduce a logical intrinsic function say ListIsEmpty which would be of type Logical, how can we separate this from the functions (intrinsic + logical) that are serving a symbolic purpose (like SymbolicAddQ) ?
This condition } else if (ASR::is_a<ASR::Logical_t>(*ASRUtils::expr_type(val))) { must be improved to ALSO check for the node to be intrinsic symbolic.
Right below the line ASR::IntrinsicScalarFunction_t* intrinsic_func = ASR::down_cast<ASR::IntrinsicScalarFunction_t>(val); you need to check that intrinsic_func.id is a symbolic function. Otherwise you ignore it.
Activity
anutosh491 commentedon Feb 24, 2024
Now the ASR node we have is this
So we are trying to print an
IntrinsicScalarFunctionthat is of typeLogical(and luckily as of now we don't have any other intrinsic function of logical type registered, all logical type intrinsic functions are for solving symbolic cases)But let's say we introduce a logical intrinsic function say
ListIsEmptywhich would be of typeLogical, how can we separate this from the functions (intrinsic + logical) that are serving a symbolic purpose (likeSymbolicAddQ) ?certik commentedon Feb 24, 2024
@anutosh491 go ahead and fix this one as a high priority, so that we can enable the symbolic pass in all frontends.
certik commentedon Feb 28, 2024
This condition
} else if (ASR::is_a<ASR::Logical_t>(*ASRUtils::expr_type(val))) {must be improved to ALSO check for the node to be intrinsic symbolic.certik commentedon Feb 28, 2024
Right below the line
ASR::IntrinsicScalarFunction_t* intrinsic_func = ASR::down_cast<ASR::IntrinsicScalarFunction_t>(val);you need to check thatintrinsic_func.idis a symbolic function. Otherwise you ignore it.certik commentedon Feb 28, 2024
Create a function
is_symbolic_intrinsicwhere inside you hardwire (for now) all the symbolic intrinsic IDs.