<commit_before>if [ ! -d "src/test/kotlin/tests/linked" ]; then
    # Создать папку, только если ее не было
    mkdir src/test/kotlin/tests/linked
fi

DIRECTORY="src/test/kotlin/tests"
MAIN="$DIRECTORY/linked/main.c"
for i in $( ls "$DIRECTORY/input"); do
	rm -f $DIRECTORY/linked/*
	TEST=`basename $i ".txt"`
	echo test: $TEST
	echo "#include <stdlib.h>" >> $MAIN
        echo "#include <stdio.h>" >> $MAIN
        echo "#include <assert.h>"   >> $MAIN

        echo "int main(){"   >> $MAIN
	cat "$DIRECTORY/input/$i" | while read LINE
	do
		echo " assert($LINE);"   >> $MAIN
		echo " printf(\"OK: $LINE\n\");" >> $MAIN
	done
	
	echo  "printf(\"TEST RESULT: OK\n\");" >> $MAIN


        echo "return 0;}"   >> $MAIN
	
	clang -S -emit-llvm $DIRECTORY/linked/main.c -o $DIRECTORY/linked/main.ll -Wno-implicit-function-declaration
	rm -f $DIRECTORY/linked/main.c

	if [ -f "$DIRECTORY/c/$TEST.c" ]
	then
	    clang -S -emit-llvm "$DIRECTORY/c/$TEST.c" -o $DIRECTORY/linked/$TEST"_c.ll" -Wno-implicit-function-declaration
	fi

	/usr/lib/jvm/default-java/bin/java -Didea.launcher.port=7533 -Didea.launcher.bin.path=/opt/idea-IU-145.1617.8/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/default-java/jre/lib/charsets.jar:/usr/lib/jvm/default-java/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/default-java/jre/lib/ext/dnsns.jar:/usr/lib/jvm/default-java/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/default-java/jre/lib/ext/jaccess.jar:/usr/lib/jvm/default-java/jre/lib/ext/localedata.jar:/usr/lib/jvm/default-java/jre/lib/ext/nashorn.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunec.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/default-java/jre/lib/ext/zipfs.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/jsse.jar:/usr/lib/jvm/default-java/jre/lib/management-agent.jar:/usr/lib/jvm/default-java/jre/lib/resources.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/home/user/Kotlin/carkot/translator/build/classes/main:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.0.1/68cddd9aec83d23f789f72bfdc933db245c4a635/kotlin-stdlib-1.0.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler/1.0.3/5dbeb14062996a5c2208861d6364cc97a21b06b8/kotlin-compiler-1.0.3.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-runtime/1.0.1/124852ea8cdd3d89827923b5e79627e8a7c314b2/kotlin-runtime-1.0.1.jar:/opt/idea-IU-145.1617.8/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain MainKt $DIRECTORY/kotlin/$TEST.kt > $DIRECTORY/linked/$TEST.ll
	llvm-link $DIRECTORY/linked/* > $DIRECTORY/linked/run.ll
	lli $DIRECTORY/linked/run.ll
	
done

<commit_msg>translator: porting tests to llvm-3.6<commit_after>if [ ! -d "src/test/kotlin/tests/linked" ]; then
    # Создать папку, только если ее не было
    mkdir src/test/kotlin/tests/linked
fi

DIRECTORY="src/test/kotlin/tests"
MAIN="$DIRECTORY/linked/main.c"
for i in $( ls "$DIRECTORY/input"); do
	rm -f $DIRECTORY/linked/*
	TEST=`basename $i ".txt"`
	echo test: $TEST
	echo "#include <stdlib.h>" >> $MAIN
        echo "#include <stdio.h>" >> $MAIN
        echo "#include <assert.h>"   >> $MAIN

        echo "int main(){"   >> $MAIN
	cat "$DIRECTORY/input/$i" | while read LINE
	do
		echo " assert($LINE);"   >> $MAIN
		echo " printf(\"OK: $LINE\n\");" >> $MAIN
	done
	
	echo  "printf(\"TEST RESULT: OK\n\");" >> $MAIN


        echo "return 0;}"   >> $MAIN
	
	clang-3.6 -S -emit-llvm $DIRECTORY/linked/main.c -o $DIRECTORY/linked/main.ll -Wno-implicit-function-declaration
	rm -f $DIRECTORY/linked/main.c

	if [ -f "$DIRECTORY/c/$TEST.c" ]
	then
	    clang-3.6 -S -emit-llvm "$DIRECTORY/c/$TEST.c" -o $DIRECTORY/linked/$TEST"_c.ll" -Wno-implicit-function-declaration
	fi

	/usr/lib/jvm/default-java/bin/java -Didea.launcher.port=7533 -Didea.launcher.bin.path=/opt/idea-IU-145.1617.8/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/default-java/jre/lib/charsets.jar:/usr/lib/jvm/default-java/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/default-java/jre/lib/ext/dnsns.jar:/usr/lib/jvm/default-java/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/default-java/jre/lib/ext/jaccess.jar:/usr/lib/jvm/default-java/jre/lib/ext/localedata.jar:/usr/lib/jvm/default-java/jre/lib/ext/nashorn.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunec.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/default-java/jre/lib/ext/zipfs.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/jsse.jar:/usr/lib/jvm/default-java/jre/lib/management-agent.jar:/usr/lib/jvm/default-java/jre/lib/resources.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/home/user/Kotlin/carkot/translator/build/classes/main:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.0.1/68cddd9aec83d23f789f72bfdc933db245c4a635/kotlin-stdlib-1.0.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler/1.0.3/5dbeb14062996a5c2208861d6364cc97a21b06b8/kotlin-compiler-1.0.3.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-runtime/1.0.1/124852ea8cdd3d89827923b5e79627e8a7c314b2/kotlin-runtime-1.0.1.jar:/opt/idea-IU-145.1617.8/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain MainKt $DIRECTORY/kotlin/$TEST.kt > $DIRECTORY/linked/$TEST.ll
	llvm-link-3.6 $DIRECTORY/linked/* > $DIRECTORY/linked/run.ll
	lli-3.6 $DIRECTORY/linked/run.ll
	
done


{'fraction_non_alphanumeric': 0.190968443960827, 'fraction_numerical': 0.048603554588320635, 'mean_word_length': 3.7339055793991416, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4405256', 'n_tokens_mistral': 2596, 'n_tokens_neox': 2369, 'n_words': 220}