What does mygoal mean?

And by “mygoal”, do you mean the name of the program?

1 Like

He means a query which would be one or more predicates entered at the ?- prompt.

I say one or more, because you can put more than one predicate together with a , or ; operator, e.g.

?- get_time(Time_stamp),stamp_date_time(Time_stamp,Date_time,0),date_time_value(date,Date_time,Date).
Time_stamp = 1568841527.1887007,
Date_time = date(2019, 9, 18, 21, 18, 47.188700675, 0, -, -),
Date = date(2019, 9, 18).

See: Dealing with time and date

Try:

trace,get_time(Time_stamp),stamp_date_time(Time_stamp,Date_time,0),date_time_value(date,Date_time,Date).

and you will see.

You can also think of mygoal as a body. See: Basic Concepts

I just tried that and got execution aborted!

?- trace,get_time(Time_stamp),stamp_date_time(Time_stamp,Date_time,0),date_time_value(date,Date_time,Date).
   Call: (9) get_time(_2146) ? creep
   Exit: (9) get_time(1568865900.706971) ? abort
% Execution Aborted

You need to just keep pressing the space bar to the end.

?- trace,get_time(Time_stamp),stamp_date_time(Time_stamp,Date_time,0),date_time_value(date,Date_time,Date).
   Call: (11) get_time(_4548) ? creep
   Exit: (11) get_time(1568891670.1469712) ? creep
   Call: (11) stamp_date_time(1568891670.1469712, _4554, 0) ? creep
   Exit: (11) stamp_date_time(1568891670.1469712, date(2019, 9, 19, 11, 14, 30.146971225, 0, -, -), 0) ? creep
   Call: (11) date:date_time_value(date, date(2019, 9, 19, 11, 14, 30.146971225, 0, -, -), _4564) ? creep
   Exit: (11) date:date_time_value(date, date(2019, 9, 19, 11, 14, 30.146971225, 0, -, -), date(2019, 9, 19)) ? creep
Time_stamp = 1568891670.1469712,
Date_time = date(2019, 9, 19, 11, 14, 30.146971225, 0, -, -),
Date = date(2019, 9, 19).

[trace]  ?-  
1 Like