Pārlūkot izejas kodu

Indroduce the use of constants

DricomDragon 5 gadi atpakaļ
vecāks
revīzija
23a4f57d5d
2 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  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