summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level1.cpp
blob: 9dee4a7958c89e1aa18912b3517223e4dd7bc8bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "level-1/level-1.hpp"

#include <iostream>

using namespace intellect::level1;
using namespace intellect::level1::concepts;

int main()
{
	decls(make, linked, habit);
	decls(needs, assumes, makes);
	decls(not, topic);
	decls(A, B, C);
	decls(source, type, target);
	decls(structure, function, argument, position);
	decls(variable, provide);

	(make-linked).link({
		is, habit,
		needs, a(structure).link({
			is, function-argument,
			argument-position, ref(1),
			a(variable, A), provide,
			a(variable, B), provide,
			a(variable, C), provide
		})
	});
	movetoname(a(link), A-B-C-linked).link({
		link-source, A,
		link-type, B,
		link-target, C
	});
	a(not, not-A-B-C-linked).set(topic, A-B-C-linked);
	(make-linked).link({
		assumes, not-A-B-C-linked,
		makes, A-B-C-linked
	});

	std::cout << (make-linked).dump("dumped", true) << std::endl;

	return 0;
}