From 8187469694073757eb290dbb6205b9686ca936af Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 16:43:54 +0000 Subject: [PATCH] Fix(Tweety): 8 notebooks C# via IKVM sous Linux et macOS, RID derive de la machine Tweety-02, 02b, 02c, 3-Advanced-Logics, 3-Conditional-Logics, 3-Dung, 3-ModalLogic et 3-QBF (IKVM 8.14.0 et 8.15.0) codaient le RID win-x64 en dur. Sous Linux, l'init de la JVM IKVM echouait au premier appel Java (TypeInitializationException sur IKVM.Runtime.LibJava, mesure sur Tweety-3-Dung). Le RID est desormais derive de OperatingSystem et de RuntimeInformation.ProcessArchitecture ; la reference NuGet explicite IKVM.Image.runtime.win-x64 est retiree, IKVM.Image (8.14.0 comme 8.15.0) dependant deja des onze paquets IKVM.Image.runtime.. Meme recette que #18031 pour les notebooks Choco. Re-execution complete sous Linux (dotnet-interactive 1.0.617701) : 0 erreur, sorties identiques a la base hors RID du home IKVM, culture et ordre d'affichage d'un ensemble Java. Prose : trois mentions de win-x64 generalisees. Parite jumelle rebaselinee sur les deux paires concernees. Hors flotte (session cloud d'agnosticisme). See #17654. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VuVMY5fhzd5cQhzHiyvjka --- .../Tweety-02-Basic-Logics-CSharp.ipynb | 459 +++++++++-- .../Tweety/Tweety-02b-Semantics-CSharp.ipynb | 675 ++++++++++++---- .../Tweety/Tweety-02c-FOL-CSharp.ipynb | 721 ++++++++++++++---- .../Tweety-3-Advanced-Logics-Csharp.ipynb | 469 ++++++++++-- .../Tweety-3-Conditional-Logics-Csharp.ipynb | 487 +++++++++--- .../Tweety/Tweety-3-Dung-Csharp.ipynb | 658 ++++++++++++---- .../Tweety/Tweety-3-ModalLogic-Csharp.ipynb | 602 ++++++++++++--- .../Tweety/Tweety-3-QBF-Csharp.ipynb | 487 +++++++++--- .../twin_pairs.d/tweety-2-basic-logics.yaml | 1 + ...1-2026-09-27-claude-cloud-hors-flotte.yaml | 6 + .../tweety-3-advanced-logics.yaml | 1 + ...8-2026-09-27-claude-cloud-hors-flotte.yaml | 6 + 12 files changed, 3731 insertions(+), 841 deletions(-) create mode 100644 scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics/0011-2026-09-27-claude-cloud-hors-flotte.yaml create mode 100644 scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics/0008-2026-09-27-claude-cloud-hors-flotte.yaml diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02-Basic-Logics-CSharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02-Basic-Logics-CSharp.ipynb index a7ab06c488..e1332af215 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02-Basic-Logics-CSharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02-Basic-Logics-CSharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "m13718", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002735, + "end_time": "2026-09-27T16:37:32.993637+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:32.990902+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety C# / IKVM - Logiques de Base (Port .NET du notebook Python)\n", "\n", @@ -33,7 +42,16 @@ { "cell_type": "markdown", "id": "m51407", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002192, + "end_time": "2026-09-27T16:37:32.998413+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:32.996221+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## Comment Tweety tourne en .NET (sans JVM)\n", "\n", @@ -47,20 +65,29 @@ "La cellule suivante configure ce runtime - **a executer avant toute utilisation de Tweety**.\n", "\n", "\n", - "**Ce que « tzdb=True » confirme** : la sortie du setup affiche `IKVM 8.15.0 pret (home=ikvm-home-8.15.0-win-x64, tzdb=True)` — la base de données des fuseaux horaires IANA est embarquée et indexée, signe que la couche d'exécution Java est complète et pas seulementCompilee au strict minimum. Ce détail compte pour Tweety : certaines fonctionnalités des librairies Java (sérialisation, localisation) exigent des ressources embarquées que IKVM doit exposer. Le pont n'est pas gratuit pour autant : chaque appel traverse la frontière CLR/JVM — invisible sur des formules unitaires comme ici, mais à garder en tête avant de lancer un solveur sur des milliers d'instances." + "**Ce que « tzdb=True » confirme** : la sortie du setup affiche `IKVM 8.15.0 pret (home=ikvm-home-8.15.0-, tzdb=True)`, où `` désigne la plateforme de la machine (`win-x64`, `linux-x64`, `osx-arm64`...) — la base de données des fuseaux horaires IANA est embarquée et indexée, signe que la couche d'exécution Java est complète et pas seulementCompilee au strict minimum. Ce détail compte pour Tweety : certaines fonctionnalités des librairies Java (sérialisation, localisation) exigent des ressources embarquées que IKVM doit exposer. Le pont n'est pas gratuit pour autant : chaque appel traverse la frontière CLR/JVM — invisible sur des formules unitaires comme ici, mais à garder en tête avant de lancer un solveur sur des milliers d'instances." ] }, { "cell_type": "markdown", "id": "m74154", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002238, + "end_time": "2026-09-27T16:37:33.003214+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:33.000976+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 1. Configuration du runtime IKVM\n", "\n", "> Cette cellule restaure les paquets NuGet IKVM et assemble le home IKVM. ~30-60 s la première fois.\n", "\n", "\n", - "**Lecture de la sortie committée** : la ligne `IKVM 8.15.0 pret (home=ikvm-home-8.15.0-win-x64, tzdb=True)` est le signal de santé du runtime — version résolue, domicile d'exécution dédié (`ikvm-home-8.15.0-win-x64`, ce qui évite les collisions entre versions cohabitantes), fuseaux disponibles. C'est la première chose à vérifier quand une cellule Tweety échoue : un IKVM à moitié restauré produit des erreurs trompeuses (types introuvables) qui n'ont rien à voir avec votre logique." + "**Lecture de la sortie committée** : la ligne `IKVM 8.15.0 pret (home=ikvm-home-8.15.0-, tzdb=True)` est le signal de santé du runtime — version résolue, domicile d'exécution dédié (`ikvm-home-8.15.0-`, ce qui évite les collisions entre versions cohabitantes), fuseaux disponibles. C'est la première chose à vérifier quand une cellule Tweety échoue : un IKVM à moitié restauré produit des erreurs trompeuses (types introuvables) qui n'ont rien à voir avec votre logique." ] }, { @@ -72,17 +99,140 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:03.524272Z", - "iopub.status.busy": "2026-07-03T02:53:03.517632Z", - "iopub.status.idle": "2026-07-03T02:53:04.991620Z", - "shell.execute_reply": "2026-07-03T02:53:04.985776Z" - } + "iopub.execute_input": "2026-09-27T16:37:33.021318Z", + "iopub.status.busy": "2026-09-27T16:37:33.013835Z", + "iopub.status.idle": "2026-09-27T16:37:35.723250Z", + "shell.execute_reply": "2026-09-27T16:37:35.719306Z" + }, + "papermill": { + "duration": 2.717893, + "end_time": "2026-09-27T16:37:35.723405+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:33.005512+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "data": { "text/html": [ - "
Installing Packages
  • IKVM
  • IKVM.Image
  • IKVM.Image.runtime.win-x64
" + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Installed Packages
  • IKVM, 8.15.0
  • IKVM.Image, 8.15.0
