Check-in [3e177181c8]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:datalog: test assertion of a single fact.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3e177181c894ce02c4f26c036f0ec99eec829749
User & Date: kbk 2014-10-25 18:55:47
Context
2014-10-26
04:02
Add more Datalog tests, and adjust loadscript.tcl.in to allow for running Nagelfar instrumented code while testing. check-in: db5c306a7f user: kbk tags: trunk
2014-10-25
18:55
datalog: test assertion of a single fact. check-in: 3e177181c8 user: kbk tags: trunk
2014-08-06
13:08
better error checking for compileProgram check-in: 776298dbea user: kbk tags: trunk
Changes

Changes to library/datalog.tcl.

631
632
633
634
635
636
637






638
639
640
641
642
643
644
    #	Adds the given fact to the list of facts for its predicate.

    method assertFact {literal} {

	# Add the fact to the list of facts for its predicate
	set predicate [lindex $literal 1]
	dict lappend factsForPredicate $predicate $literal






    }

    # Method: retractFact
    #
    #	Retracts a fact
    #
    # NOT IMPLEMENTED







>
>
>
>
>
>







631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
    #	Adds the given fact to the list of facts for its predicate.

    method assertFact {literal} {

	# Add the fact to the list of facts for its predicate
	set predicate [lindex $literal 1]
	dict lappend factsForPredicate $predicate $literal

	# Make sure that the predicate exists in the 'outEdgesForPredicate'
	# dictionary.
	if {![dict exists $outEdgesForPredicate $predicate]} {
	    dict set outEdgesForPredicate $predicate {}
	}
    }

    # Method: retractFact
    #
    #	Retracts a fact
    #
    # NOT IMPLEMENTED