Exemple #1
0
	def instql_show(self,dict_predicates, instql_asp):
	    self.ctl = Control()
	    self.ctl.load(temporary_text_file(instql_asp))
	    fact_asp = dict_funs_to_asp(dict_predicates)
	    self.ctl.load(temporary_text_file(fact_asp))
	    parts = []


	    self.ctl.ground(parts+[("base", [])])

	    self.ctl.solve(on_model=self.on_model)

	    out = state_dict_from_lists(self.observed,self.occurred,self.holdsat)
	    return out
Exemple #2
0
    def get_state_json(self):
	return state_dict_from_lists(self.observed,self.occurred,self.holdsat)