Commit Graph

8 Commits

Author SHA1 Message Date
Julien Fischer
66c5c80fc6 Address review comments.
test/hard_coded/write_xml.m:
    Document why the output differs between the low- and high-level C backends.

    Fix odd argument ordering.

tests/hard_coded/write_xml.exp*:
    Conform to the above change.
2019-10-16 21:14:13 +11:00
Julien Fischer
88c16bcfa4 Handle all builtin types in library/term_to_xml.m.
library/term_to_xml.m:
    As above, this module had not been updated to cover the new builtin
    integer types.

tests/hard_coded/write_xml.{m,exp,exp2}:
    Extend this test case to cover the new integer types.

    Document what the expected outputs correspond to.
2019-10-16 17:35:14 +11:00
Zoltan Somogyi
3d7f0cc82b Fix a test case failure in grade hlc.gc.
tests/hard_coded/write_xml.exp2:
    On jun 10, I fixed write_xml.exp for the change to add details
    to foreign types, but in hlc grades, the relevant expected output file
    is write_xml.exp2. Make the same update in that file as well.
2015-07-22 10:47:27 +10:00
Ian MacLarty
aaaca1c672 Fix failing test cases in hlc grades.
tests/hard_coded/write_reg1.exp3:
tests/hard_coded/write_xml.exp2:
    Conform to recent changes in the way floats are printed.
2010-07-26 03:31:11 +00:00
Julien Fischer
1092a9e37f Fix failing test cases in hlc grades.
Estimated hours taken: 0.1
Branches: main

Fix failing test cases in hlc grades.

tests/hard_coded/deconstruct_arg.exp2:
tests/hard_coded/write_reg1.exp3:
tests/hard_coded/write_xml.exp2:
	Conform to the new way in which floats are printed.
2007-02-22 05:35:31 +00:00
Mark Brown
0731932d14 Construct strings representing c_pointer addresses.
Estimated hours taken: 2
Branches: main

runtime/mercury_ml_expand_body.h:
	Construct strings representing c_pointer addresses.  Used in the
	implementation of functor and deconstruct.

library/deconstruct.m:
	Document the behaviour of functor and deconstruct for c_pointers.

library/string.m:
	Export c_pointer_to_string for getting a string representation
	of the pointer address.

library/io.m:
library/rtti_implementation.m:
	Use c_pointer_to_string/1 to print c_pointers.

	Update comments.

library/pprint.m:
	Undo Ralph's earlier change, since it is no longer required.

tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
	Canonicalize the output of test cases in which c_pointers appear.

tests:
	Update the expected output of test cases.
2006-08-22 02:33:54 +00:00
Ian MacLarty
3d2a216480 In term_to_xml check that no functor arguments are existentially typed when
Estimated hours taken: 1
Branches: main

In term_to_xml check that no functor arguments are existentially typed when
requested to generate a DTD.

Include field name attribute in generated XML.

library/term_to_xml.m
	Use construct.get_functor to check that no functors of a type have
	existentially typed arguments before generating a DTD for the type.  If
	there are existentially typed arguments then report this fact.

	Set the field name attribute in generated XML.  This previously didn't
	work for existentially typed functor arguments, because of a bug in the
	rtti, which has now been fixed (thanks to Zoltan).

	Use `.' as module qualifier.

tests/hard_coded/write_xml.exp
tests/hard_coded/write_xml.exp2
tests/hard_coded/write_xml.m
	Test attempt to generate a DTD for a functor with an existentially
	typed argument.  Test reporting of field name for an existentially
	typed functor argument.
2004-12-15 04:40:24 +00:00
Ian MacLarty
87aa5d01b9 Allow custom functor to element mappings in term_to_xml library.
Estimated hours taken: 15
Branches: main

Allow custom functor to element mappings in term_to_xml library.

Disable setting of the `field' attribute in generated XML until a bug in the
runtime system has been fixed.  The bug causes a seg fault when
construct.get_functor is called on a functor with an existentially quantified
argument type.

Add a check to see if a DTD can be generated for a type under a custom mapping
scheme.  This involves checking that the mapping scheme does not generate the
same element for any two distinct functors that could appear in ground terms of
the type.

Also do not generate DTDs for types other than discriminated unions, arrays,
strings, ints, characters and floats since we cannot predict what the children
will be for other types (e.g. curried preds).  Note that XML can still
be generated for any type deconstruct.deconstruct/5 can handle.

NEWS
	Mention term_to_xml module.

extras/xml_stylesheets/xul_tree.xsl
	Hide the field name by default (since we don't populate this attribute
	at the moment).

	Fix a bug where quotes were not being printed around strings.

	The `typename' attribute has now become simply `type'.

library/term_to_xml.m
	Allow custom functor to element mappings and include two predefined
	mappings.

	Do not call construct.get_functor when writing out an XML document so
	that the previously mentioned runtime bug doesn't bite.  This line of
	code just needs to be uncommented - the line is responsible for getting
	the field names of the arguments of a functor.

	Check that a mapping scheme cannot assign the same element to
	two different functors when a DTD is requested.

tests/hard_coded/write_xml.m
tests/hard_coded/write_xml.exp
	Test custom and predefined mapping schemes.
2004-12-10 09:44:24 +00:00