(defrule generate-kdebug-signpost-table
	(unbound-table-instance (table-id ?output) (has schema kdebug-signpost))
    (not (unbound-table-instance (table-id ?output) (has signpost-code-map $?)))
    (unbound-table-instance (table-id ?output) (has plist-config ?plist))
    (unbound-table-instance (table-id ?output) (has codes $?codes))
	=>
    ; create a new modeler instance
    (create-modeler-instance)

	; define the input table the current modeler instance needs
	(bind-input-table kdebug (attribute codes (expand$ $?codes)) (attribute callstack user))
    (bind-input-table signpost-config (attribute plist ?plist))

    ; bind to the table, making it no longer unbound
    (bind-output-table ?output)
)

(defrule generate-thread-interval-sp-table 
	(unbound-table-instance (table-id ?output) (has schema thread-interval-signpost))
    (not (unbound-table-instance (table-id ?output) (has signpost-code-map $?)))
    (unbound-table-instance (table-id ?output) (has plist-config ?plist))
    (unbound-table-instance (table-id ?output) (has codes $?codes))
	=>
    ; create a new modeler instance
    (create-modeler-instance)

	; define the input table the current modeler instance needs
	(bind-input-table kdebug (attribute codes (expand$ $?codes)) (attribute callstack user))
    (bind-input-table signpost-config (attribute plist ?plist))

    ; bind to the table, making it no longer unbound
    (bind-output-table ?output)
)

(defrule generate-level-signpost-table 
	(unbound-table-instance (table-id ?output) (has schema level-signpost))
    (not (unbound-table-instance (table-id ?output) (has signpost-code-map $?)))
    (unbound-table-instance (table-id ?output) (has plist-config ?plist))
    (unbound-table-instance (table-id ?output) (has codes $?codes))
	=>
    ; create a new modeler instance
    (create-modeler-instance)

	; define the input table the current modeler instance needs
	(bind-input-table kdebug (attribute codes (expand$ $?codes)) )
    (bind-input-table signpost-config (attribute plist ?plist))

    ; bind to the table, making it no longer unbound
    (bind-output-table ?output)
)