" ] }, "metadata": {}, @@ -91,8 +241,7 @@ ], "source": [ "#r \"nuget: IKVM, 8.15.0\"\n", - "#r \"nuget: IKVM.Image, 8.15.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.15.0\"\n" + "#r \"nuget: IKVM.Image, 8.15.0\"\n" ] }, { @@ -104,25 +253,34 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:04.994225Z", - "iopub.status.busy": "2026-07-03T02:53:04.993943Z", - "iopub.status.idle": "2026-07-03T02:53:06.332371Z", - "shell.execute_reply": "2026-07-03T02:53:06.332060Z" - } + "iopub.execute_input": "2026-09-27T16:37:35.733448Z", + "iopub.status.busy": "2026-09-27T16:37:35.733219Z", + "iopub.status.idle": "2026-09-27T16:37:36.951444Z", + "shell.execute_reply": "2026-09-27T16:37:36.951224Z" + }, + "papermill": { + "duration": 1.223337, + "end_time": "2026-09-27T16:37:36.951595+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:35.728258+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "IKVM 8.15.0 pret (home=ikvm-home-8.15.0-win-x64, tzdb=True)\r\n" + "IKVM 8.15.0 pret (home=ikvm-home-8.15.0-linux-x64, tzdb=True)\n" ] } ], "source": [ "using System.IO;\n", "\n", - "string ikvmVer = \"8.15.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.15.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -156,7 +314,16 @@ { "cell_type": "markdown", "id": "m74269", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00316, + "end_time": "2026-09-27T16:37:36.958534+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:36.955374+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 2. Chargement de la DLL Tweety\n", "\n", @@ -176,11 +343,19 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:06.334570Z", - "iopub.status.busy": "2026-07-03T02:53:06.334152Z", - "iopub.status.idle": "2026-07-03T02:53:06.368524Z", - "shell.execute_reply": "2026-07-03T02:53:06.368205Z" - } + "iopub.execute_input": "2026-09-27T16:37:36.966989Z", + "iopub.status.busy": "2026-09-27T16:37:36.966761Z", + "iopub.status.idle": "2026-09-27T16:37:38.005985Z", + "shell.execute_reply": "2026-09-27T16:37:38.005262Z" + }, + "papermill": { + "duration": 1.04441, + "end_time": "2026-09-27T16:37:38.006154+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:36.961744+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -193,18 +368,26 @@ "id": "fc526651", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T02:53:06.370673Z", - "iopub.status.busy": "2026-07-03T02:53:06.370329Z", - "iopub.status.idle": "2026-07-03T02:53:06.474066Z", - "shell.execute_reply": "2026-07-03T02:53:06.473609Z" - } + "iopub.execute_input": "2026-09-27T16:37:38.014233Z", + "iopub.status.busy": "2026-09-27T16:37:38.013942Z", + "iopub.status.idle": "2026-09-27T16:37:38.148962Z", + "shell.execute_reply": "2026-09-27T16:37:38.148735Z" + }, + "papermill": { + "duration": 0.139492, + "end_time": "2026-09-27T16:37:38.149074+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.009582+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-pl v1.30.0.0 (7,0 Mo).\r\n" + "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-pl v1.30.0.0 (7.0 Mo).\n" ] } ], @@ -220,7 +403,16 @@ { "cell_type": "markdown", "id": "m58656", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00272, + "end_time": "2026-09-27T16:37:38.155465+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.152745+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 3. Logique propositionnelle - construction manuelle de formules\n", "\n", @@ -240,46 +432,54 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:06.476194Z", - "iopub.status.busy": "2026-07-03T02:53:06.475833Z", - "iopub.status.idle": "2026-07-03T02:53:07.058487Z", - "shell.execute_reply": "2026-07-03T02:53:07.058162Z" - } + "iopub.execute_input": "2026-09-27T16:37:38.162722Z", + "iopub.status.busy": "2026-09-27T16:37:38.162471Z", + "iopub.status.idle": "2026-09-27T16:37:38.517173Z", + "shell.execute_reply": "2026-09-27T16:37:38.516958Z" + }, + "papermill": { + "duration": 0.359077, + "end_time": "2026-09-27T16:37:38.517271+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.158194+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "a = a\r\n" + "a = a\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "!b = !b\r\n" + "!b = !b\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "a && !c = a&&!c\r\n" + "a && !c = a&&!c\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "a || b = a||b\r\n" + "a || b = a||b\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "a => b = (a=>b)\r\n" + "a => b = (a=>b)\n" ] } ], @@ -306,7 +506,16 @@ { "cell_type": "markdown", "id": "m24048", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002962, + "end_time": "2026-09-27T16:37:38.523744+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.520782+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 4. Parsing de formules avec `PlParser`\n", "\n", @@ -326,25 +535,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:07.060464Z", - "iopub.status.busy": "2026-07-03T02:53:07.060183Z", - "iopub.status.idle": "2026-07-03T02:53:07.145314Z", - "shell.execute_reply": "2026-07-03T02:53:07.144713Z" - } + "iopub.execute_input": "2026-09-27T16:37:38.531570Z", + "iopub.status.busy": "2026-09-27T16:37:38.531255Z", + "iopub.status.idle": "2026-09-27T16:37:38.612344Z", + "shell.execute_reply": "2026-09-27T16:37:38.612100Z" + }, + "papermill": { + "duration": 0.085797, + "end_time": "2026-09-27T16:37:38.612466+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.526669+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Parse de '(a || b) && !c' = (a||b)&&!c\r\n" + "Parse de '(a || b) && !c' = (a||b)&&!c\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "XOR 'a ^^ b' = a^^b\r\n" + "XOR 'a ^^ b' = a^^b\n" ] } ], @@ -361,7 +578,16 @@ { "cell_type": "markdown", "id": "m95461", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003054, + "end_time": "2026-09-27T16:37:38.618935+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.615881+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 5. Base de croyances (`PlBeliefSet`)\n", "\n", @@ -382,25 +608,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:07.147518Z", - "iopub.status.busy": "2026-07-03T02:53:07.147076Z", - "iopub.status.idle": "2026-07-03T02:53:07.243265Z", - "shell.execute_reply": "2026-07-03T02:53:07.243024Z" - } + "iopub.execute_input": "2026-09-27T16:37:38.626886Z", + "iopub.status.busy": "2026-09-27T16:37:38.626648Z", + "iopub.status.idle": "2026-09-27T16:37:38.674839Z", + "shell.execute_reply": "2026-09-27T16:37:38.674159Z" + }, + "papermill": { + "duration": 0.052843, + "end_time": "2026-09-27T16:37:38.674970+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.622127+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Base de croyances KB = { a&&!c, (a=>b), a, !b }\r\n" + "Base de croyances KB = { a&&!c, (a=>b), a, !b }\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Nombre de formules : 4\r\n" + "Nombre de formules : 4\n" ] } ], @@ -421,7 +655,16 @@ { "cell_type": "markdown", "id": "m62216", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003054, + "end_time": "2026-09-27T16:37:38.681542+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.678488+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## Conclusion\n", "\n", @@ -455,7 +698,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "a6ab745b", + "metadata": { + "papermill": { + "duration": 0.002836, + "end_time": "2026-09-27T16:37:38.687490+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.684654+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercices 1 et 2 : critères de validation\n", "\n", @@ -473,18 +726,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:07.244935Z", - "iopub.status.busy": "2026-07-03T02:53:07.244677Z", - "iopub.status.idle": "2026-07-03T02:53:07.290015Z", - "shell.execute_reply": "2026-07-03T02:53:07.289773Z" - } + "iopub.execute_input": "2026-09-27T16:37:38.695439Z", + "iopub.status.busy": "2026-09-27T16:37:38.695215Z", + "iopub.status.idle": "2026-09-27T16:37:38.725004Z", + "shell.execute_reply": "2026-09-27T16:37:38.724828Z" + }, + "papermill": { + "duration": 0.034576, + "end_time": "2026-09-27T16:37:38.725116+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.690540+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Exercice 1 a completer\r\n" + "Exercice 1 a completer\n" ] } ], @@ -504,18 +765,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:53:07.291545Z", - "iopub.status.busy": "2026-07-03T02:53:07.291305Z", - "iopub.status.idle": "2026-07-03T02:53:07.352948Z", - "shell.execute_reply": "2026-07-03T02:53:07.352695Z" - } + "iopub.execute_input": "2026-09-27T16:37:38.732571Z", + "iopub.status.busy": "2026-09-27T16:37:38.732331Z", + "iopub.status.idle": "2026-09-27T16:37:38.771677Z", + "shell.execute_reply": "2026-09-27T16:37:38.771418Z" + }, + "papermill": { + "duration": 0.043685, + "end_time": "2026-09-27T16:37:38.771786+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.728101+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Exercice 2 a completer\r\n" + "Exercice 2 a completer\n" ] } ], @@ -528,7 +797,16 @@ { "cell_type": "markdown", "id": "b9717ab2984e", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003749, + "end_time": "2026-09-27T16:37:38.779571+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.775822+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 : Conséquence logique via SimplePlReasoner\n", "\n", @@ -546,13 +824,28 @@ "cell_type": "code", "execution_count": 10, "id": "6c64944b1d4d", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:37:38.788873Z", + "iopub.status.busy": "2026-09-27T16:37:38.788627Z", + "iopub.status.idle": "2026-09-27T16:37:38.812850Z", + "shell.execute_reply": "2026-09-27T16:37:38.812700Z" + }, + "papermill": { + "duration": 0.029745, + "end_time": "2026-09-27T16:37:38.812926+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:38.783181+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Exercice 3 a completer — SimplePlReasoner.query(KB, c) sur {a, a=>b, b=>c}\r\n" + "Exercice 3 a completer — SimplePlReasoner.query(KB, c) sur {a, a=>b, b=>c}\n" ] } ], @@ -608,8 +901,20 @@ "name": "C#", "pygments_lexer": "csharp", "version": "13.0" + }, + "papermill": { + "default_parameters": {}, + "duration": 8.102965, + "end_time": "2026-09-27T16:37:38.931531+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-02-Basic-Logics-CSharp.ipynb", + "output_path": "Tweety-02-Basic-Logics-CSharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:37:30.828566+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02b-Semantics-CSharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02b-Semantics-CSharp.ipynb index 36273e067f..623aca8699 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02b-Semantics-CSharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02b-Semantics-CSharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "m63273", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004564, + "end_time": "2026-09-27T16:37:44.667484+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:44.662920+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety C# / IKVM - Sémantique propositionnelle : mondes possibles et raisonnement\n", "\n", @@ -35,7 +44,16 @@ { "cell_type": "markdown", "id": "m51083", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00367, + "end_time": "2026-09-27T16:37:44.675638+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:44.671968+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1. Configuration du runtime IKVM\n", "\n", @@ -53,13 +71,136 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:19.054523Z", - "iopub.status.busy": "2026-07-03T02:55:19.045671Z", - "iopub.status.idle": "2026-07-03T02:55:20.947466Z", - "shell.execute_reply": "2026-07-03T02:55:20.941543Z" - } + "iopub.execute_input": "2026-09-27T16:37:44.698392Z", + "iopub.status.busy": "2026-09-27T16:37:44.691616Z", + "iopub.status.idle": "2026-09-27T16:37:46.696744Z", + "shell.execute_reply": "2026-09-27T16:37:46.691618Z" + }, + "papermill": { + "duration": 2.017564, + "end_time": "2026-09-27T16:37:46.696915+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:44.679351+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ + { + "data": { + "text/html": [ + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/html": [ @@ -72,8 +213,7 @@ ], "source": [ "#r \"nuget: IKVM, 8.15.0\"\n", - "#r \"nuget: IKVM.Image, 8.15.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.15.0\"\n" + "#r \"nuget: IKVM.Image, 8.15.0\"\n" ] }, { @@ -85,24 +225,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:20.950498Z", - "iopub.status.busy": "2026-07-03T02:55:20.950136Z", - "iopub.status.idle": "2026-07-03T02:55:22.523166Z", - "shell.execute_reply": "2026-07-03T02:55:22.522863Z" - } + "iopub.execute_input": "2026-09-27T16:37:46.706024Z", + "iopub.status.busy": "2026-09-27T16:37:46.705789Z", + "iopub.status.idle": "2026-09-27T16:37:47.842046Z", + "shell.execute_reply": "2026-09-27T16:37:47.841769Z" + }, + "papermill": { + "duration": 1.141406, + "end_time": "2026-09-27T16:37:47.842176+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:46.700770+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "IKVM 8.15.0 pret (home=ikvm-home-8.15.0-win-x64, tzdb=True)\r\n" + "IKVM 8.15.0 pret (home=ikvm-home-8.15.0-linux-x64, tzdb=True)\n" ] } ], "source": [ "using System.IO;\n", - "string ikvmVer = \"8.15.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.15.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -142,11 +291,19 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:22.525527Z", - "iopub.status.busy": "2026-07-03T02:55:22.525053Z", - "iopub.status.idle": "2026-07-03T02:55:22.561678Z", - "shell.execute_reply": "2026-07-03T02:55:22.561310Z" - } + "iopub.execute_input": "2026-09-27T16:37:47.854343Z", + "iopub.status.busy": "2026-09-27T16:37:47.854138Z", + "iopub.status.idle": "2026-09-27T16:37:47.978140Z", + "shell.execute_reply": "2026-09-27T16:37:47.977964Z" + }, + "papermill": { + "duration": 0.130888, + "end_time": "2026-09-27T16:37:47.978242+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:47.847354+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -159,18 +316,26 @@ "id": "88646a94", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T02:55:22.563842Z", - "iopub.status.busy": "2026-07-03T02:55:22.563511Z", - "iopub.status.idle": "2026-07-03T02:55:22.679916Z", - "shell.execute_reply": "2026-07-03T02:55:22.679616Z" - } + "iopub.execute_input": "2026-09-27T16:37:47.987054Z", + "iopub.status.busy": "2026-09-27T16:37:47.986839Z", + "iopub.status.idle": "2026-09-27T16:37:48.133981Z", + "shell.execute_reply": "2026-09-27T16:37:48.133793Z" + }, + "papermill": { + "duration": 0.15246, + "end_time": "2026-09-27T16:37:48.134080+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:47.981620+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-pl v1.30.0.0 (7,0 Mo).\r\n" + "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-pl v1.30.0.0 (7.0 Mo).\n" ] } ], @@ -185,7 +350,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "ee5a0258", + "metadata": { + "papermill": { + "duration": 0.003115, + "end_time": "2026-09-27T16:37:48.140922+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.137807+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "**Pourquoi un pont Java→.NET ?** Les cellules de configuration ci-dessus chargent la bibliothèque\n", "**TweetyProject** — écrite en Java — *dans* le processus .NET, via IKVM (une réimplémentation du\n", @@ -200,7 +375,16 @@ { "cell_type": "markdown", "id": "m22726", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002987, + "end_time": "2026-09-27T16:37:48.146794+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.143807+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2. Signature et mondes possibles\n", "\n", @@ -223,60 +407,68 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:22.681785Z", - "iopub.status.busy": "2026-07-03T02:55:22.681521Z", - "iopub.status.idle": "2026-07-03T02:55:23.843323Z", - "shell.execute_reply": "2026-07-03T02:55:23.842609Z" - } + "iopub.execute_input": "2026-09-27T16:37:48.154969Z", + "iopub.status.busy": "2026-09-27T16:37:48.154678Z", + "iopub.status.idle": "2026-09-27T16:37:48.737081Z", + "shell.execute_reply": "2026-09-27T16:37:48.736863Z" + }, + "papermill": { + "duration": 0.587424, + "end_time": "2026-09-27T16:37:48.737181+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.149757+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Signature : [a, b]\r\n" + "Signature : [a, b]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Mondes possibles :\r\n" + "Mondes possibles :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " monde 0 = []\r\n" + " monde 0 = []\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " monde 1 = [a]\r\n" + " monde 1 = [a]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " monde 2 = [b]\r\n" + " monde 2 = [b]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " monde 3 = [a, b]\r\n" + " monde 3 = [a, b]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "=> 4 mondes pour 2 atomes (2^2 = 4).\r\n" + "=> 4 mondes pour 2 atomes (2^2 = 4).\n" ] } ], @@ -306,7 +498,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "f991d3d6", + "metadata": { + "papermill": { + "duration": 0.00385, + "end_time": "2026-09-27T16:37:48.745451+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.741601+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Interpretation : mondes possibles et sémantique\n", "\n", @@ -328,7 +530,16 @@ { "cell_type": "markdown", "id": "m66831", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003752, + "end_time": "2026-09-27T16:37:48.752953+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.749201+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3. Satisfaction : un monde est-il modèle d'une formule ?\n", "\n", @@ -351,53 +562,61 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:23.845268Z", - "iopub.status.busy": "2026-07-03T02:55:23.844976Z", - "iopub.status.idle": "2026-07-03T02:55:23.992679Z", - "shell.execute_reply": "2026-07-03T02:55:23.992374Z" - } + "iopub.execute_input": "2026-09-27T16:37:48.762252Z", + "iopub.status.busy": "2026-09-27T16:37:48.762029Z", + "iopub.status.idle": "2026-09-27T16:37:48.855348Z", + "shell.execute_reply": "2026-09-27T16:37:48.855191Z" + }, + "papermill": { + "duration": 0.098781, + "end_time": "2026-09-27T16:37:48.855444+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.756663+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Monde w = [a]\r\n" + "Monde w = [a]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " w satisfait a = True\r\n" + " w satisfait a = True\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " w satisfait b = False\r\n" + " w satisfait b = False\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " w satisfait a && b = False\r\n" + " w satisfait a && b = False\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " w satisfait a || b = True\r\n" + " w satisfait a || b = True\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " w satisfait a => b = False\r\n" + " w satisfait a => b = False\n" ] } ], @@ -428,7 +647,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "bc20b3e1", + "metadata": { + "papermill": { + "duration": 0.003609, + "end_time": "2026-09-27T16:37:48.863459+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.859850+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "**La localité de la satisfaction.** Toutes les réponses ci-dessus portent sur **un seul** monde\n", "`w = [a]` : `satisfies` est une question *locale* (ce monde-ci, cette formule-ci). C'est la brique\n", @@ -446,7 +675,16 @@ { "cell_type": "markdown", "id": "m5545", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003445, + "end_time": "2026-09-27T16:37:48.870880+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.867435+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Representation canonique d'un monde\n", "\n", @@ -464,25 +702,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:23.994461Z", - "iopub.status.busy": "2026-07-03T02:55:23.994195Z", - "iopub.status.idle": "2026-07-03T02:55:24.114584Z", - "shell.execute_reply": "2026-07-03T02:55:24.113751Z" - } + "iopub.execute_input": "2026-09-27T16:37:48.879636Z", + "iopub.status.busy": "2026-09-27T16:37:48.879380Z", + "iopub.status.idle": "2026-09-27T16:37:48.933885Z", + "shell.execute_reply": "2026-09-27T16:37:48.933665Z" + }, + "papermill": { + "duration": 0.059662, + "end_time": "2026-09-27T16:37:48.933991+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.874329+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Monde = [a, c]\r\n" + "Monde = [a, c]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Conjonction complete dans {a,b,c} = a&&c&&!b\r\n" + "Conjonction complete dans {a,b,c} = a&&c&&!b\n" ] } ], @@ -507,7 +753,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "3b76e4ac", + "metadata": { + "papermill": { + "duration": 0.005274, + "end_time": "2026-09-27T16:37:48.944907+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.939633+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "**Pourquoi une forme canonique ?** La sortie montre la correspondance terme à terme : chaque monde\n", "possède **exactement une** conjonction complète (`[a, c]` ↔ `a&&c&&!b`). C'est une bijection monde ↔\n", @@ -523,7 +779,16 @@ { "cell_type": "markdown", "id": "m88739", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004976, + "end_time": "2026-09-27T16:37:48.954926+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.949950+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 4. Raisonnement : consequence logique (entaînement)\n", "\n", @@ -546,46 +811,54 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:24.117040Z", - "iopub.status.busy": "2026-07-03T02:55:24.116687Z", - "iopub.status.idle": "2026-07-03T02:55:24.950309Z", - "shell.execute_reply": "2026-07-03T02:55:24.949686Z" - } + "iopub.execute_input": "2026-09-27T16:37:48.967915Z", + "iopub.status.busy": "2026-09-27T16:37:48.967609Z", + "iopub.status.idle": "2026-09-27T16:37:49.805937Z", + "shell.execute_reply": "2026-09-27T16:37:49.805741Z" + }, + "papermill": { + "duration": 0.845622, + "end_time": "2026-09-27T16:37:49.806025+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:48.960403+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB = { (a=>b), a }\r\n" + "KB = { (a=>b), a }\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= b ? true\r\n" + "KB |= b ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= c ? false\r\n" + "KB |= c ? false\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= a||c ? true\r\n" + "KB |= a||c ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= !a ? false\r\n" + "KB |= !a ? false\n" ] } ], @@ -610,7 +883,16 @@ { "cell_type": "markdown", "id": "m72867", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003704, + "end_time": "2026-09-27T16:37:49.813978+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.810274+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Interpretation : l'asymétrie et les deux approches\n", "\n", @@ -634,7 +916,16 @@ { "cell_type": "markdown", "id": "m64411", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003496, + "end_time": "2026-09-27T16:37:49.821269+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.817773+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## Exemple guide : modèles d'une base de croyances\n", "\n", @@ -652,60 +943,68 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:24.952650Z", - "iopub.status.busy": "2026-07-03T02:55:24.952307Z", - "iopub.status.idle": "2026-07-03T02:55:25.132177Z", - "shell.execute_reply": "2026-07-03T02:55:25.131496Z" - } + "iopub.execute_input": "2026-09-27T16:37:49.830592Z", + "iopub.status.busy": "2026-09-27T16:37:49.830310Z", + "iopub.status.idle": "2026-09-27T16:37:49.899039Z", + "shell.execute_reply": "2026-09-27T16:37:49.898842Z" + }, + "papermill": { + "duration": 0.073948, + "end_time": "2026-09-27T16:37:49.899133+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.825185+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB = { (a=>b), (b=>c) }\r\n" + "KB = { (a=>b), (b=>c) }\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Modeles de KB :\r\n" + "Modeles de KB :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " [] -> conjonction complete : !a&&!b&&!c\r\n" + " [] -> conjonction complete : !a&&!b&&!c\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " [c] -> conjonction complete : c&&!a&&!b\r\n" + " [c] -> conjonction complete : c&&!a&&!b\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " [b, c] -> conjonction complete : b&&c&&!a\r\n" + " [b, c] -> conjonction complete : b&&c&&!a\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " [a, b, c] -> conjonction complete : a&&b&&c\r\n" + " [a, b, c] -> conjonction complete : a&&b&&c\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "=> 4 modele(s) sur 8.\r\n" + "=> 4 modele(s) sur 8.\n" ] } ], @@ -743,7 +1042,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "9bf1c980", + "metadata": { + "papermill": { + "duration": 0.004614, + "end_time": "2026-09-27T16:37:49.908645+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.904031+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "**Lecture des quatre survivants.** Sur les 8 mondes de `{a, b, c}`, exactement 4 restent : ceux où\n", "l'hérité de la chaîne est respectée — jamais `a` sans `b`, jamais `b` sans `c`. Chacun des 4 mondes\n", @@ -766,7 +1075,16 @@ { "cell_type": "markdown", "id": "m34593", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004277, + "end_time": "2026-09-27T16:37:49.917339+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.913062+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## Conclusion\n", "\n", @@ -801,7 +1119,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "edfa8b81", + "metadata": { + "papermill": { + "duration": 0.004493, + "end_time": "2026-09-27T16:37:49.926564+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.922071+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "**Le protocole des exercices.** Les trois exercices rejouent les gestes des sections 2-4 en\n", "montant en généralité : le premier classifie une formule (tautologie / contradiction / contingence) —\n", @@ -816,7 +1144,16 @@ { "cell_type": "markdown", "id": "m45853", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004173, + "end_time": "2026-09-27T16:37:49.935180+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.931007+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Exercice 1 : Tautologie, contradiction ou contingence ?\n", "\n", @@ -837,43 +1174,51 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:25.134472Z", - "iopub.status.busy": "2026-07-03T02:55:25.134118Z", - "iopub.status.idle": "2026-07-03T02:55:25.279187Z", - "shell.execute_reply": "2026-07-03T02:55:25.278914Z" - } + "iopub.execute_input": "2026-09-27T16:37:49.945840Z", + "iopub.status.busy": "2026-09-27T16:37:49.945605Z", + "iopub.status.idle": "2026-09-27T16:37:50.022527Z", + "shell.execute_reply": "2026-09-27T16:37:50.022312Z" + }, + "papermill": { + "duration": 0.082911, + "end_time": "2026-09-27T16:37:50.022625+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:49.939714+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Exercice 1 a completer\r\n" + "Exercice 1 a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Exercice 1 a completer\r\n" + "Exercice 1 a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Exercice 1 a completer\r\n" + "Exercice 1 a completer\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\r\n", - "(9,9): warning CS0219: La variable 'total' est assignée, mais sa valeur n'est jamais utilisée\r\n", - "\r\n", - "(9,20): warning CS0219: La variable 'satisfied' est assignée, mais sa valeur n'est jamais utilisée\r\n", - "\r\n" + "\n", + "(9,9): warning CS0219: The variable 'total' is assigned but its value is never used\n", + "\n", + "(9,20): warning CS0219: The variable 'satisfied' is assigned but its value is never used\n", + "\n" ] } ], @@ -903,7 +1248,16 @@ { "cell_type": "markdown", "id": "m84967", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004695, + "end_time": "2026-09-27T16:37:50.032381+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:50.027686+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Exercice 2 : Equivalence logique via l'entaînement\n", "\n", @@ -924,32 +1278,40 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:25.281694Z", - "iopub.status.busy": "2026-07-03T02:55:25.281164Z", - "iopub.status.idle": "2026-07-03T02:55:25.371696Z", - "shell.execute_reply": "2026-07-03T02:55:25.371181Z" - } + "iopub.execute_input": "2026-09-27T16:37:50.043270Z", + "iopub.status.busy": "2026-09-27T16:37:50.043056Z", + "iopub.status.idle": "2026-09-27T16:37:50.094046Z", + "shell.execute_reply": "2026-09-27T16:37:50.093883Z" + }, + "papermill": { + "duration": 0.056948, + "end_time": "2026-09-27T16:37:50.094128+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:50.037180+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "False\r\n" + "False\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "False\r\n" + "False\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "False\r\n" + "False\n" ] } ], @@ -977,7 +1339,16 @@ { "cell_type": "markdown", "id": "m18873", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004433, + "end_time": "2026-09-27T16:37:50.102969+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:50.098536+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Exercice 3 : Deduire une consequence cachee\n", "\n", @@ -999,46 +1370,54 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:25.374359Z", - "iopub.status.busy": "2026-07-03T02:55:25.373846Z", - "iopub.status.idle": "2026-07-03T02:55:25.501919Z", - "shell.execute_reply": "2026-07-03T02:55:25.501542Z" - } + "iopub.execute_input": "2026-09-27T16:37:50.112532Z", + "iopub.status.busy": "2026-09-27T16:37:50.112267Z", + "iopub.status.idle": "2026-09-27T16:37:50.162564Z", + "shell.execute_reply": "2026-09-27T16:37:50.162343Z" + }, + "papermill": { + "duration": 0.0558, + "end_time": "2026-09-27T16:37:50.162653+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:50.106853+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB |= a ? (Exercice 3 a completer)\r\n" + "KB |= a ? (Exercice 3 a completer)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= b ? (Exercice 3 a completer)\r\n" + "KB |= b ? (Exercice 3 a completer)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= c ? (Exercice 3 a completer)\r\n" + "KB |= c ? (Exercice 3 a completer)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= d ? (Exercice 3 a completer)\r\n" + "KB |= d ? (Exercice 3 a completer)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB |= e ? (Exercice 3 a completer)\r\n" + "KB |= e ? (Exercice 3 a completer)\n" ] } ], @@ -1063,6 +1442,23 @@ } ], "metadata": { + "cost": { + "api_provider": "none", + "api_usd_est": 0.0, + "cpu_min": 8, + "external_account": null, + "free_alternative": null, + "gpu_min": 0, + "gpu_required": false, + "metadata_written": "2026-08-02", + "network": false, + "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account).", + "reduced_pedagogical": null, + "reproducibility": "HIGH", + "validator": "manual", + "vram_gb": 0, + "vram_tier": "NONE" + }, "kernelspec": { "display_name": ".NET (C#)", "language": "C#", @@ -1075,22 +1471,17 @@ "pygments_lexer": "csharp", "version": "13.0" }, - "cost": { - "api_usd_est": 0.0, - "api_provider": "none", - "cpu_min": 8, - "gpu_min": 0, - "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", - "network": false, - "external_account": null, - "free_alternative": null, - "reduced_pedagogical": null, - "reproducibility": "HIGH", - "metadata_written": "2026-08-02", - "validator": "manual", - "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account)." + "papermill": { + "default_parameters": {}, + "duration": 7.791114, + "end_time": "2026-09-27T16:37:50.282860+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-02b-Semantics-CSharp.ipynb", + "output_path": "Tweety-02b-Semantics-CSharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:37:42.491746+00:00", + "version": "2.7.0" } }, "nbformat": 4, diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02c-FOL-CSharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02c-FOL-CSharp.ipynb index ba3b1e1885..3421c1f881 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02c-FOL-CSharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-02c-FOL-CSharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "m328317", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.005962, + "end_time": "2026-09-27T16:37:56.177895+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:56.171933+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety-2c — Logique du premier ordre en C#/.NET (port natif IKVM)\n", "\n", @@ -43,12 +52,21 @@ { "cell_type": "markdown", "id": "m412865", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004736, + "end_time": "2026-09-27T16:37:56.188058+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:56.183322+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1 — Runtime IKVM : exécuter Tweety sur .NET\n", "\n", "On installe le runtime IKVM (machine virtuelle Java réimplémentée en .NET) à partir des paquets NuGet,\n", - "puis on pointe `IKVM.Home` vers une image fusionnée (base `any` + runtime spécifique `win-x64`).\n", + "puis on pointe `IKVM.Home` vers une image fusionnée (base `any` + runtime de la plateforme : `win-x64`, `linux-x64`, `osx-arm64`...).\n", "La librairie `org.tweetyproject.tweety-pl.dll` (compilée côté build) se charge par `#r` ; elle embarque\n", "**transitivement** le module `fol` (logique du premier ordre), aucun module supplémentaire à compiler ici.\n", "\n" @@ -63,13 +81,136 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:35.363810Z", - "iopub.status.busy": "2026-07-03T02:55:35.356932Z", - "iopub.status.idle": "2026-07-03T02:55:36.986648Z", - "shell.execute_reply": "2026-07-03T02:55:36.980762Z" - } + "iopub.execute_input": "2026-09-27T16:37:56.210826Z", + "iopub.status.busy": "2026-09-27T16:37:56.203342Z", + "iopub.status.idle": "2026-09-27T16:37:58.028147Z", + "shell.execute_reply": "2026-09-27T16:37:58.024660Z" + }, + "papermill": { + "duration": 1.83536, + "end_time": "2026-09-27T16:37:58.028278+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:56.192918+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ + { + "data": { + "text/html": [ + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/html": [ @@ -83,7 +224,6 @@ "source": [ "#r \"nuget: IKVM, 8.15.0\"\n", "#r \"nuget: IKVM.Image, 8.15.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.15.0\"\n", "\n" ] }, @@ -96,24 +236,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:36.989242Z", - "iopub.status.busy": "2026-07-03T02:55:36.988940Z", - "iopub.status.idle": "2026-07-03T02:55:38.210361Z", - "shell.execute_reply": "2026-07-03T02:55:38.209939Z" - } + "iopub.execute_input": "2026-09-27T16:37:58.039020Z", + "iopub.status.busy": "2026-09-27T16:37:58.038763Z", + "iopub.status.idle": "2026-09-27T16:37:59.066932Z", + "shell.execute_reply": "2026-09-27T16:37:59.066696Z" + }, + "papermill": { + "duration": 1.034182, + "end_time": "2026-09-27T16:37:59.067031+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:58.032849+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "IKVM home=OK\r\n" + "IKVM home=OK\n" ] } ], "source": [ "using System.IO;\n", - "string ikvmVer = \"8.15.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.15.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -150,11 +299,19 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:38.212628Z", - "iopub.status.busy": "2026-07-03T02:55:38.212258Z", - "iopub.status.idle": "2026-07-03T02:55:38.247133Z", - "shell.execute_reply": "2026-07-03T02:55:38.246762Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.076540Z", + "iopub.status.busy": "2026-09-27T16:37:59.076219Z", + "iopub.status.idle": "2026-09-27T16:37:59.165035Z", + "shell.execute_reply": "2026-09-27T16:37:59.164834Z" + }, + "papermill": { + "duration": 0.093737, + "end_time": "2026-09-27T16:37:59.165133+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.071396+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -168,18 +325,26 @@ "id": "95309f07", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T02:55:38.248843Z", - "iopub.status.busy": "2026-07-03T02:55:38.248562Z", - "iopub.status.idle": "2026-07-03T02:55:38.367972Z", - "shell.execute_reply": "2026-07-03T02:55:38.367756Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.175157Z", + "iopub.status.busy": "2026-09-27T16:37:59.174858Z", + "iopub.status.idle": "2026-09-27T16:37:59.344762Z", + "shell.execute_reply": "2026-09-27T16:37:59.344546Z" + }, + "papermill": { + "duration": 0.175633, + "end_time": "2026-09-27T16:37:59.344865+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.169232+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-pl v1.30.0.0 (7,0 Mo).\r\n" + "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-pl v1.30.0.0 (7.0 Mo).\n" ] } ], @@ -195,7 +360,16 @@ { "cell_type": "markdown", "id": "m971748", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003559, + "end_time": "2026-09-27T16:37:59.352489+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.348930+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2 — Signature, termes et atomes\n", "\n", @@ -220,25 +394,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:38.369319Z", - "iopub.status.busy": "2026-07-03T02:55:38.369089Z", - "iopub.status.idle": "2026-07-03T02:55:38.864840Z", - "shell.execute_reply": "2026-07-03T02:55:38.864441Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.361387Z", + "iopub.status.busy": "2026-09-27T16:37:59.361164Z", + "iopub.status.idle": "2026-09-27T16:37:59.717141Z", + "shell.execute_reply": "2026-09-27T16:37:59.716938Z" + }, + "papermill": { + "duration": 0.361305, + "end_time": "2026-09-27T16:37:59.717232+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.355927+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Homme(X) = Homme(X)\r\n" + "Homme(X) = Homme(X)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Homme(Socrate) = Homme(Socrate)\r\n" + "Homme(Socrate) = Homme(Socrate)\n" ] } ], @@ -267,7 +449,16 @@ { "cell_type": "markdown", "id": "m618654", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003692, + "end_time": "2026-09-27T16:37:59.724776+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.721084+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 2.2 Atomes, prédicats et types de termes\n", "\n", @@ -288,25 +479,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:38.866507Z", - "iopub.status.busy": "2026-07-03T02:55:38.866240Z", - "iopub.status.idle": "2026-07-03T02:55:38.929817Z", - "shell.execute_reply": "2026-07-03T02:55:38.929535Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.733568Z", + "iopub.status.busy": "2026-09-27T16:37:59.733307Z", + "iopub.status.idle": "2026-09-27T16:37:59.783193Z", + "shell.execute_reply": "2026-09-27T16:37:59.783025Z" + }, + "papermill": { + "duration": 0.05511, + "end_time": "2026-09-27T16:37:59.783303+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.728193+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Parent(Anne,Bob) = Parent(Anne,Bob)\r\n" + "Parent(Anne,Bob) = Parent(Anne,Bob)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Parent(Anne,Y) = Parent(Anne,Y)\r\n" + "Parent(Anne,Y) = Parent(Anne,Y)\n" ] } ], @@ -328,7 +527,16 @@ { "cell_type": "markdown", "id": "m585777", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003383, + "end_time": "2026-09-27T16:37:59.790457+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.787074+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3 — Connecteurs et quantificateurs\n", "\n", @@ -354,25 +562,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:38.932300Z", - "iopub.status.busy": "2026-07-03T02:55:38.931847Z", - "iopub.status.idle": "2026-07-03T02:55:39.009434Z", - "shell.execute_reply": "2026-07-03T02:55:39.009196Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.799180Z", + "iopub.status.busy": "2026-09-27T16:37:59.798977Z", + "iopub.status.idle": "2026-09-27T16:37:59.853678Z", + "shell.execute_reply": "2026-09-27T16:37:59.853466Z" + }, + "papermill": { + "duration": 0.05997, + "end_time": "2026-09-27T16:37:59.853765+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.793795+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Homme(X) => Mortel(X) = (Homme(X)=>Mortel(X))\r\n" + "Homme(X) => Mortel(X) = (Homme(X)=>Mortel(X))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "∀X (Homme(X)=>Mortel(X)) = forall X: ((Homme(X)=>Mortel(X)))\r\n" + "∀X (Homme(X)=>Mortel(X)) = forall X: ((Homme(X)=>Mortel(X)))\n" ] } ], @@ -394,7 +610,16 @@ { "cell_type": "markdown", "id": "m908739", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003836, + "end_time": "2026-09-27T16:37:59.861704+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.857868+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 3.2 Existential : « il existe un mortel »\n", "\n", @@ -413,25 +638,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.011211Z", - "iopub.status.busy": "2026-07-03T02:55:39.010914Z", - "iopub.status.idle": "2026-07-03T02:55:39.062820Z", - "shell.execute_reply": "2026-07-03T02:55:39.062568Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.871256Z", + "iopub.status.busy": "2026-09-27T16:37:59.871043Z", + "iopub.status.idle": "2026-09-27T16:37:59.910569Z", + "shell.execute_reply": "2026-09-27T16:37:59.910386Z" + }, + "papermill": { + "duration": 0.044995, + "end_time": "2026-09-27T16:37:59.910652+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.865657+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "∃X Mortel(X) = exists X: (Mortel(X))\r\n" + "∃X Mortel(X) = exists X: (Mortel(X))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "¬∃X Mortel(X) = !exists X: (Mortel(X))\r\n" + "¬∃X Mortel(X) = !exists X: (Mortel(X))\n" ] } ], @@ -447,7 +680,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "f8fb646f", + "metadata": { + "papermill": { + "duration": 0.003502, + "end_time": "2026-09-27T16:37:59.917877+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.914375+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 4 — Raisonnement : le syllogisme\n", "\n", @@ -482,25 +725,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.064339Z", - "iopub.status.busy": "2026-07-03T02:55:39.064095Z", - "iopub.status.idle": "2026-07-03T02:55:39.196194Z", - "shell.execute_reply": "2026-07-03T02:55:39.196004Z" - } + "iopub.execute_input": "2026-09-27T16:37:59.926055Z", + "iopub.status.busy": "2026-09-27T16:37:59.925825Z", + "iopub.status.idle": "2026-09-27T16:37:59.999478Z", + "shell.execute_reply": "2026-09-27T16:37:59.999317Z" + }, + "papermill": { + "duration": 0.078385, + "end_time": "2026-09-27T16:37:59.999594+00:00", + "exception": false, + "start_time": "2026-09-27T16:37:59.921209+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB = { forall X: ((Homme(X)=>Mortel(X))), Homme(Socrate) }\r\n" + "KB = { Homme(Socrate), forall X: ((Homme(X)=>Mortel(X))) }\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "taille KB = 2\r\n" + "taille KB = 2\n" ] }, { @@ -508,7 +759,7 @@ "output_type": "stream", "text": [ "\n", - "KB ⊨ Mortel(Socrate) ? true\r\n" + "KB ⊨ Mortel(Socrate) ? true\n" ] } ], @@ -530,7 +781,16 @@ { "cell_type": "markdown", "id": "m846460", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003891, + "end_time": "2026-09-27T16:38:00.007732+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.003841+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 4.1 Contrôle négatif : ce qui n'est **pas** impliqué\n", "\n", @@ -549,25 +809,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.197772Z", - "iopub.status.busy": "2026-07-03T02:55:39.197548Z", - "iopub.status.idle": "2026-07-03T02:55:39.246524Z", - "shell.execute_reply": "2026-07-03T02:55:39.246288Z" - } + "iopub.execute_input": "2026-09-27T16:38:00.016402Z", + "iopub.status.busy": "2026-09-27T16:38:00.016133Z", + "iopub.status.idle": "2026-09-27T16:38:00.055660Z", + "shell.execute_reply": "2026-09-27T16:38:00.055465Z" + }, + "papermill": { + "duration": 0.044651, + "end_time": "2026-09-27T16:38:00.055741+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.011090+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB ⊨ Mortel(Platon) ? false\r\n" + "KB ⊨ Mortel(Platon) ? false\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB ⊨ Homme(Platon) ? false\r\n" + "KB ⊨ Homme(Platon) ? false\n" ] } ], @@ -584,7 +852,16 @@ { "cell_type": "markdown", "id": "m991269", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00403, + "end_time": "2026-09-27T16:38:00.063837+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.059807+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 4.2 Généralisation existentielle\n", "\n", @@ -603,25 +880,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.247913Z", - "iopub.status.busy": "2026-07-03T02:55:39.247708Z", - "iopub.status.idle": "2026-07-03T02:55:39.301199Z", - "shell.execute_reply": "2026-07-03T02:55:39.300992Z" - } + "iopub.execute_input": "2026-09-27T16:38:00.072698Z", + "iopub.status.busy": "2026-09-27T16:38:00.072396Z", + "iopub.status.idle": "2026-09-27T16:38:00.141098Z", + "shell.execute_reply": "2026-09-27T16:38:00.140870Z" + }, + "papermill": { + "duration": 0.073653, + "end_time": "2026-09-27T16:38:00.141212+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.067559+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB ⊨ ∃X Mortel(X) ? true\r\n" + "KB ⊨ ∃X Mortel(X) ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB ⊨ ∀X Mortel(X) ? false\r\n" + "KB ⊨ ∀X Mortel(X) ? false\n" ] } ], @@ -636,7 +921,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "82c9829f", + "metadata": { + "papermill": { + "duration": 0.006346, + "end_time": "2026-09-27T16:38:00.154244+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.147898+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "Lecture des deux réponses. L'**asymétrie** `∃X Mortel(X) → true` / `∀X Mortel(X) → false` est\n", "instructive : la première est portée par un **témoin** (Socrate suffit — le fait `Homme(Socrate)`\n", @@ -652,7 +947,16 @@ { "cell_type": "markdown", "id": "m359571", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.006031, + "end_time": "2026-09-27T16:38:00.166323+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.160292+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 4.3 Une KB plus riche : raisonnement sur plusieurs faits\n", "\n", @@ -671,32 +975,40 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.303011Z", - "iopub.status.busy": "2026-07-03T02:55:39.302741Z", - "iopub.status.idle": "2026-07-03T02:55:39.464563Z", - "shell.execute_reply": "2026-07-03T02:55:39.464224Z" - } + "iopub.execute_input": "2026-09-27T16:38:00.181136Z", + "iopub.status.busy": "2026-09-27T16:38:00.180829Z", + "iopub.status.idle": "2026-09-27T16:38:00.276886Z", + "shell.execute_reply": "2026-09-27T16:38:00.276687Z" + }, + "papermill": { + "duration": 0.104505, + "end_time": "2026-09-27T16:38:00.276981+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.172476+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB2 ⊨ Mortel(Socrate) ? true\r\n" + "KB2 ⊨ Mortel(Socrate) ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB2 ⊨ Mortel(Platon) ? true\r\n" + "KB2 ⊨ Mortel(Platon) ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB2 ⊨ ∃X (Grec(X) ∧ Mortel(X)) ? true\r\n" + "KB2 ⊨ ∃X (Grec(X) ∧ Mortel(X)) ? true\n" ] } ], @@ -721,7 +1033,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "3108fa8d", + "metadata": { + "papermill": { + "duration": 0.004057, + "end_time": "2026-09-27T16:38:00.285613+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.281556+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "Lecture des trois réponses. `Mortel(Socrate)` et `Mortel(Platon)` : le syllogisme se propage à\n", "chaque fait `Homme(·)` ajouté — le raisonner **généralise** l'axiome universel à chaque constante\n", @@ -736,7 +1058,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "2d54ec44", + "metadata": { + "papermill": { + "duration": 0.003929, + "end_time": "2026-09-27T16:38:00.293378+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.289449+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 5 — Sémantique ouverte, complexité, et ce que FOL ne décide pas\n", "\n", @@ -784,7 +1116,16 @@ { "cell_type": "markdown", "id": "m967528", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003666, + "end_time": "2026-09-27T16:38:00.300855+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.297189+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -799,7 +1140,16 @@ { "cell_type": "markdown", "id": "m283487", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003956, + "end_time": "2026-09-27T16:38:00.308800+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.304844+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 1 — Le chat mammifère\n", "\n", @@ -818,18 +1168,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.466548Z", - "iopub.status.busy": "2026-07-03T02:55:39.466212Z", - "iopub.status.idle": "2026-07-03T02:55:39.526412Z", - "shell.execute_reply": "2026-07-03T02:55:39.526204Z" - } + "iopub.execute_input": "2026-09-27T16:38:00.318749Z", + "iopub.status.busy": "2026-09-27T16:38:00.318541Z", + "iopub.status.idle": "2026-09-27T16:38:00.379419Z", + "shell.execute_reply": "2026-09-27T16:38:00.379243Z" + }, + "papermill": { + "duration": 0.06708, + "end_time": "2026-09-27T16:38:00.379546+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.312466+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB ⊨ Mammifere(Felix) ? Exercice a completer\r\n" + "KB ⊨ Mammifere(Felix) ? Exercice a completer\n" ] } ], @@ -847,7 +1205,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "0a7c4903", + "metadata": { + "papermill": { + "duration": 0.00401, + "end_time": "2026-09-27T16:38:00.387974+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.383964+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Correction guidée — Exercice 1\n", "\n", @@ -869,7 +1237,16 @@ { "cell_type": "markdown", "id": "m561725", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003872, + "end_time": "2026-09-27T16:38:00.395675+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.391803+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 2 — Transitivité : grand-parent\n", "\n", @@ -891,18 +1268,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.527667Z", - "iopub.status.busy": "2026-07-03T02:55:39.527464Z", - "iopub.status.idle": "2026-07-03T02:55:39.557200Z", - "shell.execute_reply": "2026-07-03T02:55:39.556845Z" - } + "iopub.execute_input": "2026-09-27T16:38:00.405326Z", + "iopub.status.busy": "2026-09-27T16:38:00.405030Z", + "iopub.status.idle": "2026-09-27T16:38:00.444271Z", + "shell.execute_reply": "2026-09-27T16:38:00.443991Z" + }, + "papermill": { + "duration": 0.04503, + "end_time": "2026-09-27T16:38:00.444449+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.399419+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "GrandParent = Exercice a completer\r\n" + "GrandParent = Exercice a completer\n" ] } ], @@ -917,7 +1302,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "706422b6", + "metadata": { + "papermill": { + "duration": 0.006532, + "end_time": "2026-09-27T16:38:00.457772+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.451240+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Correction guidée — Exercice 2\n", "\n", @@ -941,7 +1336,16 @@ { "cell_type": "markdown", "id": "m104860", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.006102, + "end_time": "2026-09-27T16:38:00.470095+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.463993+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 — Détection d'inconsistance\n", "\n", @@ -962,18 +1366,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:39.558525Z", - "iopub.status.busy": "2026-07-03T02:55:39.558340Z", - "iopub.status.idle": "2026-07-03T02:55:39.590704Z", - "shell.execute_reply": "2026-07-03T02:55:39.590462Z" - } + "iopub.execute_input": "2026-09-27T16:38:00.485112Z", + "iopub.status.busy": "2026-09-27T16:38:00.484778Z", + "iopub.status.idle": "2026-09-27T16:38:00.520015Z", + "shell.execute_reply": "2026-09-27T16:38:00.519737Z" + }, + "papermill": { + "duration": 0.043724, + "end_time": "2026-09-27T16:38:00.520112+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.476388+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB inconsistante ⊨ Homme(Socrate) ? Exercice a completer\r\n" + "KB inconsistante ⊨ Homme(Socrate) ? Exercice a completer\n" ] } ], @@ -988,7 +1400,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "e2537118", + "metadata": { + "papermill": { + "duration": 0.004001, + "end_time": "2026-09-27T16:38:00.528720+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.524719+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Correction guidée — Exercice 3\n", "\n", @@ -1009,7 +1431,16 @@ { "cell_type": "markdown", "id": "m641676", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004187, + "end_time": "2026-09-27T16:38:00.537253+00:00", + "exception": false, + "start_time": "2026-09-27T16:38:00.533066+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -1044,6 +1475,23 @@ } ], "metadata": { + "cost": { + "api_provider": "none", + "api_usd_est": 0.0, + "cpu_min": 10, + "external_account": null, + "free_alternative": null, + "gpu_min": 0, + "gpu_required": false, + "metadata_written": "2026-08-02", + "network": false, + "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account).", + "reduced_pedagogical": null, + "reproducibility": "HIGH", + "validator": "manual", + "vram_gb": 0, + "vram_tier": "NONE" + }, "kernelspec": { "display_name": ".NET (C#)", "language": "C#", @@ -1056,24 +1504,19 @@ "pygments_lexer": "csharp", "version": "13.0" }, - "cost": { - "api_usd_est": 0.0, - "api_provider": "none", - "cpu_min": 10, - "gpu_min": 0, - "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", - "network": false, - "external_account": null, - "free_alternative": null, - "reduced_pedagogical": null, - "reproducibility": "HIGH", - "metadata_written": "2026-08-02", - "validator": "manual", - "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account)." + "papermill": { + "default_parameters": {}, + "duration": 6.660478, + "end_time": "2026-09-27T16:38:00.659800+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-02c-FOL-CSharp.ipynb", + "output_path": "Tweety-02c-FOL-CSharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:37:53.999322+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Advanced-Logics-Csharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Advanced-Logics-Csharp.ipynb index f0a74fb660..84eabed0f2 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Advanced-Logics-Csharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Advanced-Logics-Csharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "be0c0d13dba6", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002439, + "end_time": "2026-09-27T16:40:30.692875+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:30.690436+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety-3 — Description Logics en C#/.NET (port natif IKVM)\n", "\n", @@ -37,7 +46,16 @@ { "cell_type": "markdown", "id": "d0ef8ac315ce", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.001786, + "end_time": "2026-09-27T16:40:30.696875+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:30.695089+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1 — Runtime IKVM : charger le module `logics-dl`\n", "\n", @@ -53,12 +71,142 @@ "cell_type": "code", "execution_count": 1, "id": "dc148f5f6185", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:30.713143Z", + "iopub.status.busy": "2026-09-27T16:40:30.706720Z", + "iopub.status.idle": "2026-09-27T16:40:48.765691Z", + "shell.execute_reply": "2026-09-27T16:40:48.762425Z" + }, + "papermill": { + "duration": 18.066928, + "end_time": "2026-09-27T16:40:48.765853+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:30.698925+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "data": { "text/html": [ - "
Installing Packages
  • IKVM
  • IKVM.Image
  • IKVM.Image.runtime.win-x64
" + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Installed Packages
  • IKVM, 8.14.0
  • IKVM.Image, 8.14.0
" ] }, "metadata": {}, @@ -67,27 +215,42 @@ ], "source": [ "#r \"nuget: IKVM, 8.14.0\"\n", - "#r \"nuget: IKVM.Image, 8.14.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.14.0\"\n" + "#r \"nuget: IKVM.Image, 8.14.0\"\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "b77b50f25bf3", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:48.775147Z", + "iopub.status.busy": "2026-09-27T16:40:48.774922Z", + "iopub.status.idle": "2026-09-27T16:40:49.746930Z", + "shell.execute_reply": "2026-09-27T16:40:49.746716Z" + }, + "papermill": { + "duration": 0.978181, + "end_time": "2026-09-27T16:40:49.747023+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:48.768842+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "IKVM home=OK\r\n" + "IKVM home=OK\n" ] } ], "source": [ "using System.IO;\n", - "string ikvmVer = \"8.14.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.14.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -120,7 +283,22 @@ "cell_type": "code", "execution_count": 3, "id": "e1f032aa9f07", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:49.754236Z", + "iopub.status.busy": "2026-09-27T16:40:49.754051Z", + "iopub.status.idle": "2026-09-27T16:40:50.229576Z", + "shell.execute_reply": "2026-09-27T16:40:50.229155Z" + }, + "papermill": { + "duration": 0.479726, + "end_time": "2026-09-27T16:40:50.229743+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:49.750017+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [], "source": [ "#r \"org.tweetyproject.tweety-advanced-logics.dll\"\n" @@ -130,13 +308,28 @@ "cell_type": "code", "execution_count": 4, "id": "0f9fd30a7fdd", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:50.238471Z", + "iopub.status.busy": "2026-09-27T16:40:50.238247Z", + "iopub.status.idle": "2026-09-27T16:40:50.351395Z", + "shell.execute_reply": "2026-09-27T16:40:50.351218Z" + }, + "papermill": { + "duration": 0.117458, + "end_time": "2026-09-27T16:40:50.351492+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.234034+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-advanced-logics v1.30.0.0 (6,0 Mo).\r\n" + "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-advanced-logics v1.30.0.0 (6.0 Mo).\n" ] } ], @@ -152,7 +345,16 @@ { "cell_type": "markdown", "id": "a8c5e98f0a69", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002229, + "end_time": "2026-09-27T16:40:50.356473+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.354244+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2 — Bases de connaissances DL : TBox et ABox\n", "\n", @@ -179,20 +381,35 @@ "cell_type": "code", "execution_count": 5, "id": "9394df6b6e6c", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:50.362631Z", + "iopub.status.busy": "2026-09-27T16:40:50.362395Z", + "iopub.status.idle": "2026-09-27T16:40:50.813599Z", + "shell.execute_reply": "2026-09-27T16:40:50.813316Z" + }, + "papermill": { + "duration": 0.454917, + "end_time": "2026-09-27T16:40:50.813697+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.358780+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Concept compose = (and Human Mortal)\r\n" + "Concept compose = (and Human Mortal)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Variables (predicates) humain = [Human(Thing)]\r\n" + "Variables (predicates) humain = [Human(Thing)]\n" ] } ], @@ -211,7 +428,13 @@ "cell_type": "markdown", "id": "12f67939", "metadata": { - "papermill": {}, + "papermill": { + "duration": 0.002494, + "end_time": "2026-09-27T16:40:50.819465+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.816971+00:00", + "status": "completed" + }, "tags": [] }, "source": [ @@ -224,20 +447,35 @@ "cell_type": "code", "execution_count": 6, "id": "46aa374ae573", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:50.826099Z", + "iopub.status.busy": "2026-09-27T16:40:50.825897Z", + "iopub.status.idle": "2026-09-27T16:40:50.898333Z", + "shell.execute_reply": "2026-09-27T16:40:50.898153Z" + }, + "papermill": { + "duration": 0.076446, + "end_time": "2026-09-27T16:40:50.898415+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.821969+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB DL : 3 axiomes.\r\n" + "KB DL : 3 axiomes.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Signature : [Cat, Bird, Mammal], [], [sylvester, tweety]\r\n" + "Signature : [Cat, Bird, Mammal], [], [sylvester, tweety]\n" ] } ], @@ -272,7 +510,13 @@ "cell_type": "markdown", "id": "97459168", "metadata": { - "papermill": {}, + "papermill": { + "duration": 0.002343, + "end_time": "2026-09-27T16:40:50.903373+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.901030+00:00", + "status": "completed" + }, "tags": [] }, "source": [ @@ -284,7 +528,16 @@ { "cell_type": "markdown", "id": "af42b80c4d39", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002204, + "end_time": "2026-09-27T16:40:50.907844+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.905640+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3 — Raisonner avec `NaiveDlReasoner`\n", "\n", @@ -302,27 +555,42 @@ "cell_type": "code", "execution_count": 7, "id": "e40662e2e791", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:50.914456Z", + "iopub.status.busy": "2026-09-27T16:40:50.914237Z", + "iopub.status.idle": "2026-09-27T16:40:50.992442Z", + "shell.execute_reply": "2026-09-27T16:40:50.992213Z" + }, + "papermill": { + "duration": 0.082054, + "end_time": "2026-09-27T16:40:50.992525+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.910471+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB1 entail (tweety : Animal via Bird subsume Animal) : True\r\n" + "KB1 entail (tweety : Animal via Bird subsume Animal) : True\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB2 entail (sylvester : Mammal via Cat subsume Mammal) : True\r\n" + "KB2 entail (sylvester : Mammal via Cat subsume Mammal) : True\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB2 entail (sylvester : Animal, en l'absence de Mammal subsume Animal) : False\r\n" + "KB2 entail (sylvester : Animal, en l'absence de Mammal subsume Animal) : False\n" ] } ], @@ -367,7 +635,13 @@ "cell_type": "markdown", "id": "475d9b50", "metadata": { - "papermill": {}, + "papermill": { + "duration": 0.002776, + "end_time": "2026-09-27T16:40:50.998387+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:50.995611+00:00", + "status": "completed" + }, "tags": [] }, "source": [ @@ -379,7 +653,16 @@ { "cell_type": "markdown", "id": "19f33a758167", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002264, + "end_time": "2026-09-27T16:40:51.003097+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.000833+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -391,7 +674,16 @@ { "cell_type": "markdown", "id": "df4827c56926", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00264, + "end_time": "2026-09-27T16:40:51.008191+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.005551+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 1 — Chaîne de subsomption a 3 niveaux\n", "\n", @@ -405,27 +697,42 @@ "cell_type": "code", "execution_count": 8, "id": "c50f79908753", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:51.014434Z", + "iopub.status.busy": "2026-09-27T16:40:51.014211Z", + "iopub.status.idle": "2026-09-27T16:40:51.072842Z", + "shell.execute_reply": "2026-09-27T16:40:51.072655Z" + }, + "papermill": { + "duration": 0.062309, + "end_time": "2026-09-27T16:40:51.072933+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.010624+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB entail (Salarie subsume Personne) : Exercice a completer\r\n" + "KB entail (Salarie subsume Personne) : Exercice a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB entail (Salarie subsume Employe) : Exercice a completer\r\n" + "KB entail (Salarie subsume Employe) : Exercice a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Exercice a completer\r\n" + "Exercice a completer\n" ] } ], @@ -444,7 +751,16 @@ { "cell_type": "markdown", "id": "14039e50c06f", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002701, + "end_time": "2026-09-27T16:40:51.078480+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.075779+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 2 — Rôle et restriction existentielle\n", "\n", @@ -461,20 +777,35 @@ "cell_type": "code", "execution_count": 9, "id": "8ad2bd55268b", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:51.085350Z", + "iopub.status.busy": "2026-09-27T16:40:51.085167Z", + "iopub.status.idle": "2026-09-27T16:40:51.134492Z", + "shell.execute_reply": "2026-09-27T16:40:51.134328Z" + }, + "papermill": { + "duration": 0.053532, + "end_time": "2026-09-27T16:40:51.134612+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.081080+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB entail (alice : exists hasParent . Human) : Exercice a completer\r\n" + "KB entail (alice : exists hasParent . Human) : Exercice a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Exercice a completer\r\n" + "Exercice a completer\n" ] } ], @@ -491,7 +822,16 @@ { "cell_type": "markdown", "id": "8fdf7ad47367", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002653, + "end_time": "2026-09-27T16:40:51.140423+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.137770+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 — Cohabitation exemple + exercice (multi-formules)\n", "\n", @@ -507,27 +847,42 @@ "cell_type": "code", "execution_count": 10, "id": "b9e13b0d6ff0", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-27T16:40:51.149296Z", + "iopub.status.busy": "2026-09-27T16:40:51.149026Z", + "iopub.status.idle": "2026-09-27T16:40:51.178444Z", + "shell.execute_reply": "2026-09-27T16:40:51.178273Z" + }, + "papermill": { + "duration": 0.034151, + "end_time": "2026-09-27T16:40:51.178520+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.144369+00:00", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "KB entail (alice : Human) : Exercice a completer\r\n" + "KB entail (alice : Human) : Exercice a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "KB entail (alice : Salarie) : Exercice a completer\r\n" + "KB entail (alice : Salarie) : Exercice a completer\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Exercice a completer\r\n" + "Exercice a completer\n" ] } ], @@ -545,7 +900,16 @@ { "cell_type": "markdown", "id": "4b71c541e959", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002615, + "end_time": "2026-09-27T16:40:51.184206+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:51.181591+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -595,10 +959,25 @@ "name": ".net-csharp" }, "language_info": { + "file_extension": ".cs", + "mimetype": "text/x-csharp", "name": "C#", - "version": "12.0" + "pygments_lexer": "csharp", + "version": "13.0" + }, + "papermill": { + "default_parameters": {}, + "duration": 22.577998, + "end_time": "2026-09-27T16:40:51.302247+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-3-Advanced-Logics-Csharp.ipynb", + "output_path": "Tweety-3-Advanced-Logics-Csharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:40:28.724249+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Conditional-Logics-Csharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Conditional-Logics-Csharp.ipynb index f710d70921..ce7f386f4a 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Conditional-Logics-Csharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Conditional-Logics-Csharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "c9b7809b", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002316, + "end_time": "2026-09-27T16:40:56.524481+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:56.522165+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety-3 — Conditional Logics en C#/.NET (port natif IKVM)\n", "\n", @@ -42,7 +51,16 @@ { "cell_type": "markdown", "id": "3a064ee9", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.001837, + "end_time": "2026-09-27T16:40:56.528480+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:56.526643+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1 - Runtime IKVM : charger le module `logics-cl`\n", "\n", @@ -58,25 +76,149 @@ "id": "40b561c6", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:31.407728Z", - "iopub.status.busy": "2026-07-03T14:31:31.396519Z", - "iopub.status.idle": "2026-07-03T14:31:33.398659Z", - "shell.execute_reply": "2026-07-03T14:31:33.392707Z" - } + "iopub.execute_input": "2026-09-27T16:40:56.544588Z", + "iopub.status.busy": "2026-09-27T16:40:56.537506Z", + "iopub.status.idle": "2026-09-27T16:40:57.791309Z", + "shell.execute_reply": "2026-09-27T16:40:57.787749Z" + }, + "papermill": { + "duration": 1.261079, + "end_time": "2026-09-27T16:40:57.791472+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:56.530393+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "display_data", "data": { - "text/html": "
Installing Packages
  • IKVM
  • IKVM.Image
  • IKVM.Image.runtime.win-x64
