Example #1
0
 def str_brief(self):
     fact_name = get_fact_name(self.sym_id)
     fact_strs = []
     for fact in candidate_args(self.main_table):
         fact_strs.append("%s(%s)" % (fact_name, ','.join(map(str, fact))))
     if len(fact_strs) > 0:
         return ','.join(fact_strs)
     else:
         return None
Example #2
0
	def str_brief(self):
		fact_name  = get_fact_name(self.sym_id)
		fact_strs = []
		for fact in candidate_args(self.main_table):
			fact_strs.append( "%s(%s)" % (fact_name, ','.join( map(str,fact) )) )
		if len(fact_strs) > 0:
			return ','.join(fact_strs)
		else:
			return None
Example #3
0
	def __str__(self):
		store_header  = "%s Store:" % get_fact_name(self.sym_id)
		main_header   = "--- Main ---"
		main_contents = pretty_candidates(self.main_table)
		hash_tables   = self.hash_tables
		hash_contents = ""
		for i in xrange(0,len(hash_tables)):
			hash_contents += "--- Hash Lookup %s: %s ---\n" % (i,hash_tables[i]['hash_str'])
			hash_contents += pretty_hash_table(hash_tables[i]) + "\n"
		return '%s' % '\n'.join([store_header,main_header,main_contents,hash_contents])
Example #4
0
 def __str__(self):
     store_header = "%s Store:" % get_fact_name(self.sym_id)
     main_header = "--- Main ---"
     main_contents = pretty_candidates(self.main_table)
     hash_tables = self.hash_tables
     hash_contents = ""
     for i in xrange(0, len(hash_tables)):
         hash_contents += "--- Hash Lookup %s: %s ---\n" % (
             i, hash_tables[i]['hash_str'])
         hash_contents += pretty_hash_table(hash_tables[i]) + "\n"
     return '%s' % '\n'.join(
         [store_header, main_header, main_contents, hash_contents])