Programs used for evaluation

8 views
Skip to first unread message

José Carlos de Campos

unread,
Jul 25, 2011, 3:53:03 PM7/25/11
to dx-comp...@googlegroups.com
Hi,

At DXC'11 Software Track.pdf appears the following data:
___________________________
| Program Name | LOC   | Tests |
| print_tokens     | 539    | 4130  |
| print_tokens2 | 489     | 4115  |
| replace | 507     | 5542  |
| schedule | 397     | 2650  |
| schedule2 | 299     | 2710  |
| tcas | 174     | 1608  |
| tot_info | 398     | 1052  |
| space | 9126    | 500  |
| gzip | 6708    | 211  |
| sed | 9014    | 184  |
| grep | 13287  | 809  |
| flex | 14914  | 107  |

with my parser I obtain the same number of tests, but more LOC's:

| Program Name | LOC   | Tests |
| print_tokens     | 564     | 4130  |
| print_tokens2 | 510     | 4115  |
| replace | 564     | 5542  |
| schedule | 413     | 2650  |
| schedule2 | 308     | 2710  |
| tcas | 174     | 1608  |
| tot_info | 407     | 1052  |
| space | 9128    | 500  |
| gzip | 6708    | 211  |
| sed | 9014    | 184  |
| grep | 13284  | 809  |
| flex | 14194  | 107  |

I am wrong? I am right?


Thanks in advance.

Alberto Gonzalez

unread,
Jul 25, 2011, 4:53:34 PM7/25/11
to dx-comp...@googlegroups.com
Hi

I'll correct the pdf asap, but in the meanwhile, take as reference the number of columns in the matrix in the .spec files.

sorry for the inconvenience
Alberto

2011/7/25 José Carlos de Campos <zecapi...@googlemail.com>



--

  Alberto González Sánchez
  Software Technology Department, EEMCS Faculty
  Delft University of Technology
  home:   www.st.ewi.tudelft.nl/~albgonz

José Carlos de Campos

unread,
Aug 1, 2011, 6:38:39 PM8/1/11
to dx-comp...@googlegroups.com
Hi,

I updated the SystemCatalogs files and now I cannot read the sensors from <SystemCatalogs>.xml, e.g. tcas.xml ....

My suspicion: previous version of <SystemCatalogs>.xml only has:

<component>
    <name>t1608</name>
    <componentType>test</componentType>
</component>

But last version from dxc website has:

<component>
    <name>t1608</name>
    <componentType>test</componentType>
    <probeCost>1</probeCost>
</component>

What you think?


--
Best,
Zé Carlos

Alberto Gonzalez

unread,
Aug 2, 2011, 4:35:35 AM8/2/11
to dx-comp...@googlegroups.com
Hi

this is a feature, not a bug. Each test that you execute has a cost of 1. Before, this cost was in the componentType description, but the framework was ignoring it.
With this change, you will have to actually send probes to the framework to get the test outcomes.

Alberto


2011/8/2 José Carlos de Campos <zecapi...@googlemail.com>

José Carlos de Campos

unread,
Aug 2, 2011, 5:18:18 AM8/2/11
to dx-comp...@googlegroups.com
Hi,

Maybe the last message that I sent doesn't explain very well the problem that we have.

With last SystemCatalogs version available at DXC website, we cannot obtain the sensors from .xml file. In processData function when you do:

