summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-1
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-05 09:21:51 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-05 09:21:51 -0800
commit028c06b452f45df329116c0d0017ad2cd8ee2acc (patch)
treee3798d60469c17e8a27df48a51f6e1b9bfa0ccda /starts/meaning-vm/level-1
parentfddefb99e2f333ab8bde6fc2322f184e0dc1f86d (diff)
downloadstandingwithresilience-028c06b452f45df329116c0d0017ad2cd8ee2acc.tar.gz
standingwithresilience-028c06b452f45df329116c0d0017ad2cd8ee2acc.zip
working on bugs
Diffstat (limited to 'starts/meaning-vm/level-1')
-rw-r--r--starts/meaning-vm/level-1/concepts.hpp1
-rw-r--r--starts/meaning-vm/level-1/sugar.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/starts/meaning-vm/level-1/concepts.hpp b/starts/meaning-vm/level-1/concepts.hpp
index 2b460d6..f33d228 100644
--- a/starts/meaning-vm/level-1/concepts.hpp
+++ b/starts/meaning-vm/level-1/concepts.hpp
@@ -10,6 +10,7 @@ namespace concepts {
static ref level1("level1"), allocations("allocations");
static ref is("is", level1-allocations); // a link to define group relationships, links to the more general class
static ref name("name", level1-allocations); // used as the link to value<std::string> naming each concept
+static ref text("text", level1-allocations); // used as the type of value<std::string> names
static ref nothing("nothing", level1-allocations); // default value of a ref
static ref anonymous("anonymous", level1-allocations); // a group given concepts with generated names
static ref link("link", level1-allocations); // TODO: for concepts that are links, link them with is=link
diff --git a/starts/meaning-vm/level-1/sugar.cpp b/starts/meaning-vm/level-1/sugar.cpp
index 8585387..567edac 100644
--- a/starts/meaning-vm/level-1/sugar.cpp
+++ b/starts/meaning-vm/level-1/sugar.cpp
@@ -52,14 +52,14 @@ ref movetoname(ref anonymous, ref name)
bool nonempty = false;
for (auto & l : name.links()) {
if (l.first.linked(level0::concepts::allocator(), level0::concepts::level0allocations())) { continue; }
- if (l.second.isa(concepts::name)) { continue; }
+ if (l.second.isa(concepts::text)) { continue; }
nonempty = true;
}
- if (nonempty) {
+ if (nonempty) {
for (auto & link : anonymous.links()) {
if (link.first == concepts::is && link.second == concepts::anonymous) { continue; }
if (link.first.linked(level0::concepts::allocator(), level0::concepts::level0allocations())) { continue; }
- if (link.second.isa(concepts::name)) { continue; }
+ if (link.second.isa(concepts::text)) { continue; }
if (!name.linked(link.first, link.second)) {
throw std::logic_error(name.name() + " already defined otherwise from " + anonymous.getAll(concepts::is).begin()->name());// + ": \n" + dump(name, ref("dump"), ref(true)) + dump(anonymous, ref("dump"), ref(true)));
}