" + "text/html": [ + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Installed Packages
  • IKVM, 8.14.0
  • IKVM.Image, 8.14.0
" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ "#r \"nuget: IKVM, 8.14.0\"\n", "#r \"nuget: IKVM.Image, 8.14.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.14.0\"\n", "\n" ] }, @@ -86,22 +228,33 @@ "id": "a2cae67e", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:33.401346Z", - "iopub.status.busy": "2026-07-03T14:31:33.401000Z", - "iopub.status.idle": "2026-07-03T14:31:34.901369Z", - "shell.execute_reply": "2026-07-03T14:31:34.901148Z" - } + "iopub.execute_input": "2026-09-27T16:40:57.799601Z", + "iopub.status.busy": "2026-09-27T16:40:57.799128Z", + "iopub.status.idle": "2026-09-27T16:40:58.634531Z", + "shell.execute_reply": "2026-09-27T16:40:58.634353Z" + }, + "papermill": { + "duration": 0.840041, + "end_time": "2026-09-27T16:40:58.634679+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:57.794638+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "IKVM home=OK\r\n" + "output_type": "stream", + "text": [ + "IKVM home=OK\n" + ] } ], "source": [ "using System.IO;\n", - "string ikvmVer = \"8.14.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.14.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -135,11 +288,19 @@ "id": "25617e37", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:34.902879Z", - "iopub.status.busy": "2026-07-03T14:31:34.902651Z", - "iopub.status.idle": "2026-07-03T14:31:34.935766Z", - "shell.execute_reply": "2026-07-03T14:31:34.935505Z" - } + "iopub.execute_input": "2026-09-27T16:40:58.643673Z", + "iopub.status.busy": "2026-09-27T16:40:58.643431Z", + "iopub.status.idle": "2026-09-27T16:40:59.450475Z", + "shell.execute_reply": "2026-09-27T16:40:59.450249Z" + }, + "papermill": { + "duration": 0.81116, + "end_time": "2026-09-27T16:40:59.450629+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:58.639469+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -153,17 +314,27 @@ "id": "6068abd5", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:34.937315Z", - "iopub.status.busy": "2026-07-03T14:31:34.937084Z", - "iopub.status.idle": "2026-07-03T14:31:35.082108Z", - "shell.execute_reply": "2026-07-03T14:31:35.081933Z" - } + "iopub.execute_input": "2026-09-27T16:40:59.458281Z", + "iopub.status.busy": "2026-09-27T16:40:59.458055Z", + "iopub.status.idle": "2026-09-27T16:40:59.597289Z", + "shell.execute_reply": "2026-09-27T16:40:59.597076Z" + }, + "papermill": { + "duration": 0.143451, + "end_time": "2026-09-27T16:40:59.597401+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.453950+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Tweety CL (IKVM) reference chargee : org.tweetyproject.tweety-conditional-logics v1.30.0.0 (11,0 Mo).\r\n" + "output_type": "stream", + "text": [ + "Tweety CL (IKVM) reference chargee : org.tweetyproject.tweety-conditional-logics v1.30.0.0 (11.0 Mo).\n" + ] } ], "source": [ @@ -177,7 +348,16 @@ { "cell_type": "markdown", "id": "05edff27", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002637, + "end_time": "2026-09-27T16:40:59.603272+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.600635+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## Diagnostic IKVM - Verdict exact\n", "\n", @@ -191,7 +371,16 @@ { "cell_type": "markdown", "id": "9b600e02", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002488, + "end_time": "2026-09-27T16:40:59.608410+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.605922+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2 - Bases CL : `ClBeliefSet` et `Conditional`\n", "\n", @@ -214,17 +403,27 @@ "id": "779ad73c", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:35.083414Z", - "iopub.status.busy": "2026-07-03T14:31:35.083199Z", - "iopub.status.idle": "2026-07-03T14:31:35.128750Z", - "shell.execute_reply": "2026-07-03T14:31:35.128554Z" - } + "iopub.execute_input": "2026-09-27T16:40:59.615801Z", + "iopub.status.busy": "2026-09-27T16:40:59.615397Z", + "iopub.status.idle": "2026-09-27T16:40:59.679984Z", + "shell.execute_reply": "2026-09-27T16:40:59.679700Z" + }, + "papermill": { + "duration": 0.069152, + "end_time": "2026-09-27T16:40:59.680152+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.611000+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "[DIAGNOSTIC IKVM] Cell[8] : types non exposes, code preserve en commentaire.\r\n" + "output_type": "stream", + "text": [ + "[DIAGNOSTIC IKVM] Cell[8] : types non exposes, code preserve en commentaire.\n" + ] } ], "source": [ @@ -242,7 +441,16 @@ { "cell_type": "markdown", "id": "430ce269", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003384, + "end_time": "2026-09-27T16:40:59.687299+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.683915+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3 - Trois raisonneurs CL : `SimpleCReasoner`, `ZReasoner`, `RuleBasedCReasoner`\n", "\n", @@ -270,17 +478,27 @@ "id": "cbce38b6", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:35.130364Z", - "iopub.status.busy": "2026-07-03T14:31:35.130105Z", - "iopub.status.idle": "2026-07-03T14:31:35.169077Z", - "shell.execute_reply": "2026-07-03T14:31:35.168841Z" - } + "iopub.execute_input": "2026-09-27T16:40:59.695945Z", + "iopub.status.busy": "2026-09-27T16:40:59.695635Z", + "iopub.status.idle": "2026-09-27T16:40:59.730868Z", + "shell.execute_reply": "2026-09-27T16:40:59.730634Z" + }, + "papermill": { + "duration": 0.040549, + "end_time": "2026-09-27T16:40:59.730988+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.690439+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "[DIAGNOSTIC IKVM] Cell[10] : types non exposes, code preserve en commentaire.\r\n" + "output_type": "stream", + "text": [ + "[DIAGNOSTIC IKVM] Cell[10] : types non exposes, code preserve en commentaire.\n" + ] } ], "source": [ @@ -298,7 +516,16 @@ { "cell_type": "markdown", "id": "a334d803", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003249, + "end_time": "2026-09-27T16:40:59.738189+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.734940+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -310,7 +537,16 @@ { "cell_type": "markdown", "id": "50664db9", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003034, + "end_time": "2026-09-27T16:40:59.744520+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.741486+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 1 - Construire un belief set + query simple\n", "\n", @@ -326,17 +562,27 @@ "id": "05ddb8a7", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:35.170455Z", - "iopub.status.busy": "2026-07-03T14:31:35.170238Z", - "iopub.status.idle": "2026-07-03T14:31:35.218719Z", - "shell.execute_reply": "2026-07-03T14:31:35.218199Z" - } + "iopub.execute_input": "2026-09-27T16:40:59.753197Z", + "iopub.status.busy": "2026-09-27T16:40:59.752907Z", + "iopub.status.idle": "2026-09-27T16:40:59.782207Z", + "shell.execute_reply": "2026-09-27T16:40:59.782009Z" + }, + "papermill": { + "duration": 0.034379, + "end_time": "2026-09-27T16:40:59.782307+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.747928+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Theorie T (smokes|friend), (cancer|smokes) ; query 'cancer' sachant 'friend' : Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "Theorie T (smokes|friend), (cancer|smokes) ; query 'cancer' sachant 'friend' : Exercice a completer\n" + ] } ], "source": [ @@ -348,7 +594,16 @@ { "cell_type": "markdown", "id": "597cd9b6", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003218, + "end_time": "2026-09-27T16:40:59.788884+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.785666+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 2 - Comparaison des raisonneurs sur une théorie avec exceptions\n", "\n", @@ -367,17 +622,27 @@ "id": "8b60f440", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:35.220548Z", - "iopub.status.busy": "2026-07-03T14:31:35.220333Z", - "iopub.status.idle": "2026-07-03T14:31:35.261110Z", - "shell.execute_reply": "2026-07-03T14:31:35.260702Z" - } + "iopub.execute_input": "2026-09-27T16:40:59.797158Z", + "iopub.status.busy": "2026-09-27T16:40:59.796902Z", + "iopub.status.idle": "2026-09-27T16:40:59.863018Z", + "shell.execute_reply": "2026-09-27T16:40:59.862760Z" + }, + "papermill": { + "duration": 0.071038, + "end_time": "2026-09-27T16:40:59.863109+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.792071+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Theorie T2 ; query 'cancer' sachant 'friend+exercising' : Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "Theorie T2 ; query 'cancer' sachant 'friend+exercising' : Exercice a completer\n" + ] } ], "source": [ @@ -389,7 +654,16 @@ { "cell_type": "markdown", "id": "e90dd24c", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002544, + "end_time": "2026-09-27T16:40:59.868554+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.866010+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 - Système P : application manuelle des règles\n", "\n", @@ -411,17 +685,27 @@ "id": "8dc5db1f", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:35.262411Z", - "iopub.status.busy": "2026-07-03T14:31:35.262224Z", - "iopub.status.idle": "2026-07-03T14:31:35.340360Z", - "shell.execute_reply": "2026-07-03T14:31:35.340176Z" - } + "iopub.execute_input": "2026-09-27T16:40:59.875079Z", + "iopub.status.busy": "2026-09-27T16:40:59.874826Z", + "iopub.status.idle": "2026-09-27T16:40:59.930590Z", + "shell.execute_reply": "2026-09-27T16:40:59.930301Z" + }, + "papermill": { + "duration": 0.059894, + "end_time": "2026-09-27T16:40:59.930705+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.870811+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Theorie [[a|b), (b|c]] ; query (a|c) via RuleBasedCReasoner : Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "Theorie [[a|b), (b|c]] ; query (a|c) via RuleBasedCReasoner : Exercice a completer\n" + ] } ], "source": [ @@ -433,7 +717,16 @@ { "cell_type": "markdown", "id": "cc4c7ea8", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003501, + "end_time": "2026-09-27T16:40:59.938165+00:00", + "exception": false, + "start_time": "2026-09-27T16:40:59.934664+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -488,6 +781,23 @@ } ], "metadata": { + "cost": { + "api_provider": "none", + "api_usd_est": 0.0, + "cpu_min": 6, + "external_account": null, + "free_alternative": null, + "gpu_min": 0, + "gpu_required": false, + "metadata_written": "2026-08-02", + "network": false, + "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account).", + "reduced_pedagogical": null, + "reproducibility": "HIGH", + "validator": "manual", + "vram_gb": 0, + "vram_tier": "NONE" + }, "kernelspec": { "display_name": ".NET (C#)", "language": "C#", @@ -500,24 +810,19 @@ "pygments_lexer": "csharp", "version": "13.0" }, - "cost": { - "api_usd_est": 0.0, - "api_provider": "none", - "cpu_min": 6, - "gpu_min": 0, - "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", - "network": false, - "external_account": null, - "free_alternative": null, - "reduced_pedagogical": null, - "reproducibility": "HIGH", - "metadata_written": "2026-08-02", - "validator": "manual", - "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account)." + "papermill": { + "default_parameters": {}, + "duration": 5.485318, + "end_time": "2026-09-27T16:41:00.057031+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-3-Conditional-Logics-Csharp.ipynb", + "output_path": "Tweety-3-Conditional-Logics-Csharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:40:54.571713+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Dung-Csharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Dung-Csharp.ipynb index 4a48a87be8..14cf55848b 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Dung-Csharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-Dung-Csharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "m601032", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003797, + "end_time": "2026-09-27T16:36:41.495660+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:41.491863+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety-3 — Argumentation abstraite de Dung en C#/.NET (port natif IKVM)\n", "\n", @@ -48,7 +57,16 @@ { "cell_type": "markdown", "id": "m121394", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00391, + "end_time": "2026-09-27T16:36:41.503916+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:41.500006+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1 — Runtime IKVM : charger le module `arg-dung`\n", "\n", @@ -67,13 +85,136 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:47.358601Z", - "iopub.status.busy": "2026-07-03T02:55:47.348660Z", - "iopub.status.idle": "2026-07-03T02:55:49.144790Z", - "shell.execute_reply": "2026-07-03T02:55:49.137989Z" - } + "iopub.execute_input": "2026-09-27T16:36:41.526810Z", + "iopub.status.busy": "2026-09-27T16:36:41.518464Z", + "iopub.status.idle": "2026-09-27T16:36:43.845449Z", + "shell.execute_reply": "2026-09-27T16:36:43.842170Z" + }, + "papermill": { + "duration": 2.337668, + "end_time": "2026-09-27T16:36:43.845685+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:41.508017+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ + { + "data": { + "text/html": [ + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/html": [ @@ -87,7 +228,6 @@ "source": [ "#r \"nuget: IKVM, 8.15.0\"\n", "#r \"nuget: IKVM.Image, 8.15.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.15.0\"\n", "\n" ] }, @@ -100,24 +240,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:49.147248Z", - "iopub.status.busy": "2026-07-03T02:55:49.146927Z", - "iopub.status.idle": "2026-07-03T02:55:50.634006Z", - "shell.execute_reply": "2026-07-03T02:55:50.633464Z" - } + "iopub.execute_input": "2026-09-27T16:36:43.856179Z", + "iopub.status.busy": "2026-09-27T16:36:43.855867Z", + "iopub.status.idle": "2026-09-27T16:36:47.553261Z", + "shell.execute_reply": "2026-09-27T16:36:47.552994Z" + }, + "papermill": { + "duration": 3.703624, + "end_time": "2026-09-27T16:36:47.553378+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:43.849754+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "IKVM home=OK\r\n" + "IKVM home=OK\n" ] } ], "source": [ "using System.IO;\n", - "string ikvmVer = \"8.15.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.15.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -154,11 +303,19 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:50.636372Z", - "iopub.status.busy": "2026-07-03T02:55:50.635946Z", - "iopub.status.idle": "2026-07-03T02:55:50.682053Z", - "shell.execute_reply": "2026-07-03T02:55:50.681677Z" - } + "iopub.execute_input": "2026-09-27T16:36:47.566640Z", + "iopub.status.busy": "2026-09-27T16:36:47.565796Z", + "iopub.status.idle": "2026-09-27T16:36:47.735615Z", + "shell.execute_reply": "2026-09-27T16:36:47.735402Z" + }, + "papermill": { + "duration": 0.177051, + "end_time": "2026-09-27T16:36:47.735718+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:47.558667+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -172,18 +329,26 @@ "id": "28675c1a", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T02:55:50.684160Z", - "iopub.status.busy": "2026-07-03T02:55:50.683822Z", - "iopub.status.idle": "2026-07-03T02:55:50.844771Z", - "shell.execute_reply": "2026-07-03T02:55:50.844445Z" - } + "iopub.execute_input": "2026-09-27T16:36:47.745065Z", + "iopub.status.busy": "2026-09-27T16:36:47.744856Z", + "iopub.status.idle": "2026-09-27T16:36:47.968351Z", + "shell.execute_reply": "2026-09-27T16:36:47.967540Z" + }, + "papermill": { + "duration": 0.229365, + "end_time": "2026-09-27T16:36:47.968546+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:47.739181+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-dung v1.30.0.0 (8,0 Mo).\r\n" + "Tweety (IKVM) reference chargee : org.tweetyproject.tweety-dung v1.30.0.0 (8.0 Mo).\n" ] } ], @@ -199,7 +364,16 @@ { "cell_type": "markdown", "id": "m882736", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004731, + "end_time": "2026-09-27T16:36:47.978544+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:47.973813+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2 — Construire un cadre d'argumentation (AF)\n", "\n", @@ -221,25 +395,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:50.846952Z", - "iopub.status.busy": "2026-07-03T02:55:50.846630Z", - "iopub.status.idle": "2026-07-03T02:55:51.447018Z", - "shell.execute_reply": "2026-07-03T02:55:51.446719Z" - } + "iopub.execute_input": "2026-09-27T16:36:47.990250Z", + "iopub.status.busy": "2026-09-27T16:36:47.989951Z", + "iopub.status.idle": "2026-09-27T16:36:49.281289Z", + "shell.execute_reply": "2026-09-27T16:36:49.281122Z" + }, + "papermill": { + "duration": 1.297958, + "end_time": "2026-09-27T16:36:49.281384+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:47.983426+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "AF = <{ a, b },[(a,b)]>\r\n" + "AF = <{ a, b },[(a,b)]>\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "nb noeuds = 2\r\n" + "nb noeuds = 2\n" ] } ], @@ -265,7 +447,16 @@ { "cell_type": "markdown", "id": "m786216", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002892, + "end_time": "2026-09-27T16:36:49.287901+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.285009+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 2.2 Attaque mutuelle et cycle\n", "\n", @@ -284,25 +475,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:51.448776Z", - "iopub.status.busy": "2026-07-03T02:55:51.448512Z", - "iopub.status.idle": "2026-07-03T02:55:51.553073Z", - "shell.execute_reply": "2026-07-03T02:55:51.552803Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.295756Z", + "iopub.status.busy": "2026-09-27T16:36:49.295420Z", + "iopub.status.idle": "2026-09-27T16:36:49.357873Z", + "shell.execute_reply": "2026-09-27T16:36:49.357691Z" + }, + "papermill": { + "duration": 0.067187, + "end_time": "2026-09-27T16:36:49.357960+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.290773+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "AF2 (attaque mutuelle) = <{ x, y },[(x,y), (y,x)]>\r\n" + "AF2 (attaque mutuelle) = <{ x, y },[(x,y), (y,x)]>\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Bien-fondé ? False\r\n" + "Bien-fondé ? False\n" ] } ], @@ -321,7 +520,16 @@ { "cell_type": "markdown", "id": "m315100", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003481, + "end_time": "2026-09-27T16:36:49.365434+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.361953+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3 — Calculer les extensions\n", "\n", @@ -347,25 +555,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:51.555002Z", - "iopub.status.busy": "2026-07-03T02:55:51.554716Z", - "iopub.status.idle": "2026-07-03T02:55:51.664102Z", - "shell.execute_reply": "2026-07-03T02:55:51.663827Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.375008Z", + "iopub.status.busy": "2026-09-27T16:36:49.374684Z", + "iopub.status.idle": "2026-09-27T16:36:49.430360Z", + "shell.execute_reply": "2026-09-27T16:36:49.430103Z" + }, + "papermill": { + "duration": 0.061563, + "end_time": "2026-09-27T16:36:49.430470+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.368907+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Extensions fondées de AF :\r\n" + "Extensions fondées de AF :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {a}\r\n" + " {a}\n" ] }, { @@ -373,14 +589,14 @@ "output_type": "stream", "text": [ "\n", - "AF, fondée ⊨ a ? true\r\n" + "AF, fondée ⊨ a ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF, fondée ⊨ b ? false\r\n" + "AF, fondée ⊨ b ? false\n" ] } ], @@ -401,7 +617,16 @@ { "cell_type": "markdown", "id": "i3bb7a9fd", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.005155, + "end_time": "2026-09-27T16:36:49.441377+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.436222+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Lecture du résultat : pourquoi `{a}` ?\n", "\n", @@ -417,7 +642,16 @@ { "cell_type": "markdown", "id": "m819417", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004702, + "end_time": "2026-09-27T16:36:49.451114+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.446412+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 3.2 Attaque mutuelle : fondée vs stable vs préférée\n", "\n", @@ -440,95 +674,103 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:51.666086Z", - "iopub.status.busy": "2026-07-03T02:55:51.665753Z", - "iopub.status.idle": "2026-07-03T02:55:51.748750Z", - "shell.execute_reply": "2026-07-03T02:55:51.748442Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.463318Z", + "iopub.status.busy": "2026-09-27T16:36:49.463003Z", + "iopub.status.idle": "2026-09-27T16:36:49.510141Z", + "shell.execute_reply": "2026-09-27T16:36:49.509931Z" + }, + "papermill": { + "duration": 0.054106, + "end_time": "2026-09-27T16:36:49.510252+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.456146+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "AF2 fondée :\r\n" + "AF2 fondée :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {}\r\n" + " {}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF2 stable :\r\n" + "AF2 stable :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {x}\r\n" + " {x}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {y}\r\n" + " {y}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF2 préférée :\r\n" + "AF2 préférée :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {x}\r\n" + " {x}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {y}\r\n" + " {y}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF2 complète :\r\n" + "AF2 complète :\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {x}\r\n" + " {x}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {y}\r\n" + " {y}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - " {}\r\n" + " {}\n" ] } ], @@ -550,7 +792,16 @@ { "cell_type": "markdown", "id": "icc72fd74", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.005545, + "end_time": "2026-09-27T16:36:49.522111+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.516566+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Lecture du résultat : la hiérarchie des sémantiques se dévoile\n", "\n", @@ -563,14 +814,22 @@ "| **Préférée** | `{x}`, `{y}` | Maximaux parmi les admissibles. Ici, coïncide avec le stable. |\n", "| **Complète** | `{x}`, `{y}`, `{}` | Comme la préférée **plus `{}`** : l'extension vide est admissible, et elle est complète ici car aucun argument n'est inattaqué (sur d'autres AF, `{}` cesse d'être complète — l'Exercice 3 le montrera). |\n", "\n", - "**La cascade d'inclusions canonique** : `fondée ⊆ complète`, et la fondée est la *plus petite* extension complète (ici `{}`). `stable ⊆ complète` quand des stables existent ; `préférée = complète maximale`. C'est cette hiérarchie que les exercices ci-dessous vous demanderont d'explorer sur des AF plus subtils (cycle à trois, auto-attaque).\n", - "" + "**La cascade d'inclusions canonique** : `fondée ⊆ complète`, et la fondée est la *plus petite* extension complète (ici `{}`). `stable ⊆ complète` quand des stables existent ; `préférée = complète maximale`. C'est cette hiérarchie que les exercices ci-dessous vous demanderont d'explorer sur des AF plus subtils (cycle à trois, auto-attaque).\n" ] }, { "cell_type": "markdown", "id": "m622273", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.005405, + "end_time": "2026-09-27T16:36:49.533113+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.527708+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 4 — Un AF plus riche : défense en chaîne\n", "\n", @@ -599,25 +858,33 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:51.750894Z", - "iopub.status.busy": "2026-07-03T02:55:51.750575Z", - "iopub.status.idle": "2026-07-03T02:55:51.955406Z", - "shell.execute_reply": "2026-07-03T02:55:51.955127Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.546647Z", + "iopub.status.busy": "2026-09-27T16:36:49.546214Z", + "iopub.status.idle": "2026-09-27T16:36:49.618665Z", + "shell.execute_reply": "2026-09-27T16:36:49.618384Z" + }, + "papermill": { + "duration": 0.08004, + "end_time": "2026-09-27T16:36:49.618783+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.538743+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "AF3 = <{ A, B, C, D },[(A,B), (A,C), (D,A)]>\r\n" + "AF3 = <{ A, B, C, D },[(A,B), (A,C), (D,A)]>\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF3 fondée = {B,C,D}\r\n" + "AF3 fondée = {B,C,D}\n" ] }, { @@ -625,21 +892,21 @@ "output_type": "stream", "text": [ "\n", - "AF3 fondée ⊨ D ? true\r\n" + "AF3 fondée ⊨ D ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF3 fondée ⊨ B ? true\r\n" + "AF3 fondée ⊨ B ? true\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "AF3 fondée ⊨ A ? false\r\n" + "AF3 fondée ⊨ A ? false\n" ] } ], @@ -671,7 +938,16 @@ { "cell_type": "markdown", "id": "i0c6a2416", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.006039, + "end_time": "2026-09-27T16:36:49.631134+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.625095+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Lecture du résultat : la défense en chaîne\n", "\n", @@ -687,7 +963,16 @@ { "cell_type": "markdown", "id": "m90160", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.005391, + "end_time": "2026-09-27T16:36:49.642371+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.636980+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -699,7 +984,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "7c4c7298", + "metadata": { + "papermill": { + "duration": 0.005622, + "end_time": "2026-09-27T16:36:49.653902+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.648280+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 1 — Cycle à trois : stable vs fondée\n", "\n", @@ -722,18 +1017,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:51.957350Z", - "iopub.status.busy": "2026-07-03T02:55:51.957056Z", - "iopub.status.idle": "2026-07-03T02:55:52.024691Z", - "shell.execute_reply": "2026-07-03T02:55:52.024409Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.667696Z", + "iopub.status.busy": "2026-09-27T16:36:49.667360Z", + "iopub.status.idle": "2026-09-27T16:36:49.698941Z", + "shell.execute_reply": "2026-09-27T16:36:49.698718Z" + }, + "papermill": { + "duration": 0.039461, + "end_time": "2026-09-27T16:36:49.699056+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.659595+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "extensions stables du cycle = Exercice a completer\r\n" + "extensions stables du cycle = Exercice a completer\n" ] } ], @@ -747,7 +1050,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "48a1d24b", + "metadata": { + "papermill": { + "duration": 0.006424, + "end_time": "2026-09-27T16:36:49.711830+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.705406+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Correction guidée — Exercice 1 : le 3-cycle n'a AUCUNE extension stable\n", "\n", @@ -775,7 +1088,16 @@ { "cell_type": "markdown", "id": "m501805", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.005577, + "end_time": "2026-09-27T16:36:49.723337+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.717760+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 2 — Auto-attaque\n", "\n", @@ -796,18 +1118,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:52.026926Z", - "iopub.status.busy": "2026-07-03T02:55:52.026617Z", - "iopub.status.idle": "2026-07-03T02:55:52.109884Z", - "shell.execute_reply": "2026-07-03T02:55:52.109588Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.737366Z", + "iopub.status.busy": "2026-09-27T16:36:49.737042Z", + "iopub.status.idle": "2026-09-27T16:36:49.787973Z", + "shell.execute_reply": "2026-09-27T16:36:49.787815Z" + }, + "papermill": { + "duration": 0.058955, + "end_time": "2026-09-27T16:36:49.788063+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.729108+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "AF auto-attaque, fondée ⊨ s ? Exercice a completer\r\n" + "AF auto-attaque, fondée ⊨ s ? Exercice a completer\n" ] } ], @@ -821,7 +1151,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "f64a7be0", + "metadata": { + "papermill": { + "duration": 0.004031, + "end_time": "2026-09-27T16:36:49.796272+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.792241+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Correction guidée — Exercice 2 : l'auto-attaque exclut partout\n", "\n", @@ -848,7 +1188,16 @@ { "cell_type": "markdown", "id": "m144582", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003762, + "end_time": "2026-09-27T16:36:49.803953+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.800191+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 — Complète vs préférée… et le statut de l'extension vide\n", "\n", @@ -873,18 +1222,26 @@ "language": "csharp" }, "execution": { - "iopub.execute_input": "2026-07-03T02:55:52.111906Z", - "iopub.status.busy": "2026-07-03T02:55:52.111595Z", - "iopub.status.idle": "2026-07-03T02:55:52.163238Z", - "shell.execute_reply": "2026-07-03T02:55:52.162925Z" - } + "iopub.execute_input": "2026-09-27T16:36:49.813080Z", + "iopub.status.busy": "2026-09-27T16:36:49.812881Z", + "iopub.status.idle": "2026-09-27T16:36:49.834897Z", + "shell.execute_reply": "2026-09-27T16:36:49.834743Z" + }, + "papermill": { + "duration": 0.027365, + "end_time": "2026-09-27T16:36:49.834975+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.807610+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "extension commune complète/préférée = Exercice a completer\r\n" + "extension commune complète/préférée = Exercice a completer\n" ] } ], @@ -898,7 +1255,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "66e7e3db", + "metadata": { + "papermill": { + "duration": 0.003898, + "end_time": "2026-09-27T16:36:49.842796+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.838898+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "#### Correction guidée — Exercice 3 : pourquoi `{}` n'est PAS complète ici\n", "\n", @@ -931,7 +1298,17 @@ }, { "cell_type": "markdown", - "metadata": {}, + "id": "f089f31e", + "metadata": { + "papermill": { + "duration": 0.00368, + "end_time": "2026-09-27T16:36:49.850369+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.846689+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 5 — Synthèse : quatre sémantiques, cinq graphes, une grille de lecture\n", "\n", @@ -971,7 +1348,16 @@ { "cell_type": "markdown", "id": "m372034", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003659, + "end_time": "2026-09-27T16:36:49.857837+00:00", + "exception": false, + "start_time": "2026-09-27T16:36:49.854178+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -1006,6 +1392,23 @@ } ], "metadata": { + "cost": { + "api_provider": "none", + "api_usd_est": 0.0, + "cpu_min": 8, + "external_account": null, + "free_alternative": null, + "gpu_min": 0, + "gpu_required": false, + "metadata_written": "2026-08-02", + "network": false, + "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account).", + "reduced_pedagogical": null, + "reproducibility": "HIGH", + "validator": "manual", + "vram_gb": 0, + "vram_tier": "NONE" + }, "kernelspec": { "display_name": ".NET (C#)", "language": "C#", @@ -1018,24 +1421,19 @@ "pygments_lexer": "csharp", "version": "13.0" }, - "cost": { - "api_usd_est": 0.0, - "api_provider": "none", - "cpu_min": 8, - "gpu_min": 0, - "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", - "network": false, - "external_account": null, - "free_alternative": null, - "reduced_pedagogical": null, - "reproducibility": "HIGH", - "metadata_written": "2026-08-02", - "validator": "manual", - "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account)." + "papermill": { + "default_parameters": {}, + "duration": 11.245514, + "end_time": "2026-09-27T16:36:50.078978+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-3-Dung-Csharp.ipynb", + "output_path": "Tweety-3-Dung-Csharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:36:38.833464+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-ModalLogic-Csharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-ModalLogic-Csharp.ipynb index 25fbf8fffe..7545a79821 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-ModalLogic-Csharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-ModalLogic-Csharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "2b0f5fed", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002651, + "end_time": "2026-09-27T16:41:05.600921+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:05.598270+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety-3 Modal Logic en C#/.NET (port natif IKVM)\n", "\n", @@ -57,7 +66,16 @@ { "cell_type": "markdown", "id": "1f1626f5", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002598, + "end_time": "2026-09-27T16:41:05.607321+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:05.604723+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1 - Runtime IKVM : charger le module `logics-ml`\n", "\n", @@ -72,25 +90,149 @@ "id": "439ebfe7", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:25.792658Z", - "iopub.status.busy": "2026-07-03T14:19:25.784568Z", - "iopub.status.idle": "2026-07-03T14:19:27.771511Z", - "shell.execute_reply": "2026-07-03T14:19:27.761909Z" - } + "iopub.execute_input": "2026-09-27T16:41:05.625250Z", + "iopub.status.busy": "2026-09-27T16:41:05.618622Z", + "iopub.status.idle": "2026-09-27T16:41:06.863173Z", + "shell.execute_reply": "2026-09-27T16:41:06.859992Z" + }, + "papermill": { + "duration": 1.252587, + "end_time": "2026-09-27T16:41:06.863340+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:05.610753+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "display_data", "data": { - "text/html": "
Installing Packages
  • IKVM
  • IKVM.Image
  • IKVM.Image.runtime.win-x64
