daphne-eu / daphne

DAPHNE: An Open and Extensible System Infrastructure for Integrated Data Analysis Pipelines
Apache License 2.0
67 stars 59 forks source link

String comparison is not implemented yet #581

Closed bl1zzardx closed 8 months ago

bl1zzardx commented 1 year ago

I am using the daphne-X86-64-v0.2 release. I tested the following:

print(1==1); results in output 1. print("1"=="1"); results in an error:

JIT session error: Symbols not found: [ _ewEqcharchar__char ] JIT-Engine invocation failed: Failed to materialize symbols: { (main, { main, _mlir_main, _mlirmlir_ciface_main, _mlir_ciface_main }) }Program aborted due to an unhandled Error: Failed to materialize symbols: { (main, { main, _mlir_main, _mlirmlir_ciface_main, _mlir_ciface_main }) } [2023-08-04 12:50:35.723] [error] Got an abort signal from the execution engine. Most likely an exception in a shared library. Check logs! [error]: Execution error: Returning from signal 6

MarcusParadies commented 1 year ago

I'd argue that this is not just a missing feature, but rather a bug in the earlier stages of the compilation. Imho unsupported operations should be handled before the actual compilation & execution (i.e., before the jitting) starts.

corepointer commented 1 year ago

This can be regarded as a bug or as a feature ;-) As a developer I argue more for the latter because nobody implemented the feature "check if the generated instruction actually exists and print out a more meaningful error message". Now that I think of it I'd rather advise against checking while compiling to not slow down that process. Once something has crashed we'd have all the time we need to create a meaningful output.

m-birke commented 1 year ago

missing string comparison hinders the usage of strings as script arguments for control flow switches

philipportner commented 8 months ago

I added a small patch for initial support of the == operator for strings. This should handle the use case of script argument strings for control flow switches @m-birke .

Examples:

a = "foo";
if (a == $b)
pdamme commented 8 months ago

Thanks for this patch @philipportner! I'm already using the string comparisons in the decision tree script now.