quilc icon indicating copy to clipboard operation
quilc copied to clipboard

Confusion Between 'Schedule' and 'Scheduler'

Open ghost opened this issue 4 years ago • 1 comments

There seems to be confusion between 'schedule' and 'scheduler' throughout sources and doc. They seem to be used interchangeably, which seems confusing. Is a "schedule" the same as a "scheduleR"?

For example, consider the following code snippet in src/compressor/compressor.lisp:

  (let ((lschedule (make-lscheduler)))
    ;; load up the logical schedule

The variable lschedule and the comment refer to a "schedule", but (make-lscheduler) refers to a "scheduleR", and it creates an instance of logical-scheduler, i.e., scheduler with an R.

This sort of confusion seems pervasive throughout the system. A review and cleanup of the two usages may be worthwhile.

In case this helps, here are two grep commands I found useful to find 'scheduler' (with the R) as opposed to 'schedule' (without the R), from the root of the repo:

grep -r -i -E --include=\*.lisp "scheduler" .
grep -r -i -E --include=\*.lisp "schedule([^r]|$)" .

ghost avatar Jan 25 '21 20:01 ghost

This actually led to a bug (which has now been fixed) where, when SAFETY was sufficiently low, SBCL wasn't checking that a class slot type was a valid type. At some point somebody had written logical-schedule as a slot type, which doesn't exist, because it (the type) is called logical-scheduler.

stylewarning avatar Jan 26 '21 11:01 stylewarning