public Query newQuery(String script0, Object ...args) throws ParseException {
		HashMap<String,Integer> vars = new HashMap<>();
		String script = "";
		for (int i = 0; i < script0.length(); ) {
			int j = script0.indexOf('%', i);
			if (j == -1) {
				script += script0.substring(i);
				break;
			}
			script += script0.substring(i, j);
			i = ++j;
			while (i < script0.length() && Character.isLowerCase(script0.charAt(i))) i++;
			if (i == j) {
				throw new IllegalArgumentException("変数名がありません: col="+ i);
			}
			String key = script0.substring(j, i);
			if (!vars.containsKey(key)) {
				vars.put(key, vars.size());
			}
			script += " _"+ key;
		}
		// System.err.println("State.newQuery: script="+ script);
		Coding coding;
		try {
			coding = Coding.create(this, Functor.create
					("?-", newParser(new StringReader(script)).next()));
		} catch (IOException e) {
			throw new IllegalStateException(e);
		}
		Query query = new Query(this, coding);
		for (Map.Entry<String,Integer> e: vars.entrySet()) {
			query.callee.setSlot(coding.vars().get("_"+ e.getKey()).id(), Term.valueOf(args[e.getValue()]));
		}
		return query;
	}