by DaFranker · 12y ago · 0 comments
rel q(y)
y = true
y = false
rel p(s, x)
if(s = ‘a’)
x = 0
else
x = 2
rel main()
k = q()
if(k)
s = 'a'
else
s != 'a'
p(s,x)
println(x)
Actually, I'd like to know what Cosmos would resolve this to as things stand. Is it just going to decide that | x = 0, | x = 2? Also can I throw probabilities into this code? rel q()
true
false
...
rel main()
if(q())
...
Indeed, having an 'else' that negates the condition would get tough for complicated conditions. Negation-by-failure and soft-cut ('choose') have their own problems in certain circumstances.Yeah, it's going to decide that | x = 0 | x = 2 (there is no CLP for strings).