" + "text/html": [ + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Installed Packages
  • IKVM, 8.14.0
  • IKVM.Image, 8.14.0
" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ "#r \"nuget: IKVM, 8.14.0\"\n", - "#r \"nuget: IKVM.Image, 8.14.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.14.0\"" + "#r \"nuget: IKVM.Image, 8.14.0\"" ] }, { @@ -99,24 +241,35 @@ "id": "c7dc34cc", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:27.775560Z", - "iopub.status.busy": "2026-07-03T14:19:27.775077Z", - "iopub.status.idle": "2026-07-03T14:19:29.427735Z", - "shell.execute_reply": "2026-07-03T14:19:29.427515Z" - } + "iopub.execute_input": "2026-09-27T16:41:06.873244Z", + "iopub.status.busy": "2026-09-27T16:41:06.872869Z", + "iopub.status.idle": "2026-09-27T16:41:07.760704Z", + "shell.execute_reply": "2026-09-27T16:41:07.760484Z" + }, + "papermill": { + "duration": 0.893893, + "end_time": "2026-09-27T16:41:07.760807+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:06.866914+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "IKVM home=OK (basename=ikvm-home-8.14.0-win-x64)\r\n" + "output_type": "stream", + "text": [ + "IKVM home=OK (basename=ikvm-home-8.14.0-linux-x64)\n" + ] } ], "source": [ "// IKVM.Home DOIT etre connu du static initializer (JVM.Properties) AVANT tout appel Java.\n", "// On force la var d'env (prioritaire sur AppContext) pour eviter TypeInitializationException.\n", "using System.IO;\n", - "string ikvmVer = \"8.14.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.14.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -151,11 +304,19 @@ "id": "28c98b26", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.429356Z", - "iopub.status.busy": "2026-07-03T14:19:29.429145Z", - "iopub.status.idle": "2026-07-03T14:19:29.458240Z", - "shell.execute_reply": "2026-07-03T14:19:29.458025Z" - } + "iopub.execute_input": "2026-09-27T16:41:07.768048Z", + "iopub.status.busy": "2026-09-27T16:41:07.767774Z", + "iopub.status.idle": "2026-09-27T16:41:08.147306Z", + "shell.execute_reply": "2026-09-27T16:41:08.147119Z" + }, + "papermill": { + "duration": 0.383775, + "end_time": "2026-09-27T16:41:08.147418+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:07.763643+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -168,47 +329,69 @@ "id": "beb4a930", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.459784Z", - "iopub.status.busy": "2026-07-03T14:19:29.459523Z", - "iopub.status.idle": "2026-07-03T14:19:29.590428Z", - "shell.execute_reply": "2026-07-03T14:19:29.589932Z" - } + "iopub.execute_input": "2026-09-27T16:41:08.156567Z", + "iopub.status.busy": "2026-09-27T16:41:08.156284Z", + "iopub.status.idle": "2026-09-27T16:41:08.627247Z", + "shell.execute_reply": "2026-09-27T16:41:08.626994Z" + }, + "papermill": { + "duration": 0.476786, + "end_time": "2026-09-27T16:41:08.627366+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:08.150580+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Tweety ML (IKVM) reference chargee : org.tweetyproject.tweety-ml v1.30.0.0 (7,0 Mo).\r\n" + "output_type": "stream", + "text": [ + "Tweety ML (IKVM) reference chargee : org.tweetyproject.tweety-ml v1.30.0.0 (7.0 Mo).\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "Types ML exposes : 18 (AbstractMlReasoner, AccessibilityRelation, KripkeModel, MlBeliefSet, MleanCoPReasoner, MleanCoPWriter, MlExample, MlExample2...)\r\n" + "output_type": "stream", + "text": [ + "Types ML exposes : 18 (AbstractMlReasoner, AccessibilityRelation, KripkeModel, MlBeliefSet, MleanCoPReasoner, MleanCoPWriter, MlExample, MlExample2...)\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": " OK MlBeliefSet -> org.tweetyproject.logics.ml.syntax.MlBeliefSet\r\n" + "output_type": "stream", + "text": [ + " OK MlBeliefSet -> org.tweetyproject.logics.ml.syntax.MlBeliefSet\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": " OK Necessity -> org.tweetyproject.logics.ml.syntax.Necessity\r\n" + "output_type": "stream", + "text": [ + " OK Necessity -> org.tweetyproject.logics.ml.syntax.Necessity\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": " OK Possibility -> org.tweetyproject.logics.ml.syntax.Possibility\r\n" + "output_type": "stream", + "text": [ + " OK Possibility -> org.tweetyproject.logics.ml.syntax.Possibility\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": " OK SimpleMlReasoner -> org.tweetyproject.logics.ml.reasoner.SimpleMlReasoner\r\n" + "output_type": "stream", + "text": [ + " OK SimpleMlReasoner -> org.tweetyproject.logics.ml.reasoner.SimpleMlReasoner\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": " OK MlParser -> org.tweetyproject.logics.ml.parser.MlParser\r\n" + "output_type": "stream", + "text": [ + " OK MlParser -> org.tweetyproject.logics.ml.parser.MlParser\n" + ] } ], "source": [ @@ -241,7 +424,16 @@ { "cell_type": "markdown", "id": "ab2ae0ec", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.00395, + "end_time": "2026-09-27T16:41:08.635854+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:08.631904+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### 1.4 - Verdict SOTA (C190 IKVM 8.14 fix)\n", "\n", @@ -251,7 +443,16 @@ { "cell_type": "markdown", "id": "e70c6b66", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003782, + "end_time": "2026-09-27T16:41:08.643590+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:08.639808+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2 - Syntaxe ML : Necessite et Possibilite\n", "\n", @@ -281,22 +482,34 @@ "id": "c60be741", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.591990Z", - "iopub.status.busy": "2026-07-03T14:19:29.591770Z", - "iopub.status.idle": "2026-07-03T14:19:29.641306Z", - "shell.execute_reply": "2026-07-03T14:19:29.641124Z" - } + "iopub.execute_input": "2026-09-27T16:41:08.654195Z", + "iopub.status.busy": "2026-09-27T16:41:08.653847Z", + "iopub.status.idle": "2026-09-27T16:41:09.047237Z", + "shell.execute_reply": "2026-09-27T16:41:09.046923Z" + }, + "papermill": { + "duration": 0.399645, + "end_time": "2026-09-27T16:41:09.047397+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:08.647752+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Necessite : [](plante(X))\r\n" + "output_type": "stream", + "text": [ + "Necessite : [](plante(X))\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "Possibilite : <>(plante(X))\r\n" + "output_type": "stream", + "text": [ + "Possibilite : <>(plante(X))\n" + ] } ], "source": [ @@ -322,7 +535,16 @@ { "cell_type": "markdown", "id": "822da3a6", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002613, + "end_time": "2026-09-27T16:41:09.055114+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.052501+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3 - MlBeliefSet et raisonnement modal simple\n", "\n", @@ -348,22 +570,34 @@ "id": "e975aa75", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.642550Z", - "iopub.status.busy": "2026-07-03T14:19:29.642357Z", - "iopub.status.idle": "2026-07-03T14:19:29.680980Z", - "shell.execute_reply": "2026-07-03T14:19:29.680793Z" - } + "iopub.execute_input": "2026-09-27T16:41:09.062732Z", + "iopub.status.busy": "2026-09-27T16:41:09.062497Z", + "iopub.status.idle": "2026-09-27T16:41:09.128148Z", + "shell.execute_reply": "2026-09-27T16:41:09.127887Z" + }, + "papermill": { + "duration": 0.069767, + "end_time": "2026-09-27T16:41:09.128235+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.058468+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Base ML : 1 formule(s) modale(s).\r\n" + "output_type": "stream", + "text": [ + "Base ML : 1 formule(s) modale(s).\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "Query : [](plante(X))\r\n" + "output_type": "stream", + "text": [ + "Query : [](plante(X))\n" + ] } ], "source": [ @@ -394,7 +628,16 @@ { "cell_type": "markdown", "id": "baeb78e8", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002631, + "end_time": "2026-09-27T16:41:09.133829+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.131198+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 4 - MlParser : parser des formules modales complexes\n", "\n", @@ -417,42 +660,62 @@ "id": "d5a94086", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.682712Z", - "iopub.status.busy": "2026-07-03T14:19:29.682348Z", - "iopub.status.idle": "2026-07-03T14:19:29.727530Z", - "shell.execute_reply": "2026-07-03T14:19:29.727286Z" - } + "iopub.execute_input": "2026-09-27T16:41:09.140769Z", + "iopub.status.busy": "2026-09-27T16:41:09.140430Z", + "iopub.status.idle": "2026-09-27T16:41:09.246251Z", + "shell.execute_reply": "2026-09-27T16:41:09.246020Z" + }, + "papermill": { + "duration": 0.109943, + "end_time": "2026-09-27T16:41:09.246354+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.136411+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "f1 = [](plante(X)) -> [](plante(X))\r\n" + "output_type": "stream", + "text": [ + "f1 = [](plante(X)) -> [](plante(X))\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "f2 = <>(plante(X)) -> <>(plante(X))\r\n" + "output_type": "stream", + "text": [ + "f2 = <>(plante(X)) -> <>(plante(X))\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "f3 = ([](plante(X)) => plante(X)) -> ([](plante(X))=>plante(X))\r\n" + "output_type": "stream", + "text": [ + "f3 = ([](plante(X)) => plante(X)) -> ([](plante(X))=>plante(X))\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "f4 = (<>(plante(X)) || [](plante(X))) -> <>(plante(X))||[](plante(X))\r\n" + "output_type": "stream", + "text": [ + "f4 = (<>(plante(X)) || [](plante(X))) -> <>(plante(X))||[](plante(X))\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "f5 = <>([](plante(X))) -> <>([](plante(X)))\r\n" + "output_type": "stream", + "text": [ + "f5 = <>([](plante(X))) -> <>([](plante(X)))\n" + ] }, { - "output_type": "stream", "name": "stdout", - "text": "f6 = [](<>(plante(X))) -> [](<>(plante(X)))\r\n" + "output_type": "stream", + "text": [ + "f6 = [](<>(plante(X))) -> [](<>(plante(X)))\n" + ] } ], "source": [ @@ -491,7 +754,16 @@ { "cell_type": "markdown", "id": "f916c5f7", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004103, + "end_time": "2026-09-27T16:41:09.255182+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.251079+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "---\n", "\n", @@ -503,7 +775,16 @@ { "cell_type": "markdown", "id": "ed8127ce", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003951, + "end_time": "2026-09-27T16:41:09.263196+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.259245+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 1 - Système T et axiome de reflexivite\n", "\n", @@ -525,17 +806,27 @@ "id": "fc4205fb", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.729350Z", - "iopub.status.busy": "2026-07-03T14:19:29.729084Z", - "iopub.status.idle": "2026-07-03T14:19:29.781041Z", - "shell.execute_reply": "2026-07-03T14:19:29.780814Z" - } + "iopub.execute_input": "2026-09-27T16:41:09.273705Z", + "iopub.status.busy": "2026-09-27T16:41:09.273423Z", + "iopub.status.idle": "2026-09-27T16:41:09.316030Z", + "shell.execute_reply": "2026-09-27T16:41:09.315790Z" + }, + "papermill": { + "duration": 0.048744, + "end_time": "2026-09-27T16:41:09.316136+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.267392+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Axiome T valide dans systeme T = Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "Axiome T valide dans systeme T = Exercice a completer\n" + ] } ], "source": [ @@ -547,7 +838,16 @@ { "cell_type": "markdown", "id": "f57e389c", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004245, + "end_time": "2026-09-27T16:41:09.326386+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.322141+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 2 - Opérateurs modaux imbriques `<>[]P`\n", "\n", @@ -566,17 +866,27 @@ "id": "3cbfc370", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.782282Z", - "iopub.status.busy": "2026-07-03T14:19:29.782091Z", - "iopub.status.idle": "2026-07-03T14:19:29.863957Z", - "shell.execute_reply": "2026-07-03T14:19:29.863696Z" - } + "iopub.execute_input": "2026-09-27T16:41:09.343718Z", + "iopub.status.busy": "2026-09-27T16:41:09.336255Z", + "iopub.status.idle": "2026-09-27T16:41:09.396127Z", + "shell.execute_reply": "2026-09-27T16:41:09.395919Z" + }, + "papermill": { + "duration": 0.065829, + "end_time": "2026-09-27T16:41:09.396237+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.330408+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "<>[]plante(x) construit = Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "<>[]plante(x) construit = Exercice a completer\n" + ] } ], "source": [ @@ -588,7 +898,16 @@ { "cell_type": "markdown", "id": "f9a189af", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003247, + "end_time": "2026-09-27T16:41:09.405422+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.402175+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 - Raisonnement multi-agents : K(i, P)\n", "\n", @@ -607,17 +926,27 @@ "id": "6ef3c365", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:19:29.865407Z", - "iopub.status.busy": "2026-07-03T14:19:29.865220Z", - "iopub.status.idle": "2026-07-03T14:19:29.911558Z", - "shell.execute_reply": "2026-07-03T14:19:29.911365Z" - } + "iopub.execute_input": "2026-09-27T16:41:09.413073Z", + "iopub.status.busy": "2026-09-27T16:41:09.412881Z", + "iopub.status.idle": "2026-09-27T16:41:09.441037Z", + "shell.execute_reply": "2026-09-27T16:41:09.440882Z" + }, + "papermill": { + "duration": 0.032552, + "end_time": "2026-09-27T16:41:09.441119+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.408567+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "K(agent1) and K(agent2) construits = Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "K(agent1) and K(agent2) construits = Exercice a completer\n" + ] } ], "source": [ @@ -629,7 +958,16 @@ { "cell_type": "markdown", "id": "8be114aa", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002929, + "end_time": "2026-09-27T16:41:09.447292+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:09.444363+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "---\n", "\n", @@ -682,6 +1020,23 @@ } ], "metadata": { + "cost": { + "api_provider": "none", + "api_usd_est": 0.0, + "cpu_min": 6, + "external_account": null, + "free_alternative": null, + "gpu_min": 0, + "gpu_required": false, + "metadata_written": "2026-08-02", + "network": false, + "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account).", + "reduced_pedagogical": null, + "reproducibility": "HIGH", + "validator": "manual", + "vram_gb": 0, + "vram_tier": "NONE" + }, "kernelspec": { "display_name": ".NET (C#)", "language": "C#", @@ -694,24 +1049,19 @@ "pygments_lexer": "csharp", "version": "13.0" }, - "cost": { - "api_usd_est": 0.0, - "api_provider": "none", - "cpu_min": 6, - "gpu_min": 0, - "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", - "network": false, - "external_account": null, - "free_alternative": null, - "reduced_pedagogical": null, - "reproducibility": "HIGH", - "metadata_written": "2026-08-02", - "validator": "manual", - "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account)." + "papermill": { + "default_parameters": {}, + "duration": 6.071684, + "end_time": "2026-09-27T16:41:09.566502+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-3-ModalLogic-Csharp.ipynb", + "output_path": "Tweety-3-ModalLogic-Csharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:41:03.494818+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-QBF-Csharp.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-QBF-Csharp.ipynb index 8882562dcd..2880779e87 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-QBF-Csharp.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Tweety/Tweety-3-QBF-Csharp.ipynb @@ -3,7 +3,16 @@ { "cell_type": "markdown", "id": "2bdcd76a", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002473, + "end_time": "2026-09-27T16:41:15.461703+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:15.459230+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "# Tweety-3 - Quantified Boolean Formulas en C#/.NET (port natif IKVM)\n", "\n", @@ -48,7 +57,16 @@ { "cell_type": "markdown", "id": "6104ea3f", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.001813, + "end_time": "2026-09-27T16:41:15.465751+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:15.463938+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 1 - Runtime IKVM : charger le module `logics-qbf`\n", "\n", @@ -63,25 +81,149 @@ "id": "12f1d923", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:47.320940Z", - "iopub.status.busy": "2026-07-03T14:31:47.313997Z", - "iopub.status.idle": "2026-07-03T14:31:48.659144Z", - "shell.execute_reply": "2026-07-03T14:31:48.653735Z" - } + "iopub.execute_input": "2026-09-27T16:41:15.482320Z", + "iopub.status.busy": "2026-09-27T16:41:15.475584Z", + "iopub.status.idle": "2026-09-27T16:41:16.688154Z", + "shell.execute_reply": "2026-09-27T16:41:16.685048Z" + }, + "papermill": { + "duration": 1.220654, + "end_time": "2026-09-27T16:41:16.688342+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:15.467688+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "display_data", "data": { - "text/html": "
Installing Packages
  • IKVM
  • IKVM.Image
  • IKVM.Image.runtime.win-x64