if (string(typeid(*msg).name()) == string(typeid(SensorData).name()))
{
    const SensorData* sd = dynamic_cast<const SensorData*>(msg);
    ...

if you try print the size of sd, cout << sd->getSensors()->size() << endl; this cout returns always 0 (zero). This happens with our program and ExampleDA program.
--
Best,
Zé Carlos

Alberto Gonzalez

unread,
Aug 2, 2011, 5:25:14 AM8/2/11
to dx-comp...@googlegroups.com
hi

Yes, now you have to request the sensor data, because otherwise we cannot know how many tests you required to come up with the diagnosis.

You can probe like this:

CommandSet cs;
cs.insert(Command("probe", Value::v("t1")));
CommandData cd(cs);
connector->sendMessage(&cd);

One commandset can have many commands, so you can ask for all tests at once if you want.

José Carlos de Campos

unread,
Aug 3, 2011, 5:06:13 AM8/3/11
to dx-comp...@googlegroups.com
Hi,

Sorry, but I cannot understand why before update sample data we could obtain all sensors at once, and now we cannot! Now, we need to send probes to the framework....

You can provide a new ExampleDA.cpp with the changes required to read the values of sensors ?

--
Best,
Zé Carlos

Alberto Gonzalez

unread,
Aug 3, 2011, 5:21:09 AM8/3/11
to dx-comp...@googlegroups.com
Hi

The competition evaluates both how accurate your diagnosis is, but also how expensive is to obtain. This was intended since the beginning. When I generated the data for the first time I didn't have an algorithm to try it with, so I didn't realize the framework was sending all the sensors at once.

/Src/Algs/ExampleDA/ExampleProbeDA.cpp has a probing example.

Alberto

2011/8/3 José Carlos de Campos <zecapi...@googlemail.com>

José Carlos de Campos

unread,
Aug 3, 2011, 6:20:30 AM8/3/11
to dx-comp...@googlegroups.com
Hi,


On Wed, Aug 3, 2011 at 10:21 AM, Alberto Gonzalez <a.gonzal...@tudelft.nl> wrote:
Hi

The competition evaluates both how accurate your diagnosis is, but also how expensive is to obtain. This was intended since the beginning.

Yes, I understand that.

 
When I generated the data for the first time I didn't have an algorithm to try it with, so I didn't realize the framework was sending all the sensors at once.

/Src/Algs/ExampleDA/ExampleProbeDA.cpp has a probing example.

Looking for ExampleProbeDA.cpp I found (as you said yesterday):

// a simple strategy is to query all probe points at the end of the scenario to resolve ambiguity:
CommandSet cs;
cs.insert(Command("probe", Value::v("t1")));
cs.insert(Command("probe", Value::v("t2")));
cs.insert(Command("probe", Value::v("t3")));
// et cetera...
CommandData cd(cs);

and this work very well, but how many inserts we need to conver all sensors (without knowing how many sensors that we have) ?



--
Zé Carlos

Alberto Gonzalez

unread,
Aug 3, 2011, 7:34:04 AM8/3/11
to dx-comp...@googlegroups.com
2011/8/3 José Carlos de Campos <zecapi...@googlemail.com>
Hi,


On Wed, Aug 3, 2011 at 10:21 AM, Alberto Gonzalez <a.gonzal...@tudelft.nl> wrote:
Hi

The competition evaluates both how accurate your diagnosis is, but also how expensive is to obtain. This was intended since the beginning.

Yes, I understand that.

 
When I generated the data for the first time I didn't have an algorithm to try it with, so I didn't realize the framework was sending all the sensors at once.

/Src/Algs/ExampleDA/ExampleProbeDA.cpp has a probing example.

Looking for ExampleProbeDA.cpp I found (as you said yesterday):

// a simple strategy is to query all probe points at the end of the scenario to resolve ambiguity:
CommandSet cs;
cs.insert(Command("probe", Value::v("t1")));
cs.insert(Command("probe", Value::v("t2")));
cs.insert(Command("probe", Value::v("t3")));
// et cetera...
CommandData cd(cs);

and this work very well, but how many inserts we need to conver all sensors (without knowing how many sensors that we have) ?

You know how many, it's both in the system catalog, and in the spectra matrix

for (int i = 1; i <= matrix.n_rows; i++) {
   cs.insert(Command("probe", Value::v("t" + string(i)) ) );  // i'm not sure how to convert int to string, it's just an example
Reply all
Reply to author
Forward
0 new messages