1. I've been trying to get the parser to do something akin to fUZZ's %%unchecked directive. After a bit of guessing and reading source and CadiZ documentation :-) I discovered that \begin{schema*} will do what I want. However, this comes at the cost of being incompatible with fuzz.sty, zed.sty etc. which use {schema*} to typeset a schema with no name. That's a bit unfortunate; I'm not sure what to suggest should be done about it -- though I would have thought that supporting fUZZ mark-up was desirable.
2. My specification uses bags, but the supplied mathematical toolkit doesn't support these. If I construct a bag section by analogy with the seq section, is it easy to incorporate it?
Cheers
Andrew.
😄
1
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Most of the Fuzz directives have been superceded
by an alternative construct in the Z standard (esp.
operator templates). But, there does not seem
to be an direct replacement for %%unchecked.
In the first release of CZT, we are aiming to be
as strictly compatible with the Z standard as possible,
so have not yet given a lot of consideration to
supporting older Z extensions or variants like fuzz
-- we think that a small amount of rewriting will
be inevitable for virtually all existing Z specs
-- if only to rewrite S' as S~' :-)
Having said that, it is actually easy to get the effect
that you want, in LaTeX input. The CZT tools will
ignore any paragraph they do not recognise,
so just define \begin{foo}...\end{foo} (or any
other name you want, and it will be ignored!
For example, something like:
\newcommand{uncheckedschema}{\schema}{\endschema}
[Note: don't use \begin{schema} inside the macro
defn, because, as the Z standard requires, it will be
parsed as the beginning of a schema!]
will allow you to write
\begin{uncheckedschema}{Temp}
...
\end{uncheckedschema}
and have it typeset exactly the same as a schema,
but ignored by CZT (actually, treated as informal
commentary).
2. Adding new toolkits, like bags.
In theory, this should be just a matter of creating
bag_toolkit.tex and putting it in the appropriate directory (parser/lib).
However, the contents of that directory are currently
preloaded into the CZT jar files, so it will probably
be necessary to recompile the parser before this
works. [I have not tested this, so it is possible
that there are other setup steps required too, but
I hope not.]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> In the first release of CZT, we are aiming to be
> as strictly compatible with the Z standard as possible,
Of course; that's a sensible goal (would that this had happened in parallel with the standards activity! I might have managed to prevent the S~' thing...)
> so have not yet given a lot of consideration to
> supporting older Z extensions or variants like fuzz
To quite a lot of people, fUZZ *is* the way to write Z; having them on board will help bring tools to maturity. I might think about constructing a pre-processor... If I were feeling brave, I'd try to contribute a patch to make a `-fuzz' parser option, but I think that would be beyond me at present.
> Having said that, it is actually easy to get the
> effect that you want, in LaTeX input.
D'oh. I was rather dim there. Yes, of course.
> [Note: don't use \begin{schema} inside the macro
> defn, because, as the Z standard requires, it will be
> parsed as the beginning of a schema!]
Not if I put it into a style file :-).
> 2. Adding new toolkits, like bags.
Presumably I can declare another section and make it a parent explicitly? How are sections searched for?
Thanks
Andrew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> Presumably I can declare another section and make it a parent explicitly?
Right.
> How are sections searched for?
The so called section manager is responsible for finding sections. In theory, the section manager looks for files with the same name as the section and parses it---but this feature is not yet implemented. I am planning to implement it within the next few weeks.
Currently, only toolkit sections can be found automatically. These are located in the parser/lib directory and will be packed into the jar file when the parser is build. You can try to put your bag section into this directory (the file name should be the same as the section name and should have the ending .tex if it is a latex file). Then rebuild the parser and it should work---let me know if it doesn't.
Hope that helps,
Petra
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Sorry for a long period of silence. Now:
1. I've been trying to get the parser to do something akin to fUZZ's %%unchecked directive. After a bit of guessing and reading source and CadiZ documentation :-) I discovered that \begin{schema*} will do what I want. However, this comes at the cost of being incompatible with fuzz.sty, zed.sty etc. which use {schema*} to typeset a schema with no name. That's a bit unfortunate; I'm not sure what to suggest should be done about it -- though I would have thought that supporting fUZZ mark-up was desirable.
2. My specification uses bags, but the supplied mathematical toolkit doesn't support these. If I construct a bag section by analogy with the seq section, is it easy to incorporate it?
Cheers
Andrew.
1. Fuzz's %%unchecked directive.
Most of the Fuzz directives have been superceded
by an alternative construct in the Z standard (esp.
operator templates). But, there does not seem
to be an direct replacement for %%unchecked.
In the first release of CZT, we are aiming to be
as strictly compatible with the Z standard as possible,
so have not yet given a lot of consideration to
supporting older Z extensions or variants like fuzz
-- we think that a small amount of rewriting will
be inevitable for virtually all existing Z specs
-- if only to rewrite S' as S~' :-)
Having said that, it is actually easy to get the effect
that you want, in LaTeX input. The CZT tools will
ignore any paragraph they do not recognise,
so just define \begin{foo}...\end{foo} (or any
other name you want, and it will be ignored!
For example, something like:
\newcommand{uncheckedschema}{\schema}{\endschema}
[Note: don't use \begin{schema} inside the macro
defn, because, as the Z standard requires, it will be
parsed as the beginning of a schema!]
will allow you to write
\begin{uncheckedschema}{Temp}
...
\end{uncheckedschema}
and have it typeset exactly the same as a schema,
but ignored by CZT (actually, treated as informal
commentary).
2. Adding new toolkits, like bags.
In theory, this should be just a matter of creating
bag_toolkit.tex and putting it in the appropriate directory (parser/lib).
However, the contents of that directory are currently
preloaded into the CZT jar files, so it will probably
be necessary to recompile the parser before this
works. [I have not tested this, so it is possible
that there are other setup steps required too, but
I hope not.]
> In the first release of CZT, we are aiming to be
> as strictly compatible with the Z standard as possible,
Of course; that's a sensible goal (would that this had happened in parallel with the standards activity! I might have managed to prevent the S~' thing...)
> so have not yet given a lot of consideration to
> supporting older Z extensions or variants like fuzz
To quite a lot of people, fUZZ *is* the way to write Z; having them on board will help bring tools to maturity. I might think about constructing a pre-processor... If I were feeling brave, I'd try to contribute a patch to make a `-fuzz' parser option, but I think that would be beyond me at present.
> Having said that, it is actually easy to get the
> effect that you want, in LaTeX input.
D'oh. I was rather dim there. Yes, of course.
> [Note: don't use \begin{schema} inside the macro
> defn, because, as the Z standard requires, it will be
> parsed as the beginning of a schema!]
Not if I put it into a style file :-).
> 2. Adding new toolkits, like bags.
Presumably I can declare another section and make it a parent explicitly? How are sections searched for?
Thanks
Andrew
> Presumably I can declare another section and make it a parent explicitly?
Right.
> How are sections searched for?
The so called section manager is responsible for finding sections. In theory, the section manager looks for files with the same name as the section and parses it---but this feature is not yet implemented. I am planning to implement it within the next few weeks.
Currently, only toolkit sections can be found automatically. These are located in the parser/lib directory and will be packed into the jar file when the parser is build. You can try to put your bag section into this directory (the file name should be the same as the section name and should have the ending .tex if it is a latex file). Then rebuild the parser and it should work---let me know if it doesn't.
Hope that helps,
Petra