Posted by b-man 6 days ago
It's one of the best in recent years, despite using just eager compilation to SAT rather than lazy clause generation or another fancy hybrid technique.
It went against the grain by using encodings with smaller size that have poor propagation properties (like encoding numbers into binary with adder circuits) but then threw all sorts of compiler tech at the problem to optimize the circuits as much as possible.
It paid off it sure seems like.
Planner programming blows my mind
https://www.hillelwayne.com/post/picat/
> Picat is a research language intended to combine logic programming, imperative programming, and constraint solving. I originally learned it to help with vacation scheduling but soon discovered its planner module, which is one of the most fascinating programming models I’ve ever seen. ...
You can download and unpack it with
!wget -c "https://picat-lang.org/download/picat39_linux64.tar.gz" > /dev/null 2>&1
# 3.4MB so it's probably fine to download it every day
!tar -xvzf "picat39_linux64.tar.gz" -C . > /dev/null 2>&1
!echo 'picat binary is at /content/Picat/picat'
You can create a file by %%shell
cat <<MultiString > welcome.pi
main =>
print(" Welcome to PICAT’s world! \n ").
main(Args) =>
print(" Welcome to PICAT’s world! \n"),
foreach (Arg in Args)
printf("%s \n", Arg)
end.
MultiString
and run it as !/content/Picat/picat welcome a b c
I don't think that Picat supports the REPL workflow, even just defining functions on the fly. You have to put your functions into files (fix me). The official guide is at [2].I've created an example notebook at [3] (although you shouldn't use people's notebooks especially if they are mutable: they might have access to your Google Drive files, or use up your resources).
[0] : https://colab.google.com/
[1] : https://research.google.com/colaboratory/faq.html
[2] : https://picat-lang.org/download/picat_guide_html/picat_guide...
[3] : https://colab.research.google.com/gist/bmacho/b0327ec63d1f50...