" + "text/html": [ + "\r\n", + "
\r\n", + " \r\n", + " \r\n", + "
" + ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Installed Packages
  • IKVM, 8.14.0
  • IKVM.Image, 8.14.0
" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ "#r \"nuget: IKVM, 8.14.0\"\n", "#r \"nuget: IKVM.Image, 8.14.0\"\n", - "#r \"nuget: IKVM.Image.runtime.win-x64, 8.14.0\"\n", "\n" ] }, @@ -91,22 +233,33 @@ "id": "1c0aad96", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:48.661175Z", - "iopub.status.busy": "2026-07-03T14:31:48.660973Z", - "iopub.status.idle": "2026-07-03T14:31:49.802591Z", - "shell.execute_reply": "2026-07-03T14:31:49.802120Z" - } + "iopub.execute_input": "2026-09-27T16:41:16.696064Z", + "iopub.status.busy": "2026-09-27T16:41:16.695802Z", + "iopub.status.idle": "2026-09-27T16:41:17.661776Z", + "shell.execute_reply": "2026-09-27T16:41:17.661531Z" + }, + "papermill": { + "duration": 0.970747, + "end_time": "2026-09-27T16:41:17.661873+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:16.691126+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "IKVM home=OK\r\n" + "output_type": "stream", + "text": [ + "IKVM home=OK\n" + ] } ], "source": [ "using System.IO;\n", - "string ikvmVer = \"8.14.0\", ikvmRid = \"win-x64\";\n", + "// RID de la machine courante (win-x64, linux-x64, osx-arm64...) : IKVM.Image tire l'image native de chaque plateforme.\n", + "string ikvmVer = \"8.14.0\", ikvmRid = (OperatingSystem.IsWindows() ? \"win\" : OperatingSystem.IsMacOS() ? \"osx\" : \"linux\") + \"-\" + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();\n", "string nugetRoot = Environment.GetEnvironmentVariable(\"NUGET_PACKAGES\")\n", " ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), \".nuget\", \"packages\");\n", "string ikvmBaseAny = Path.Combine(nugetRoot, \"ikvm.image\", ikvmVer, \"ikvm\", \"any\", \"any\");\n", @@ -140,11 +293,19 @@ "id": "e5fb90c2", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:49.804139Z", - "iopub.status.busy": "2026-07-03T14:31:49.803914Z", - "iopub.status.idle": "2026-07-03T14:31:50.023550Z", - "shell.execute_reply": "2026-07-03T14:31:50.023226Z" - } + "iopub.execute_input": "2026-09-27T16:41:17.668400Z", + "iopub.status.busy": "2026-09-27T16:41:17.668135Z", + "iopub.status.idle": "2026-09-27T16:41:18.427862Z", + "shell.execute_reply": "2026-09-27T16:41:18.427662Z" + }, + "papermill": { + "duration": 0.763473, + "end_time": "2026-09-27T16:41:18.427968+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:17.664495+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [], "source": [ @@ -158,17 +319,27 @@ "id": "3a8799b1", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:50.025439Z", - "iopub.status.busy": "2026-07-03T14:31:50.025049Z", - "iopub.status.idle": "2026-07-03T14:31:50.215853Z", - "shell.execute_reply": "2026-07-03T14:31:50.215464Z" - } + "iopub.execute_input": "2026-09-27T16:41:18.434796Z", + "iopub.status.busy": "2026-09-27T16:41:18.434578Z", + "iopub.status.idle": "2026-09-27T16:41:18.571272Z", + "shell.execute_reply": "2026-09-27T16:41:18.571045Z" + }, + "papermill": { + "duration": 0.14076, + "end_time": "2026-09-27T16:41:18.571394+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.430634+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "Tweety QBF (IKVM) reference chargee : org.tweetyproject.tweety-qbf v1.30.0.0 (8,0 Mo).\r\n" + "output_type": "stream", + "text": [ + "Tweety QBF (IKVM) reference chargee : org.tweetyproject.tweety-qbf v1.30.0.0 (8.0 Mo).\n" + ] } ], "source": [ @@ -182,7 +353,16 @@ { "cell_type": "markdown", "id": "434c1161", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002696, + "end_time": "2026-09-27T16:41:18.577398+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.574702+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## Diagnostic IKVM - Verdict exact\n", "\n", @@ -196,7 +376,16 @@ { "cell_type": "markdown", "id": "85a88ba5", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002551, + "end_time": "2026-09-27T16:41:18.582491+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.579940+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 2 - Syntaxe QBF : parser prefixe et format QDIMACS\n", "\n", @@ -229,17 +418,27 @@ "id": "dafabebf", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:50.218013Z", - "iopub.status.busy": "2026-07-03T14:31:50.217590Z", - "iopub.status.idle": "2026-07-03T14:31:50.302946Z", - "shell.execute_reply": "2026-07-03T14:31:50.302547Z" - } + "iopub.execute_input": "2026-09-27T16:41:18.589835Z", + "iopub.status.busy": "2026-09-27T16:41:18.589489Z", + "iopub.status.idle": "2026-09-27T16:41:18.651306Z", + "shell.execute_reply": "2026-09-27T16:41:18.651134Z" + }, + "papermill": { + "duration": 0.066366, + "end_time": "2026-09-27T16:41:18.651396+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.585030+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "[DIAGNOSTIC IKVM] Cell[8] : types non exposes, code preserve en commentaire.\r\n" + "output_type": "stream", + "text": [ + "[DIAGNOSTIC IKVM] Cell[8] : types non exposes, code preserve en commentaire.\n" + ] } ], "source": [ @@ -257,7 +456,16 @@ { "cell_type": "markdown", "id": "11c80c3d", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002177, + "end_time": "2026-09-27T16:41:18.656179+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.654002+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "## 3 - Comparaison des solveurs QBF\n", "\n", @@ -284,17 +492,27 @@ "id": "8a857935", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:50.305191Z", - "iopub.status.busy": "2026-07-03T14:31:50.304834Z", - "iopub.status.idle": "2026-07-03T14:31:50.361598Z", - "shell.execute_reply": "2026-07-03T14:31:50.361245Z" - } + "iopub.execute_input": "2026-09-27T16:41:18.662022Z", + "iopub.status.busy": "2026-09-27T16:41:18.661819Z", + "iopub.status.idle": "2026-09-27T16:41:18.706185Z", + "shell.execute_reply": "2026-09-27T16:41:18.705724Z" + }, + "papermill": { + "duration": 0.047981, + "end_time": "2026-09-27T16:41:18.706280+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.658299+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "[DIAGNOSTIC IKVM] Cell[10] : types non exposes, code preserve en commentaire.\r\n" + "output_type": "stream", + "text": [ + "[DIAGNOSTIC IKVM] Cell[10] : types non exposes, code preserve en commentaire.\n" + ] } ], "source": [ @@ -312,7 +530,16 @@ { "cell_type": "markdown", "id": "f45a5ebd", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.0026, + "end_time": "2026-09-27T16:41:18.711792+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.709192+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -324,7 +551,16 @@ { "cell_type": "markdown", "id": "fce930ca", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.0022, + "end_time": "2026-09-27T16:41:18.716431+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.714231+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 1 - Verifier une formule QBF a 3 variables\n", "\n", @@ -341,17 +577,27 @@ "id": "1a2ea1ac", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:50.363688Z", - "iopub.status.busy": "2026-07-03T14:31:50.363320Z", - "iopub.status.idle": "2026-07-03T14:31:50.428422Z", - "shell.execute_reply": "2026-07-03T14:31:50.427706Z" - } + "iopub.execute_input": "2026-09-27T16:41:18.722922Z", + "iopub.status.busy": "2026-09-27T16:41:18.722699Z", + "iopub.status.idle": "2026-09-27T16:41:18.753022Z", + "shell.execute_reply": "2026-09-27T16:41:18.752843Z" + }, + "papermill": { + "duration": 0.034355, + "end_time": "2026-09-27T16:41:18.753112+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.718757+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "phi_xyz = forall x. exists y. exists z. ... est satisfiable : Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "phi_xyz = forall x. exists y. exists z. ... est satisfiable : Exercice a completer\n" + ] } ], "source": [ @@ -363,7 +609,16 @@ { "cell_type": "markdown", "id": "5188125b", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.002837, + "end_time": "2026-09-27T16:41:18.758591+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.755754+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 2 - Comparer les solveurs sur une formule problematique\n", "\n", @@ -383,17 +638,27 @@ "id": "816cd121", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:50.430632Z", - "iopub.status.busy": "2026-07-03T14:31:50.430263Z", - "iopub.status.idle": "2026-07-03T14:31:50.489822Z", - "shell.execute_reply": "2026-07-03T14:31:50.489066Z" - } + "iopub.execute_input": "2026-09-27T16:41:18.765374Z", + "iopub.status.busy": "2026-09-27T16:41:18.765130Z", + "iopub.status.idle": "2026-09-27T16:41:18.797167Z", + "shell.execute_reply": "2026-09-27T16:41:18.796939Z" + }, + "papermill": { + "duration": 0.036179, + "end_time": "2026-09-27T16:41:18.797341+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.761162+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "phi_xx_yy compare sur 4 solveurs : Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "phi_xx_yy compare sur 4 solveurs : Exercice a completer\n" + ] } ], "source": [ @@ -405,7 +670,16 @@ { "cell_type": "markdown", "id": "12dc2f8a", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003409, + "end_time": "2026-09-27T16:41:18.804513+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.801104+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "### Exercice 3 - Model checking simplifie : la propriete AG(p -> EF q)\n", "\n", @@ -425,17 +699,27 @@ "id": "394f576a", "metadata": { "execution": { - "iopub.execute_input": "2026-07-03T14:31:50.491754Z", - "iopub.status.busy": "2026-07-03T14:31:50.491421Z", - "iopub.status.idle": "2026-07-03T14:31:50.578869Z", - "shell.execute_reply": "2026-07-03T14:31:50.578570Z" - } + "iopub.execute_input": "2026-09-27T16:41:18.813432Z", + "iopub.status.busy": "2026-09-27T16:41:18.813165Z", + "iopub.status.idle": "2026-09-27T16:41:18.859497Z", + "shell.execute_reply": "2026-09-27T16:41:18.858924Z" + }, + "papermill": { + "duration": 0.051644, + "end_time": "2026-09-27T16:41:18.859661+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.808017+00:00", + "status": "completed" + }, + "tags": [] }, "outputs": [ { - "output_type": "stream", "name": "stdout", - "text": "AG(p -> EF q) sur modele 2 etats : Exercice a completer\r\n" + "output_type": "stream", + "text": [ + "AG(p -> EF q) sur modele 2 etats : Exercice a completer\n" + ] } ], "source": [ @@ -447,7 +731,16 @@ { "cell_type": "markdown", "id": "24f9e6dc", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003738, + "end_time": "2026-09-27T16:41:18.867500+00:00", + "exception": false, + "start_time": "2026-09-27T16:41:18.863762+00:00", + "status": "completed" + }, + "tags": [] + }, "source": [ "***\n", "\n", @@ -504,6 +797,23 @@ } ], "metadata": { + "cost": { + "api_provider": "none", + "api_usd_est": 0.0, + "cpu_min": 6, + "external_account": null, + "free_alternative": null, + "gpu_min": 0, + "gpu_required": false, + "metadata_written": "2026-08-02", + "network": false, + "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account).", + "reduced_pedagogical": null, + "reproducibility": "HIGH", + "validator": "manual", + "vram_gb": 0, + "vram_tier": "NONE" + }, "kernelspec": { "display_name": ".NET (C#)", "language": "C#", @@ -516,24 +826,19 @@ "pygments_lexer": "csharp", "version": "13.0" }, - "cost": { - "api_usd_est": 0.0, - "api_provider": "none", - "cpu_min": 6, - "gpu_min": 0, - "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", - "network": false, - "external_account": null, - "free_alternative": null, - "reduced_pedagogical": null, - "reproducibility": "HIGH", - "metadata_written": "2026-08-02", - "validator": "manual", - "notes": "Formal-logic solving via local Tweety (TweetyProject, Java via IKVM). No API, no GPU; deterministic logic reasoning. Requires a configured Java env (JAVA_HOME + Tweety jars) to execute, but the solving itself is deterministic -> reproducibility HIGH. Self-contained (no external account)." + "papermill": { + "default_parameters": {}, + "duration": 5.970485, + "end_time": "2026-09-27T16:41:18.986432+00:00", + "environment_variables": {}, + "exception": null, + "input_path": "Tweety-3-QBF-Csharp.ipynb", + "output_path": "Tweety-3-QBF-Csharp.ipynb", + "parameters": {}, + "start_time": "2026-09-27T16:41:13.015947+00:00", + "version": "2.7.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics.yaml b/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics.yaml index ac78888991..60f9211bd7 100644 --- a/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics.yaml +++ b/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics.yaml @@ -6,6 +6,7 @@ bridge_verdict: SOTA-OK bridge_verdict_reason: "Lib-vs-lib meme moteur Java TweetyProject (Thimm 2012) : C# branche IKVM 8.15.0 + tweety-pl.dll (tracked 0,55 Mo) + 7 refs `org.tweetyproject.*` actifs (using + classes instantiatees), bytecode Java traduit en .NET sans JVM au runtime. Python branche JPype + `from org.tweetyproject.logics.pl.* import` + `from org.tweetyproject.logics.fol.* import`. Verifie firsthand (c.227, 2026-08-12, po-2023:CoursIA-2) : les deux cotes invoquent la meme bibliotheque Java TweetyProject (sat solvers FOL, parser FOPL, raisonneur), seules les idioms de pont different (bytecode .NET vs JVM runtime). DLL source-recompilee (release 8) selon pattern c.220 IKVM causal causal rebuild — pas de maven-shade bytecode 59." known_differences: + - "2026-09-27 (drift unilateral, session cloud d'agnosticisme hors flotte) : cote C# seul. La cellule de configuration IKVM codait le RID win-x64 en dur (ikvmRid = win-x64, plus une reference NuGet IKVM.Image.runtime.win-x64) : sous Linux et macOS, l'init de la JVM IKVM echouait au premier appel Java (TypeInitializationException sur IKVM.Runtime.LibJava, mesure sur Tweety-3-Dung avant correctif). Le RID est desormais derive de OperatingSystem et RuntimeInformation.ProcessArchitecture ; IKVM.Image (8.14.0 comme 8.15.0) depend deja des onze paquets IKVM.Image.runtime., la reference explicite win-x64 est retiree. Re-execution complete sous Linux (dotnet-interactive 1.0.617701) : 0 erreur, sorties identiques a la base hors RID du home IKVM, culture (separateur decimal, langue des avertissements du compilateur). Jumeau Python inchange. Strips outilles appliques avant l'attestation (probe banner, papermill)." - "2026-08-20 : conversion markdown-only ASCII->Mermaid de la table de verite (cell 3 cote python, PR #12011 / #11962) - 0 cellule code touchee, parite intacte, rebaseline d'attestation." - "2026-08-17 : tranche densite #11224 markdown-only sur le cote C# (10 cellules code byte-identiques, +1 cellule markdown + squelettes enrichis, PR #11338) - parite de contenu intacte, rebaseline d'attestation." - "Socle commun : logiques classiques propositionnelles et du premier ordre (FOL) via la bibliotheque Java TweetyProject." diff --git a/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics/0011-2026-09-27-claude-cloud-hors-flotte.yaml b/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics/0011-2026-09-27-claude-cloud-hors-flotte.yaml new file mode 100644 index 0000000000..374c3cba4d --- /dev/null +++ b/scripts/notebook_tools/twin_pairs.d/tweety-2-basic-logics/0011-2026-09-27-claude-cloud-hors-flotte.yaml @@ -0,0 +1,6 @@ +date: '2026-09-27' +by: claude-cloud:hors-flotte +python_sha: 27cd06844e2f330f3071af340c4f9f62bee2f063 +csharp_sha: e1332af215227da778846ee7dfc469a96e2d259d +content_python_sha: 557ce7f528c16bf848cf6062f10a7f69941ccf8dfc3a990a67b093c759dcee1b +content_csharp_sha: 12218f8d6f15d5767b90b30c688814a003d855bb4018b179a5083cfd4c03bf02 diff --git a/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics.yaml b/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics.yaml index f8d32214cb..b161bfab28 100644 --- a/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics.yaml +++ b/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics.yaml @@ -6,5 +6,6 @@ bridge_verdict: SOTA-OK bridge_verdict_reason: "Lib-vs-lib meme moteur Java TweetyProject (logiques conditionnelle, modale, QBF) : C# branche IKVM 8.14.0 + tweety-advanced-logics.dll (tracked) + 8 refs `org.tweetyproject.logics.cl.reasoner` etc. actifs (3 cellules avec using explicite, classes instantiatees). Python branche JPype + `from org.tweetyproject.logics.cl.reasoner import SimpleCReasoner` + meme classe Java `SimpleCReasoner` invoquee. Verifie firsthand (c.227, 2026-08-12, po-2023:CoursIA-2) : les deux cotes appellent le meme solveur TweetyProject (Thimm 2012), pont IKVM-bytecode .NET vs JPype-JVM-runtime. Meme dynamique que tweety-2 et c.220 #10544 dialogues." known_differences: + - "2026-09-27 (drift unilateral, session cloud d'agnosticisme hors flotte) : cote C# seul. La cellule de configuration IKVM codait le RID win-x64 en dur (ikvmRid = win-x64, plus une reference NuGet IKVM.Image.runtime.win-x64) : sous Linux et macOS, l'init de la JVM IKVM echouait au premier appel Java (TypeInitializationException sur IKVM.Runtime.LibJava, mesure sur Tweety-3-Dung avant correctif). Le RID est desormais derive de OperatingSystem et RuntimeInformation.ProcessArchitecture ; IKVM.Image (8.14.0 comme 8.15.0) depend deja des onze paquets IKVM.Image.runtime., la reference explicite win-x64 est retiree. Re-execution complete sous Linux (dotnet-interactive 1.0.617701) : 0 erreur, sorties identiques a la base hors RID du home IKVM, culture (separateur decimal, langue des avertissements du compilateur) ; language_info.version 12.0 -> 13.0, version declaree par le pin dotnet-interactive 1.0.617701. Jumeau Python inchange. Strips outilles appliques avant l'attestation (probe banner, papermill)." - "Socle commun : logiques avancees (conditionnelle, modale, QBF) via TweetyProject." - "Lib-vs-lib : C# via IKVM (`#r \"org.tweetyproject.tweety-advanced-logics.dll\"` + `using org.tweetyproject.logics.cl.reasoner` etc.). Python via JPype (`from org.tweetyproject.logics.cl.reasoner import SimpleCReasoner`). Meme moteur Java TweetyProject, deux ponts (IKVM traduit vs JPype JVM)." diff --git a/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics/0008-2026-09-27-claude-cloud-hors-flotte.yaml b/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics/0008-2026-09-27-claude-cloud-hors-flotte.yaml new file mode 100644 index 0000000000..b3525e70b9 --- /dev/null +++ b/scripts/notebook_tools/twin_pairs.d/tweety-3-advanced-logics/0008-2026-09-27-claude-cloud-hors-flotte.yaml @@ -0,0 +1,6 @@ +date: '2026-09-27' +by: claude-cloud:hors-flotte +python_sha: aebffde4c2a7da67d2834d8072f2fe6d54287764 +csharp_sha: 84eabed0f272ad8aba73747b2ca78e55bc91cb98 +content_python_sha: 9eaf16b3f99c3b984d924fe6d58ff023c43793e57d3ccb6bd1eaf2bc56360a3b +content_csharp_sha: b82216ea37bdb919fa5c12b00e17463903960a7d91a0cf6f7b7c7ada3a27bd5c