The attached model hierarchy causes a segfault when using the CellML2C application (built on a Fedora Core 5 machine) with the import-test.xml model. The problem is the messed up encapsulation hierarchy in m1.xml - if the parent component is changed from x -> y (as it should be) then the expected code is generated.

(This example is definitely a bug in the model, but is probably good to catch segfaults where possible).

Andrew Miller wrote:
Hi all,

The fourth release candidate for CellML API, version 1.0, has been
released. If you would like to ensure that your application works with
the CellML API 1.0 release, please test against the release candidate.
Once a reasonable amount of time has elapsed, and no problems with the
release candidate are identified, the API will be released. Please
report any bugs you find at http://www.cellml.org/tools/api/api_tracker,
or to this list, or directly to [EMAIL PROTECTED]

Note that no interfaces have changed between 1.0rc3 and 1.0rc4, although the test-cases have been improved, so they will not spuriously fail on Intel Mac OS X systems, and the CellML Integration Service now works correctly on Mac OS X platforms.

You can download the source code for the CellML API 1.0rc4 from http://www.cellml.org/downloads/cellml_api/releases/1.0rc4

Best regards,
Andrew Miller

_______________________________________________
cellml-discussion mailing list
[email protected]
http://www.cellml.org/mailman/listinfo/cellml-discussion

--
David Nickerson, PhD
Research Fellow
Division of Bioengineering
Faculty of Engineering
National University of Singapore
Email: [EMAIL PROTECTED]
<?xml version="1.0" encoding="iso-8859-1"?>

<model
    name="import_test"
    xmlns="http://www.cellml.org/cellml/1.1#";
    xmlns:cellml="http://www.cellml.org/cellml/1.1#";
    xmlns:xlink="http://www.w3.org/1999/xlink";>

  <import xlink:href="m1.xml">
    <component name="x" component_ref="y"/>
  </import>
  
  <component name="y">
    <variable name="bob" private_interface="in" units="dimensionless"/>
  </component>

  <connection>
    <map_components component_1="x" component_2="y"/>
    <map_variables variable_1="bob" variable_2="bob"/>
  </connection>
</model>
<?xml version="1.0" encoding="iso-8859-1"?>

<model
    name="m1"
    xmlns="http://www.cellml.org/cellml/1.1#";
    xmlns:cellml="http://www.cellml.org/cellml/1.1#";
    xmlns:xlink="http://www.w3.org/1999/xlink";>

  <import xlink:href="m2.xml">
    <component name="z" component_ref="x"/>
  </import>
  
  <component name="y">
    <variable name="bob" private_interface="in" public_interface="out" units="dimensionless"/>
  </component>
  
  <group>
    <relationship_ref relationship="encapsulation"/>
    <component_ref component="x">
      <component_ref component="z"/>
    </component_ref>
  </group>
  
  <connection>
    <map_components component_1="z" component_2="y"/>
    <map_variables variable_1="bob" variable_2="bob"/>
  </connection>

</model>
<?xml version="1.0" encoding="iso-8859-1"?>

<model
    name="m2"
    xmlns="http://www.cellml.org/cellml/1.1#";
    xmlns:cellml="http://www.cellml.org/cellml/1.1#";
    xmlns:xlink="http://www.w3.org/1999/xlink";>

  <component name="x">
    <variable name="bob" initial_value="1.0" units="dimensionless"/>
  </component>
  
  <component name="a"/>

  <group>
    <relationship_ref relationship="encapsulation"/>
    <component_ref component="x">
      <component_ref component="a"/>
    </component_ref>
  </group>

</model>
_______________________________________________
cellml-discussion mailing list
[email protected]
http://www.cellml.org/mailman/listinfo/cellml-discussion

Reply via email to