Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / mc / mc_request.cpp
1 /* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include <cassert>
7
8 #include "src/include/mc/mc.h"
9 #include "src/mc/ModelChecker.hpp"
10 #include "src/mc/mc_request.hpp"
11 #include "src/mc/mc_smx.hpp"
12 #include "src/mc/mc_xbt.hpp"
13
14 using simgrid::mc::remote;
15
16 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc,
17                                 "Logging specific to MC (request)");
18
19 static char *pointer_to_string(void *pointer);
20 static char *buff_size_to_string(size_t size);
21
22 static inline simgrid::kernel::activity::CommImpl* MC_get_comm(smx_simcall_t r)
23 {
24   switch (r->call ) {
25   case SIMCALL_COMM_WAIT:
26     return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(r));
27   case SIMCALL_COMM_TEST:
28     return static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(r));
29   default:
30     return nullptr;
31   }
32 }
33
34 static inline
35 smx_mailbox_t MC_get_mbox(smx_simcall_t r)
36 {
37   switch(r->call) {
38   case SIMCALL_COMM_ISEND:
39     return simcall_comm_isend__get__mbox(r);
40   case SIMCALL_COMM_IRECV:
41     return simcall_comm_irecv__get__mbox(r);
42   default:
43     return nullptr;
44   }
45 }
46
47 namespace simgrid {
48 namespace mc {
49
50 // Does half the job
51 static inline
52 bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
53 {
54   if (r1->call == SIMCALL_COMM_ISEND && r2->call == SIMCALL_COMM_IRECV)
55     return false;
56
57   if (r1->call == SIMCALL_COMM_IRECV && r2->call == SIMCALL_COMM_ISEND)
58     return false;
59
60   // Those are internal requests, we do not need indirection
61   // because those objects are copies:
62   simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(r1);
63   simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(r2);
64
65   if ((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
66       && r2->call == SIMCALL_COMM_WAIT) {
67
68     smx_mailbox_t mbox = MC_get_mbox(r1);
69
70     if (mbox != synchro2->mbox_cpy
71         && simcall_comm_wait__get__timeout(r2) <= 0)
72       return false;
73
74     if ((r1->issuer != synchro2->src_proc)
75         && (r1->issuer != synchro2->dst_proc)
76         && simcall_comm_wait__get__timeout(r2) <= 0)
77       return false;
78
79     if ((r1->call == SIMCALL_COMM_ISEND)
80         && (synchro2->type == SIMIX_COMM_SEND)
81         && (synchro2->src_buff !=
82             simcall_comm_isend__get__src_buff(r1))
83         && simcall_comm_wait__get__timeout(r2) <= 0)
84       return false;
85
86     if ((r1->call == SIMCALL_COMM_IRECV)
87         && (synchro2->type == SIMIX_COMM_RECEIVE)
88         && (synchro2->dst_buff != simcall_comm_irecv__get__dst_buff(r1))
89         && simcall_comm_wait__get__timeout(r2) <= 0)
90       return false;
91   }
92
93   /* FIXME: the following rule assumes that the result of the
94    * isend/irecv call is not stored in a buffer used in the
95    * test call. */
96 #if 0
97   if((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
98      &&  r2->call == SIMCALL_COMM_TEST)
99      return FALSE;
100 #endif
101
102   if (r1->call == SIMCALL_COMM_WAIT
103       && (r2->call == SIMCALL_COMM_WAIT || r2->call == SIMCALL_COMM_TEST)
104       && (synchro1->src_proc == nullptr || synchro1->dst_proc == nullptr))
105     return false;
106
107   if (r1->call == SIMCALL_COMM_TEST &&
108       (simcall_comm_test__get__comm(r1) == nullptr
109        || synchro1->src_buff == nullptr
110        || synchro1->dst_buff == nullptr))
111     return false;
112
113   if (r1->call == SIMCALL_COMM_TEST && r2->call == SIMCALL_COMM_WAIT
114       && synchro1->src_buff == synchro2->src_buff
115       && synchro1->dst_buff == synchro2->dst_buff)
116     return false;
117
118   if (r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_TEST
119       && synchro1->src_buff != nullptr
120       && synchro1->dst_buff != nullptr
121       && synchro2->src_buff != nullptr
122       && synchro2->dst_buff != nullptr
123       && synchro1->dst_buff != synchro2->src_buff
124       && synchro1->dst_buff != synchro2->dst_buff
125       && synchro2->dst_buff != synchro1->src_buff)
126     return false;
127
128   return true;
129 }
130
131 // Those are internal_req
132 bool request_depend(smx_simcall_t r1, smx_simcall_t r2)
133 {
134   if (r1->issuer == r2->issuer)
135     return false;
136
137   /* Wait with timeout transitions are not considered by the independence theorem, thus we consider them as dependent with all other transitions */
138   if ((r1->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(r1) > 0)
139       || (r2->call == SIMCALL_COMM_WAIT
140           && simcall_comm_wait__get__timeout(r2) > 0))
141     return TRUE;
142
143   if (r1->call != r2->call)
144     return request_depend_asymmetric(r1, r2)
145       && request_depend_asymmetric(r2, r1);
146
147   // Those are internal requests, we do not need indirection
148   // because those objects are copies:
149   simgrid::kernel::activity::CommImpl* synchro1 = MC_get_comm(r1);
150   simgrid::kernel::activity::CommImpl* synchro2 = MC_get_comm(r2);
151
152   switch(r1->call) {
153   case SIMCALL_COMM_ISEND:
154     return simcall_comm_isend__get__mbox(r1)
155       == simcall_comm_isend__get__mbox(r2);
156   case SIMCALL_COMM_IRECV:
157     return simcall_comm_irecv__get__mbox(r1)
158       == simcall_comm_irecv__get__mbox(r2);
159   case SIMCALL_COMM_WAIT:
160     if (synchro1->src_buff == synchro2->src_buff
161         && synchro1->dst_buff == synchro2->dst_buff)
162       return false;
163     else if (synchro1->src_buff != nullptr
164         && synchro1->dst_buff != nullptr
165         && synchro2->src_buff != nullptr
166         && synchro2->dst_buff != nullptr
167         && synchro1->dst_buff != synchro2->src_buff
168         && synchro1->dst_buff != synchro2->dst_buff
169         && synchro2->dst_buff != synchro1->src_buff)
170       return false;
171     else
172       return true;
173   default:
174     return true;
175   }
176 }
177
178 }
179 }
180
181 static char *pointer_to_string(void *pointer)
182 {
183
184   if (XBT_LOG_ISENABLED(mc_request, xbt_log_priority_verbose))
185     return bprintf("%p", pointer);
186
187   return xbt_strdup("(verbose only)");
188 }
189
190 static char *buff_size_to_string(size_t buff_size)
191 {
192
193   if (XBT_LOG_ISENABLED(mc_request, xbt_log_priority_verbose))
194     return bprintf("%zu", buff_size);
195
196   return xbt_strdup("(verbose only)");
197 }
198
199
200 std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid::mc::RequestType request_type)
201 {
202   xbt_assert(mc_model_checker != nullptr, "Must be called from MCer");
203
204   bool use_remote_comm = true;
205   switch(request_type) {
206   case simgrid::mc::RequestType::simix:
207     use_remote_comm = true;
208     break;
209   case simgrid::mc::RequestType::executed:
210   case simgrid::mc::RequestType::internal:
211     use_remote_comm = false;
212     break;
213   }
214
215   const char* type = nullptr;
216   char *args = nullptr;
217
218   smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
219
220   switch (req->call) {
221
222   case SIMCALL_COMM_ISEND: {
223     type = "iSend";
224     char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
225     char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
226     if (issuer->host)
227       args = bprintf("src=(%lu)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
228                      MC_smx_actor_get_name(issuer), p, bs);
229     else
230       args = bprintf("src=(%lu)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
231     xbt_free(bs);
232     xbt_free(p);
233     break;
234   }
235
236   case SIMCALL_COMM_IRECV: {
237     size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
238     size_t size = 0;
239     if (remote_size)
240       mc_model_checker->process().read_bytes(&size, sizeof(size),
241         remote(remote_size));
242
243     type = "iRecv";
244     char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
245     char* bs = buff_size_to_string(size);
246     if (issuer->host)
247       args = bprintf("dst=(%lu)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
248                      MC_smx_actor_get_name(issuer), p, bs);
249     else
250       args = bprintf("dst=(%lu)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
251     xbt_free(bs);
252     xbt_free(p);
253     break;
254   }
255
256   case SIMCALL_COMM_WAIT: {
257     simgrid::kernel::activity::CommImpl* remote_act =
258         static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(req));
259     char* p;
260     if (value == -1) {
261       type = "WaitTimeout";
262       p = pointer_to_string(remote_act);
263       args = bprintf("comm=%s", p);
264     } else {
265       type = "Wait";
266       p = pointer_to_string(remote_act);
267
268       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
269       simgrid::kernel::activity::CommImpl* act;
270       if (use_remote_comm) {
271         mc_model_checker->process().read(temp_synchro,
272                                          remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
273         act = temp_synchro.getBuffer();
274       } else
275         act = remote_act;
276
277       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_proc));
278       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_proc));
279       args =
280           bprintf("comm=%s [(%lu)%s (%s)-> (%lu)%s (%s)]", p, src_proc ? src_proc->pid : 0,
281                   src_proc ? MC_smx_actor_get_host_name(src_proc) : "", src_proc ? MC_smx_actor_get_name(src_proc) : "",
282                   dst_proc ? dst_proc->pid : 0, dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
283                   dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
284     }
285     xbt_free(p);
286     break;
287   }
288
289   case SIMCALL_COMM_TEST: {
290     simgrid::kernel::activity::CommImpl* remote_act =
291         static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_test__getraw__comm(req));
292     simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
293     simgrid::kernel::activity::CommImpl* act;
294     if (use_remote_comm) {
295       mc_model_checker->process().read(temp_synchro,
296                                        remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
297       act = temp_synchro.getBuffer();
298     } else
299       act = remote_act;
300
301     char* p;
302     if (act->src_proc == nullptr || act->dst_proc == nullptr) {
303       type = "Test FALSE";
304       p = pointer_to_string(remote_act);
305       args = bprintf("comm=%s", p);
306     } else {
307       type = "Test TRUE";
308       p = pointer_to_string(remote_act);
309
310       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_proc));
311       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_proc));
312       args = bprintf("comm=%s [(%lu)%s (%s) -> (%lu)%s (%s)]", p, src_proc->pid, MC_smx_actor_get_name(src_proc),
313                      MC_smx_actor_get_host_name(src_proc), dst_proc->pid, MC_smx_actor_get_name(dst_proc),
314                      MC_smx_actor_get_host_name(dst_proc));
315     }
316     xbt_free(p);
317     break;
318   }
319
320   case SIMCALL_COMM_WAITANY: {
321     type = "WaitAny";
322     s_xbt_dynar_t comms;
323     mc_model_checker->process().read_bytes(
324       &comms, sizeof(comms), remote(simcall_comm_waitany__get__comms(req)));
325     if (not xbt_dynar_is_empty(&comms)) {
326       smx_activity_t remote_sync;
327       read_element(mc_model_checker->process(),
328         &remote_sync, remote(simcall_comm_waitany__get__comms(req)), value,
329         sizeof(remote_sync));
330       char* p = pointer_to_string(&*remote_sync);
331       args = bprintf("comm=%s (%d of %lu)",
332         p, value + 1, xbt_dynar_length(&comms));
333       xbt_free(p);
334     } else
335       args = bprintf("comm at idx %d", value);
336     break;
337   }
338
339   case SIMCALL_COMM_TESTANY:
340     if (value == -1) {
341       type = "TestAny FALSE";
342       args = xbt_strdup("-");
343     } else {
344       type = "TestAny";
345       args =
346           bprintf("(%d of %zu)", value + 1,
347                     simcall_comm_testany__get__count(req));
348     }
349     break;
350
351   case SIMCALL_MUTEX_TRYLOCK:
352   case SIMCALL_MUTEX_LOCK: {
353     if (req->call == SIMCALL_MUTEX_LOCK)
354       type = "Mutex LOCK";
355     else
356       type = "Mutex TRYLOCK";
357
358     simgrid::mc::Remote<simgrid::simix::MutexImpl> mutex;
359     mc_model_checker->process().read_bytes(mutex.getBuffer(), sizeof(mutex),
360       remote(
361         req->call == SIMCALL_MUTEX_LOCK
362         ? simcall_mutex_lock__get__mutex(req)
363         : simcall_mutex_trylock__get__mutex(req)
364       ));
365     s_xbt_swag_t mutex_sleeping;
366     mc_model_checker->process().read_bytes(&mutex_sleeping, sizeof(mutex_sleeping),
367       remote(mutex.getBuffer()->sleeping));
368
369     args =
370         bprintf("locked = %d, owner = %d, sleeping = %d", mutex.getBuffer()->locked,
371                 mutex.getBuffer()->owner != nullptr
372                     ? (int)mc_model_checker->process().resolveActor(simgrid::mc::remote(mutex.getBuffer()->owner))->pid
373                     : -1,
374                 mutex_sleeping.count);
375     break;
376   }
377
378   case SIMCALL_MC_RANDOM:
379     type = "MC_RANDOM";
380     args = bprintf("%d", value);
381     break;
382
383   default:
384     type = SIMIX_simcall_name(req->call);
385     args = bprintf("??");
386     break;
387   }
388
389   std::string str;
390   if (args != nullptr)
391     str = simgrid::xbt::string_printf("[(%lu)%s (%s)] %s(%s)", issuer->pid, MC_smx_actor_get_host_name(issuer),
392                                       MC_smx_actor_get_name(issuer), type, args);
393   else
394     str = simgrid::xbt::string_printf("[(%lu)%s (%s)] %s ", issuer->pid, MC_smx_actor_get_host_name(issuer),
395                                       MC_smx_actor_get_name(issuer), type);
396   xbt_free(args);
397   return str;
398 }
399
400 namespace simgrid {
401 namespace mc {
402
403 bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
404 {
405   simgrid::kernel::activity::ActivityImpl* remote_act = nullptr;
406   switch (req->call) {
407
408   case SIMCALL_COMM_WAIT:
409     /* FIXME: check also that src and dst processes are not suspended */
410     remote_act = simcall_comm_wait__getraw__comm(req);
411     break;
412
413   case SIMCALL_COMM_WAITANY: {
414     read_element(mc_model_checker->process(), &remote_act, remote(simcall_comm_waitany__getraw__comms(req)), idx,
415                  sizeof(remote_act));
416     }
417     break;
418
419   case SIMCALL_COMM_TESTANY:
420     remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__getraw__comms(req) + idx));
421     break;
422
423   default:
424     return true;
425   }
426
427   simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
428   mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
429   simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
430   return comm->src_proc && comm->dst_proc;
431 }
432
433
434 static const char* colors[] = {
435   "blue",
436   "red",
437   "green3",
438   "goldenrod",
439   "brown",
440   "purple",
441   "magenta",
442   "turquoise4",
443   "gray25",
444   "forestgreen",
445   "hotpink",
446   "lightblue",
447   "tan",
448 };
449
450 static inline const char* get_color(int id)
451 {
452   return colors[id % (sizeof(colors) / sizeof(colors[0])) ];
453 }
454
455 std::string request_get_dot_output(smx_simcall_t req, int value)
456 {
457   std::string label;
458
459   const smx_actor_t issuer = MC_smx_simcall_get_issuer(req);
460
461   switch (req->call) {
462   case SIMCALL_COMM_ISEND:
463     if (issuer->host)
464       label = simgrid::xbt::string_printf("[(%lu)%s] iSend", issuer->pid, MC_smx_actor_get_host_name(issuer));
465     else
466       label = bprintf("[(%lu)] iSend", issuer->pid);
467     break;
468
469   case SIMCALL_COMM_IRECV:
470     if (issuer->host)
471       label = simgrid::xbt::string_printf("[(%lu)%s] iRecv", issuer->pid, MC_smx_actor_get_host_name(issuer));
472     else
473       label = simgrid::xbt::string_printf("[(%lu)] iRecv", issuer->pid);
474     break;
475
476   case SIMCALL_COMM_WAIT: {
477     if (value == -1) {
478       if (issuer->host)
479         label = simgrid::xbt::string_printf("[(%lu)%s] WaitTimeout", issuer->pid, MC_smx_actor_get_host_name(issuer));
480       else
481         label = simgrid::xbt::string_printf("[(%lu)] WaitTimeout", issuer->pid);
482     } else {
483       simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
484       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
485       mc_model_checker->process().read(temp_comm,
486                                        remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
487       simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
488
489       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->src_proc));
490       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->dst_proc));
491       if (issuer->host)
492         label = simgrid::xbt::string_printf("[(%lu)%s] Wait [(%lu)->(%lu)]", issuer->pid,
493                                             MC_smx_actor_get_host_name(issuer), src_proc ? src_proc->pid : 0,
494                                             dst_proc ? dst_proc->pid : 0);
495       else
496         label = simgrid::xbt::string_printf("[(%lu)] Wait [(%lu)->(%lu)]",
497                     issuer->pid,
498                     src_proc ? src_proc->pid : 0,
499                     dst_proc ? dst_proc->pid : 0);
500     }
501     break;
502   }
503
504   case SIMCALL_COMM_TEST: {
505     simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);
506     simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
507     mc_model_checker->process().read(temp_comm, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
508     simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
509     if (comm->src_proc == nullptr || comm->dst_proc == nullptr) {
510       if (issuer->host)
511         label = simgrid::xbt::string_printf("[(%lu)%s] Test FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
512       else
513         label = bprintf("[(%lu)] Test FALSE", issuer->pid);
514     } else {
515       if (issuer->host)
516         label = simgrid::xbt::string_printf("[(%lu)%s] Test TRUE", issuer->pid, MC_smx_actor_get_host_name(issuer));
517       else
518         label = simgrid::xbt::string_printf("[(%lu)] Test TRUE", issuer->pid);
519     }
520     break;
521   }
522
523   case SIMCALL_COMM_WAITANY: {
524     unsigned long comms_size = read_length(
525       mc_model_checker->process(), remote(simcall_comm_waitany__get__comms(req)));
526     if (issuer->host)
527       label = simgrid::xbt::string_printf("[(%lu)%s] WaitAny [%d of %lu]", issuer->pid,
528                                           MC_smx_actor_get_host_name(issuer), value + 1, comms_size);
529     else
530       label = simgrid::xbt::string_printf("[(%lu)] WaitAny [%d of %lu]",
531                   issuer->pid, value + 1, comms_size);
532     break;
533   }
534
535   case SIMCALL_COMM_TESTANY:
536     if (value == -1) {
537       if (issuer->host)
538         label = simgrid::xbt::string_printf("[(%lu)%s] TestAny FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
539       else
540         label = simgrid::xbt::string_printf("[(%lu)] TestAny FALSE", issuer->pid);
541     } else {
542       if (issuer->host)
543         label = simgrid::xbt::string_printf("[(%lu)%s] TestAny TRUE [%d of %lu]", issuer->pid,
544                                             MC_smx_actor_get_host_name(issuer), value + 1,
545                                             simcall_comm_testany__get__count(req));
546       else
547         label = simgrid::xbt::string_printf("[(%lu)] TestAny TRUE [%d of %lu]",
548                     issuer->pid,
549                     value + 1,
550                     simcall_comm_testany__get__count(req));
551     }
552     break;
553
554   case SIMCALL_MUTEX_TRYLOCK:
555     label = simgrid::xbt::string_printf("[(%lu)] Mutex TRYLOCK", issuer->pid);
556     break;
557
558   case SIMCALL_MUTEX_LOCK:
559     label = simgrid::xbt::string_printf("[(%lu)] Mutex LOCK", issuer->pid);
560     break;
561
562   case SIMCALL_MC_RANDOM:
563     if (issuer->host)
564       label = simgrid::xbt::string_printf("[(%lu)%s] MC_RANDOM (%d)", issuer->pid, MC_smx_actor_get_host_name(issuer),
565                                           value);
566     else
567       label = simgrid::xbt::string_printf("[(%lu)] MC_RANDOM (%d)", issuer->pid, value);
568     break;
569
570   default:
571     THROW_UNIMPLEMENTED;
572   }
573
574   const char* color = get_color(issuer->pid - 1);
575   return  simgrid::xbt::string_printf(
576         "label = \"%s\", color = %s, fontcolor = %s", label.c_str(),
577         color, color);
578 }
579
580 }
581 }