2024-01-01ãã1å¹´éã®è¨äºä¸è¦§
ã¯ãã¼ã¸ã£ã¼ã®ä¸è¬çå®ç¾©ãç¥ãããã®ã§ãä»ã®ããã°ã©ãã³ã°è¨èªã«ã¤ãã¦ã ChatGPT ã§è³ªåãã¦ã¿ã¾ããã å ¥å 5: ãããã®ä¸é£ã®ä¸»å¼µã¯ããã°ã©ãã³ã°è¨èª Miranda ã¾ã㯠Gofer ã§ãæãç«ã¡ã¾ãã çµæ: ã¯ãããããã®ä¸»å¼µã¯ Miranda ã Gofer ã«ãé©â¦
ãã©ã ãè¨ç®ã¨ç¡éã©ã ãå¤é å¼(13) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãããé¢æ°ããã°ã©ãã³ã°ã®ã¯ãã¼ã¸ã£ã¼(1) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãã§ã調ã¹ã¦ãã¾ããããã¯ãã¼ã¸ã£ã¼ã®ä»£æ°çæ§é ãå®ç¾©ãã¦ãå¤æ°ãå¤æ´å¯è½ã®å ´åã¨â¦
ä»å¾ã®äºå® ååã®ãã¯ãã¼ã¸ã£ã¼ã®èª¿æ»ãã§ã¯ ãã¯ãã¼ã¸ã£ã¼ã®èª¿æ»(2) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãã§ã¯ (è¨èª1) ã¯ãã¼ã¸ã£ã¼ã使ããC#ã®ã³ã¼ãã§è¨è¿°ããè¨èª (è¨èª2) ã¯ãã¼ã¸ã£ã¼ã使ããé常ã®è¨èª (è¨èª3) ã¯ãã¼ã¸ã£ã¼èª¿æ»ç¨è¨èª â¦
ããã°ã©ãã³ã°è¨èªçä¸å®å ¨æ§å®ç(4) 以ä¸ã¯ãä¸å®å ¨æ§å®çã¨ã¯ãªã«ã å®å ¨ç ã²ã¼ãã«ã¨ãã¥ã¼ãªã³ã° 天æã¯ãªã«ã証æããã®ã (ãã«ã¼ããã¯ã¹ B 2277)ãã®190ãã¼ã¸(æ§ç¸è«ç)ã«ããããã¼ãã¹ã«ãã第2ä¸å®å ¨æ§å®çã®è¨¼æãLOGIC, LOGIC, AND, LOGICãâ¦
ããã°ã©ãã³ã°è¨èªçä¸å®å ¨æ§å®ç(3) ãä¸å®å ¨æ§å®çã¨ã¯ãªã«ã å®å ¨ç ã²ã¼ãã«ã¨ãã¥ã¼ãªã³ã° 天æã¯ãªã«ã証æããã®ã (ãã«ã¼ããã¯ã¹ B 2277)ãã®æ§ç¸è«çã®é ã®ç¬¬äºä¸å®å ¨æ§å®çã®è¨¼æã®è¨ç®ãã©ã ãè¨ç®ã®ããã«æ¸ãç´ããªããã¨ãããã¨ã§ ChatGPTâ¦
ç¹°ãè¿ãã«å¯¾å¿ãããããããã« ChatGPT ã§æ¸ãã¦ããããã¨ã«ãã¾ãã å ¥å1: é ã®ãªã¹ããªã©ã®å¦çã®ããã«ããæ¡å¼µ BNFãã®ããã«ãã¼ã¹é¢æ°ãç¹°ãè¿ãæ©è½ã追å ãããã®ã§ãããã©ã®ããã«ããã°è¯ãã§ãããã çµæ: ãæ¡å¼µ BNFãã®ããã«ãã¼ã¹é¢æ°â¦
ããå°ã BNF ã«å¯¾å¿ããã¦ã»ããã®ã§ãããã« ChatGPT ã§æ¸ãã¦ããããã¨ã«ãã¾ãã å ¥å1 以ä¸ã®ããã«å ¥åãã¾ããã 以ä¸ã®ããã«å¤æ´ãã¦ãã ãã: ãã¹ã¦ã®ä»£æ°çæ§é ã®ã¯ã©ã¹ã表ãã¤ã³ã¿ã¼ãã§ã¼ã¹ã追å ãã¦ãã ãã ãã¼ã¹æ å ±ã¯ã©ã¹ã®å 容ã¯å¤æ´â¦
ååã®çµæã¯ãBNF ã«æ§æ解æã®é¢æ°ã対å¿ãã¦ããã®ã§ãããããå°ãã¡ããã¨å¯¾å¿ããããã«ã§ããããªã®ã§ãããã« ChatGPT ã§èª¿ã¹ã¦ã¿ã¾ãã å ¥å1 以ä¸ã®ããã«å ¥åãã¾ããã 以ä¸ã®ããã«å¤æ´ãã¦ãã ãã: ãã¼ã¹ã®ã¨ãæååãç´æ¥æ¸¡ããããã«æ¬¡ã®â¦
Prolog ã®ããã°ã©ã ã C# å½¢å¼ã§æ¸ãããæ§æãæ§æ解æã㦠C# ã®ã¯ã©ã¹ã«å¤æãã ã¨ãããã¨ãããããã®ã§ãChatGPT ã§èª¿ã¹ã¾ãããååã®ä»£æ°çæ§é ã®å¾ãã¾ã以ä¸ã®ããã«å ¥åãã¾ããã ãã®ä»£æ°çæ§é ã«å¾ã£ã¦ Prolog ã®æ§æ解æãè¡ãããã°ã©ã ãâ¦
Prolog ã®ããã°ã©ã ã代æ°çã«è¡¨ãæ¹æ³ã ChatGPT ã§èª¿ã¹ã¾ããã å ¥å: Prolog ã®é ã代æ°çæ§é ã§è¡¨ãã¦ãã ãã çµæ: Prolog ã®é ã¯ã代æ°çæ§é ã¨ãã¦è¡¨ç¾ã§ãã¾ãããã®éã以ä¸ã®ãããªå½¢å¼çãªè¨è¿°ãé©ãã¦ãã¾ãã Prolog ã®é ã®ä»£æ°çè¡¨ç¾ Prologâ¦
ãã¢ãã¤ãçè«çããã°ã©ãã³ã°(1) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãã®ãæèèªç±ææ³ãã¨ã®æ¯è¼ã§ãå®è¡é åºã¨ããè¦ç¹ã§ãæ¯è¼ã§ããããªã®ã§ãChatGPT ã§èª¿ã¹ã¦ã¿ã¾ãã æ§æ解æã¨ã®æ¯è¼ å ¥å: æèèªç±ææ³ã®æ§æ解æã®å¦çã¨è«çããã°ã©â¦
ChatGPT ã§ã®èª¿æ»ã¯ã人工ç¥è½çè«çããã°ã©ãã³ã°(9) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãã¨åãããã«ãªã£ã¦ããã®ã§æ¹åãå¤ãã¾ãããã¢ãã¤ãçæ§æ解æãã§ã¯ C# å½¢å¼ã§è¨è¿°ãããã¼ã¸ã§ã³ãä½ãã¾ããããè«çããã°ã©ãã³ã°ã§ãã®ãããªãâ¦
ç®æ¨ ãã¢ãã¤ãçæ§æ解æãã§ã¯æ§æ解æãåªçåç°ã§è¡¨ããããã C# å½¢å¼ã§è¨è¿°ãã¾ãããããã§ã¯è«çããã°ã©ãã³ã°ã«ã¤ãã¦åæ§ã®ãã¨ã試ã¿ã¾ãããã®èå¯ãçºå±ããã¦è«çããã°ã©ãã³ã°ã¨ã¯ãã¼ã¸ã£ã¼ã®é¢é£ã«ã¤ãã¦ã調æ»ããäºå®ã§ãããããã©ã®â¦
ããã°ã©ãã³ã°è¨èªçä¸å®å ¨æ§å®ç(2) ãèªåèªèº«ã証æã§ããªããã¨ããè«çå¼ãå®ç¾©ãããã¨ãã§ããã°çã§ãã証æã§ããªãè«çå¼ã«ãªãã¨ãããã¨ã§ãä¸å®å ¨æ§å®çã¨ã¯ãªã«ã å®å ¨ç ã²ã¼ãã«ã¨ãã¥ã¼ãªã³ã° 天æã¯ãªã«ã証æããã®ã (ãã«ã¼ããã¯ã¹ Bâ¦
ååã®ãCÏãã«ä»¥ä¸ã®æ©è½ã追å ãããã¨ã«ãã¾ãã ãCÏãã§ã¯ä»»æã®é·ãã®èªç¶æ°ãæ±ããã¨ãã§ãã ããã°ã©ãã³ã°è¨èªCã§ãé åã使ããã¨ã§å®ç¾ã§ããã®ã§å¿ è¦ãªã(ã¡ã¢ãªã¼ä¸è¶³ã«ã¯ãªããªãã¨ãã¦ããã®ã§ä»»æã®é·ãã®é åã使ããã¨ãã§ãã)ã®ã§ããâ¦
ãä¸å®å ¨æ§å®çã¨ã¯ãªã«ããã®æ°ããç(ä¸å®å ¨æ§å®çã¨ã¯ãªã«ã å®å ¨ç ã²ã¼ãã«ã¨ãã¥ã¼ãªã³ã° 天æã¯ãªã«ã証æããã®ã (ãã«ã¼ããã¯ã¹ B 2277))ãåºã¦ããã®ã§ãæ§çã®ãããã«ããã£ãã¨ãããæ¸ãæãããã¦ããã®ãã©ããã調ã¹ããã¨æã£ãã®ã§ããâ¦
ãæ°å¦åºç¤è« å¢è£çãã«ãå群ã®èªã®åé¡ãã¨ããç¨èªãè¦ã¤ããã®ã§ ChatGPT ã§èª¿ã¹ã¦ã¿ã¾ããã ãå群ã®èªã®åé¡ãã¨ã¯ä½ã§ãã ãæèèªç±ææ³ãã¨ã¯ä½ã§ãã ãªã¼ãããã³ã¨ã¯ä½ã§ãã ãæèèªç±ææ³ããå群ã®èªã§èª¬æãã¦ãã ãã ãã決ã¾ã£ãæåâ¦
ç¾å¨ã®ç¶æ³ èªç±ã¢ãã¤ãã®ã¤ãã¬ã¼ã¿ã¼ ã人工ç¥è½ç代æ°å¦ãã§ã¯ãã¢ãã¤ãã®å·¦éå ã»å³éå ãã®åé¡ãã¢ãã¤ãã¾ãã¯åç°ã使ã£ã¦èª¬æãããã¨ãã¦ãã¾ããããã®åä½ã¯ Prolog ã®åä½ã¨åæ§ã®ãã®ã¨ãªã£ã¦ãã¾ãããã®ãããåä¸åã¢ã«ã´ãªãºã ãã§ã¯åâ¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser (C# å½¢å¼ ãã¼ã¸ã§ã³ 0.3) MonParser ãã¼ã¸ã§ã³ 0.3 BNF å½¢å¼ã®æ¼ç®åã C# å½¢å¼ã«åããã¦å¤æ´ãã¾ããã^ã㯠BNF å½¢å¼ã§ã¯ã->ãã¨ãã¾ããæ¼ç®åã®åªå é ä½ã¯ C# ã«åããã¾ãã ãstr(æåå)ãã¯æ§ææ¨ã§ä½¿ãããªãâ¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser (C# å½¢å¼ ãã¼ã¸ã§ã³ 0.2) MonParser (BNF å½¢å¼)ã®æ§æ解æ ãparãã¯ãã¼ãµã¼ã表ãã¯ã©ã¹ããsynãã¯æ§ææ¨ã表ãã¯ã©ã¹ã§ãã par str(string s) => par.StringRegExp(s); par st(string s) => par.String(s); par opr(â¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser - MonParser ã®æ§æ解æ(C# å½¢å¼) MonParser (C# å½¢å¼) ãã¼ã¸ã§ã³ 0.2 æ¼ç®åã使ãããã«ä»æ§ãå¤æ´ãã¾ããæ¼ç®åãå¤ç¨ããã¨ä½ãæ¸ãã¦ããããããã«ãããªãã¾ãããç°¡æ½ã«æ¸ããã¨ãã§ããã®ã§å ¨ä½ã®æ§æãææ¡ãâ¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser - MonParser ã®æ§æ解æ(C# å½¢å¼) MonParser (C# å½¢å¼) ãã¼ã¸ã§ã³ 0.1 æåã«å®ç¾©ãã MonParser 㯠BNF ã Python ç MonIter ã®å½¢å¼ã§æ¸ããã®ã§ãããã㯠BNF å½¢å¼ã¨ãããã¨ã«ãã¾ããMonParser (C# å½¢å¼)ã MonParsâ¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser - MonParser ã®æ§æ解æ(C# å½¢å¼) MonParser ã®æ§æã MonParser (C# å½¢å¼)ã§æ¸ãã¾ãã ãstr(æåå)ãã¯æ§ææ¨ã§ä½¿ãããªãæååã表ãã¾ããæ£è¦è¡¨ç¾ã使ããã¨ãã§ãã¾ãã ãop(æåå)ãã¯æ§ææ¨ã§ä½¿ãæååã表â¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser - MonParser ã®æ§æ解æ MonParser ã®æ§æã MonParser ã§æ¸ãã¾ãã def string = /".*"/; def operator = /'.*'/; def identifier = /[A-Za-z_][A-Za-z0-9_]*/; def constructor = /[A-Za-z_][A-Za-z0-9_]*/; def term =â¦
ã¢ãã¤ãçæ§æ解æè¨èª MonParser - æ§ææ¨ã®æ§æ æååããæ§ææ¨ãä½ããã¨ãã§ããããã«ãã¾ãããã®è¨èªã MonParser ã¨å¼ã¶ãã¨ã«ãã¾ããæåã®éå ã§çæãããèªç±ã¢ãã¤ã ã®åªéå (ããã表ãä¸è¬çãªè¨æ³ã¯ç¥ããªãã®ã§ããã§ã¯ããæ¸ãã¾ãâ¦
ç¹°ãè¿ãã®è¨æ³ã追å ãã¾ããã¾ããC# çã§ã¯æ°å¤ã®æ¼ç®ã追å ããã¦ããã®ã§ããã追å ãã¾ãã ãã£ãã使ããã¨ãã§ããã¨ãã¾ãã ãå¼ *ãã¯å¼ã®ç¹°ãè¿ã(ä¸åããªãå ´åãå«ã)ã表ãã¾ãã ãå¼ +ãã¯å¼ã®ç¹°ãè¿ã(ä¸åã¯å¿ è¦)ã表ãã¾ãã ãå¼1 &*â¦
æ§æ解æãã¢ãã¤ãã§è¡¨ãæ¹æ³ã«ã¤ãã¦èª¿ã¹ã¾ããããã«åéåãåã¨ããã¨åªçåç°(dioid)ã¨ãªãã®ã§åªçåç°ã§è¡¨ãæ¹æ³ã«ã¤ãã¦èª¿ã¹ã¾ããèªç±ã¢ãã¤ãã®ã¤ãã¬ã¼ã¿ã¼(6) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ã® Python ã® lark ã¢ã¸ã¥ã¼ã«ã®ä¾ã¯èªç±â¦
èªç±ã¢ãã¤ãããã°ã©ãã³ã°è¨èªã®ä½æ(MonIter ãã¼ã¸ã§ã³1.2 ä»æ§(23)) C# æ§ææ¨ã®èª¿æ» ãèªç±ã¢ãã¤ãã®ã¤ãã¬ã¼ã¿ã¼(16) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãã«æ¸ããæ§ææ¨ã調ã¹ãæ¹æ³ã«ã¤ãã¦ã¾ã¨ãã¾ãã C# æ§ææ¨ã®èª¿æ»ç¨ã®ã¯ã©ã¹ /// <summary> /</summary>â¦
èªç±ã¢ãã¤ãããã°ã©ãã³ã°è¨èªã®ä½æ(MonIter ãã¼ã¸ã§ã³1.2 ä»æ§(22)) C# å½¢å¼ã®ã³ã¼ãããæ§æãªãã¸ã§ã¯ãã«å¤æãã¦å®è¡ ãRoslynãã®ãSyntax APIã㧠C# ã®æ§æ解æãè¡ãã¾ããã èªç±ã¢ãã¤ãã®ã¤ãã¬ã¼ã¿ã¼(14) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼â¦
èªç±ã¢ãã¤ãããã°ã©ãã³ã°è¨èªã®ä½æ(MonIter ãã¼ã¸ã§ã³1.2 ä»æ§(21)) MonIter ã³ã¼ããã C# ã³ã¼ãã«å¤æãã¦å®è¡ ãRoslyn for Scriptingã㧠C# ã®ã³ã¼ããå®è¡ãã¾ãããèªç±ã¢ãã¤ãã®ã¤ãã¬ã¼ã¿ã¼(13) - ã¨ã¬ãã¡ã³ãã»ãã¸ã¥ã¢ã©ã¤ã¶ã¼èª¿æ»è¨é²ãâ¦