From 1c63b2a7887995a6e04bcb42d9b6e29382456fba Mon Sep 17 00:00:00 2001 From: Ryan Johnston Date: Mon, 29 Jul 2024 22:56:52 -0400 Subject: [PATCH 1/4] Add language CLIPS, add structures Facts and Rules to CLIPS 6.4.1 --- web/thesauruses/clips/641/facts.json | 18 ++++++++++++++++++ web/thesauruses/clips/641/rules.json | 24 ++++++++++++++++++++++++ web/thesauruses/meta_info.json | 3 +++ 3 files changed, 45 insertions(+) create mode 100644 web/thesauruses/clips/641/facts.json create mode 100644 web/thesauruses/clips/641/rules.json diff --git a/web/thesauruses/clips/641/facts.json b/web/thesauruses/clips/641/facts.json new file mode 100644 index 000000000..66ff49bdd --- /dev/null +++ b/web/thesauruses/clips/641/facts.json @@ -0,0 +1,18 @@ +{ + "meta": { + "language": "clips", + "language_version": "6.4.1", + "language_name": "CLIPS", + "structure": "facts" + }, + "concepts": { + "assert": { + "code": "(assert (my-fact foo))", + "name": "Assert Fact(s) into working memory" + }, + "retract": { + "code": "(retract 1)", + "name": "Retract existing Fact in working memory" + } + } +} diff --git a/web/thesauruses/clips/641/rules.json b/web/thesauruses/clips/641/rules.json new file mode 100644 index 000000000..db285fa59 --- /dev/null +++ b/web/thesauruses/clips/641/rules.json @@ -0,0 +1,24 @@ +{ + "meta": { + "language": "clips", + "language_version": "6.4.1", + "language_name": "CLIPS", + "structure": "rules" + }, + "concepts": { + "assert": { + "code": [ + "(defrule my-rule", + " (my-fact ?value)", + "=>", + "(println \"My value: \" ?value))" + ], + "name": "Defining a Rule in the CLIPS environment" + }, + "undefrule": { + "code": "(undefrule my-rule)", + "name": "Deleting a Rule from the CLIPS environment" + } + } +} + diff --git a/web/thesauruses/meta_info.json b/web/thesauruses/meta_info.json index 787c1409f..a25186bcc 100644 --- a/web/thesauruses/meta_info.json +++ b/web/thesauruses/meta_info.json @@ -5,6 +5,7 @@ "c": "C", "cpp": "C++", "csharp": "C#", + "clips": "CLIPS", "clojure": "Clojure", "go": "Go", "haskell": "Haskell", @@ -31,12 +32,14 @@ "control_structures": "Control Structures", "data_types": "Data Types", "exception_handling": "Exception Handling", + "facts": "Facts", "functions": "Functions, Methods, and Subroutines", "io": "Input and Output", "language_basics": "Basics of A Programming Language", "lists": "Lists, Arrays, and Hashed Lists", "operators": "Logical and Mathematical/Arithmetic Operators", "queues_stacks": "Queues and Stacks", + "rules": "Rules", "strings": "Strings" } } From 0d6f57405916396bc06b3cda0aa7b38c853fe331 Mon Sep 17 00:00:00 2001 From: Ryan Johnston Date: Tue, 30 Jul 2024 20:58:00 -0400 Subject: [PATCH 2/4] Adding _meta/facts and _meta/rules files. Also changing wording slightly in clips/641/rules.json --- web/thesauruses/_meta/facts.json | 13 +++++++++++++ web/thesauruses/_meta/rules.json | 13 +++++++++++++ web/thesauruses/clips/641/rules.json | 6 +++--- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 web/thesauruses/_meta/facts.json create mode 100644 web/thesauruses/_meta/rules.json diff --git a/web/thesauruses/_meta/facts.json b/web/thesauruses/_meta/facts.json new file mode 100644 index 000000000..a07f36e65 --- /dev/null +++ b/web/thesauruses/_meta/facts.json @@ -0,0 +1,13 @@ +{ + "meta": { + "structure": "facts", + "structure_name": "Facts" + }, + "categories": { + "Asserting Facts": { + "assert": "Asserting Facts" + }, + "Retracting Facts": { + "retract": "Retracting Facts" + } +} diff --git a/web/thesauruses/_meta/rules.json b/web/thesauruses/_meta/rules.json new file mode 100644 index 000000000..a56c9570b --- /dev/null +++ b/web/thesauruses/_meta/rules.json @@ -0,0 +1,13 @@ +{ + "meta": { + "structure": "rules", + "structure_name": "Rules" + }, + "categories": { + "Defining Rules": { + "defrule": "Defining Rules" + }, + "Undefining Rules": { + "undefrule": "Undefining Rules" + } +} diff --git a/web/thesauruses/clips/641/rules.json b/web/thesauruses/clips/641/rules.json index db285fa59..31f2b1a43 100644 --- a/web/thesauruses/clips/641/rules.json +++ b/web/thesauruses/clips/641/rules.json @@ -6,18 +6,18 @@ "structure": "rules" }, "concepts": { - "assert": { + "defrule": { "code": [ "(defrule my-rule", " (my-fact ?value)", "=>", "(println \"My value: \" ?value))" ], - "name": "Defining a Rule in the CLIPS environment" + "name": "Creating a Defrule in the CLIPS environment" }, "undefrule": { "code": "(undefrule my-rule)", - "name": "Deleting a Rule from the CLIPS environment" + "name": "Deleting a Defrule from the CLIPS environment" } } } From f5e9ee1770cbb76159d1be40547db3ab63d0882c Mon Sep 17 00:00:00 2001 From: Ryan Johnston Date: Wed, 31 Jul 2024 14:16:41 -0400 Subject: [PATCH 3/4] rules and facts combined into rules_facts --- web/thesauruses/_meta/facts.json | 13 ------------ web/thesauruses/_meta/rules.json | 13 ------------ web/thesauruses/_meta/rules_facts.json | 20 +++++++++++++++++++ web/thesauruses/clips/641/facts.json | 18 ----------------- .../641/{rules.json => rules_facts.json} | 10 +++++++++- 5 files changed, 29 insertions(+), 45 deletions(-) delete mode 100644 web/thesauruses/_meta/facts.json delete mode 100644 web/thesauruses/_meta/rules.json create mode 100644 web/thesauruses/_meta/rules_facts.json delete mode 100644 web/thesauruses/clips/641/facts.json rename web/thesauruses/clips/641/{rules.json => rules_facts.json} (64%) diff --git a/web/thesauruses/_meta/facts.json b/web/thesauruses/_meta/facts.json deleted file mode 100644 index a07f36e65..000000000 --- a/web/thesauruses/_meta/facts.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "meta": { - "structure": "facts", - "structure_name": "Facts" - }, - "categories": { - "Asserting Facts": { - "assert": "Asserting Facts" - }, - "Retracting Facts": { - "retract": "Retracting Facts" - } -} diff --git a/web/thesauruses/_meta/rules.json b/web/thesauruses/_meta/rules.json deleted file mode 100644 index a56c9570b..000000000 --- a/web/thesauruses/_meta/rules.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "meta": { - "structure": "rules", - "structure_name": "Rules" - }, - "categories": { - "Defining Rules": { - "defrule": "Defining Rules" - }, - "Undefining Rules": { - "undefrule": "Undefining Rules" - } -} diff --git a/web/thesauruses/_meta/rules_facts.json b/web/thesauruses/_meta/rules_facts.json new file mode 100644 index 000000000..8ce8e970e --- /dev/null +++ b/web/thesauruses/_meta/rules_facts.json @@ -0,0 +1,20 @@ +{ + "meta": { + "structure": "rules_facts", + "structure_name": "Rules and Facts" + }, + "categories": { + "Defining Rules": { + "defrule": "Defining Rules" + }, + "Undefining Rules": { + "undefrule": "Undefining Rules" + }, + "Asserting Facts": { + "assert": "Asserting Facts" + }, + "Retracting Facts": { + "retract": "Retracting Facts" + } + } +} diff --git a/web/thesauruses/clips/641/facts.json b/web/thesauruses/clips/641/facts.json deleted file mode 100644 index 66ff49bdd..000000000 --- a/web/thesauruses/clips/641/facts.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "meta": { - "language": "clips", - "language_version": "6.4.1", - "language_name": "CLIPS", - "structure": "facts" - }, - "concepts": { - "assert": { - "code": "(assert (my-fact foo))", - "name": "Assert Fact(s) into working memory" - }, - "retract": { - "code": "(retract 1)", - "name": "Retract existing Fact in working memory" - } - } -} diff --git a/web/thesauruses/clips/641/rules.json b/web/thesauruses/clips/641/rules_facts.json similarity index 64% rename from web/thesauruses/clips/641/rules.json rename to web/thesauruses/clips/641/rules_facts.json index 31f2b1a43..739864116 100644 --- a/web/thesauruses/clips/641/rules.json +++ b/web/thesauruses/clips/641/rules_facts.json @@ -3,7 +3,7 @@ "language": "clips", "language_version": "6.4.1", "language_name": "CLIPS", - "structure": "rules" + "structure": "rules_facts" }, "concepts": { "defrule": { @@ -18,6 +18,14 @@ "undefrule": { "code": "(undefrule my-rule)", "name": "Deleting a Defrule from the CLIPS environment" + }, + "assert": { + "code": "(assert (my-fact foo))", + "name": "Assert Fact(s) into working memory" + }, + "retract": { + "code": "(retract 1)", + "name": "Retract existing Fact in working memory" } } } From a9745cba36d25470d21da6f111e8bf5fa532bd11 Mon Sep 17 00:00:00 2001 From: Ryan Johnston Date: Wed, 31 Jul 2024 14:19:06 -0400 Subject: [PATCH 4/4] expanding names like defrule and undefrule. --- web/thesauruses/_meta/rules_facts.json | 4 ++-- web/thesauruses/meta_info.json | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/thesauruses/_meta/rules_facts.json b/web/thesauruses/_meta/rules_facts.json index 8ce8e970e..119a96b31 100644 --- a/web/thesauruses/_meta/rules_facts.json +++ b/web/thesauruses/_meta/rules_facts.json @@ -5,10 +5,10 @@ }, "categories": { "Defining Rules": { - "defrule": "Defining Rules" + "defining_rules": "Defining Rules" }, "Undefining Rules": { - "undefrule": "Undefining Rules" + "undefining_rules": "Undefining Rules" }, "Asserting Facts": { "assert": "Asserting Facts" diff --git a/web/thesauruses/meta_info.json b/web/thesauruses/meta_info.json index a25186bcc..72cbafb29 100644 --- a/web/thesauruses/meta_info.json +++ b/web/thesauruses/meta_info.json @@ -32,14 +32,13 @@ "control_structures": "Control Structures", "data_types": "Data Types", "exception_handling": "Exception Handling", - "facts": "Facts", "functions": "Functions, Methods, and Subroutines", "io": "Input and Output", "language_basics": "Basics of A Programming Language", "lists": "Lists, Arrays, and Hashed Lists", "operators": "Logical and Mathematical/Arithmetic Operators", "queues_stacks": "Queues and Stacks", - "rules": "Rules", + "rules_facts": "Rules and Facts", "strings": "Strings" } }