When I want to prove Erlog(Prolog) goal Robert Verdig has provided very handy function i.e. :
> g = :erlog_io.read_string 'goal(some,thing).'
{:ok, {:goal, :some, :thing}}
to convert to structure which I then pass to prove() :
> :erlog.prove state, g
I thought if I convert PID to char_list I can concatenate it and get the structure with the PID, it didnt work ;(
iex(19)> s = :erlang.pid_to_list self
'<0.82.0>'
iex(20)> :erlog_io.read_string 'goal(some,thing,' ++ s ++ ').'
{:error, {1, :erlog_parse, {:expected, :")"}}}
iex(21)> the_goal = 'goal(some,thing,' ++ s ++ ').'
'goal(some,thing,<0.82.0>).'
iex(22)> :erlog_io.read_string the_goal
{:error, {1, :erlog_parse, {:expected, :")"}}}
iex(23)>
The only other possibility is to generate the structure with dummy-atom and then replace with PID before passing to prove(),
which as you may expect is not that handy :)
In short trying to pass PID to Erlog and then back to Elixir !