Prechádzať zdrojové kódy

Indroduce the use of constants

DricomDragon 5 rokov pred
rodič
commit
23a4f57d5d
2 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 2 1
      tp/1/warm_city.lp
  2. 2 0
      tp/1/warm_custom_const.bash

+ 2 - 1
tp/1/warm_city.lp

@@ -2,7 +2,8 @@
 t(rennes, 4 ; nantes, 5 ; marseille, 8 ; paris, 2).
 
 % Test
-warm(V) :- t(V, T), T > 4.
+#const ts = 4.
+warm(V) :- t(V, T), T > ts.
 
 % Display
 #show warm/1.

+ 2 - 0
tp/1/warm_custom_const.bash

@@ -0,0 +1,2 @@
+#!/bin/bash -x
+clingo warm_city.lp --const ts=6