OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace / tests / query / choice-constant.scm

26 lines · scm ref:
;
; choice-constant.scm
; ChoiceLink with no variables!!
;
(use-modules (opencog))

;;; Populate the atomspace with four small trees.
(ListLink
	(ConceptNode "A")
	(ConceptNode "B")
)

;;; Two clauses; they both connected with a common variable.
(define query
	(MeetLink
		(TypedVariableLink (VariableNode "$x") (TypeNode "ConceptNode"))
		(ListLink
			(ChoiceLink
				(ConceptNode "A")
				(ConceptNode "C")
			)
			(VariableNode "$x")
		)
	)
)