From 2aa98afd7b9deeb824abfae3feaf2e89be0c7908 Mon Sep 17 00:00:00 2001 From: grammarware Date: Sun, 11 Jul 2010 14:22:12 +0000 Subject: [PATCH] resolved test set looping eternally; added dir structure to web; rolled back unsafe commit to xsd2bgf; fixed xbgf:equate git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@812 ab42f6e0-554d-0410-b580-99e487e6eeb2 --- shared/prolog/xbgf1.pro | 14 ++- shared/prolog/xsd2bgf.pro | 14 +-- topics/transformation/xbgf/Makefile | 18 +-- www/faq.html | 71 ++++++++++++ www/index.html | 168 +++++++++++++++++++++------- 5 files changed, 222 insertions(+), 63 deletions(-) create mode 100644 www/faq.html diff --git a/shared/prolog/xbgf1.pro b/shared/prolog/xbgf1.pro index b7fd9851..6dfee165 100644 --- a/shared/prolog/xbgf1.pro +++ b/shared/prolog/xbgf1.pro @@ -1460,11 +1460,15 @@ unite(N1,N2,G1,G2) % equate(N1,N2,g(Rs1,Ps1),g(Rs2,Ps2)) :- - findN(Ps1,N1,N1Ps1), + splitN(Ps1,N1,N1Ps1,N1Ps1a,N1Ps1b), findN(Ps1,N2,N2Ps), - xbgf1:renameN(N1,N2,g(Rs1,N1Ps1),g(_,N1Ps2)), - checkforidentity(N1Ps2,N2Ps), - xbgf1:unite(N1,N2,g(Rs1,Ps1),g(Rs2,Ps2)). + xbgf1:renameN(N1,N2,g(Rs1,N1Ps1),g(_,N1Ps2)), + require( + (xbgf1:checkforidentity(N1Ps2,N2Ps)), + 'Definitions of nonterminals ~q and ~q must be equal.', + [N1,N2]), + concat([N1Ps1a,N1Ps1b],N1Ps3), + transform(try(xbgf1:renameN_rules(N1,N2)),g(Rs1,N1Ps3),g(Rs2,Ps2)). checkforidentity([],[]). checkforidentity([P1|Ps1],Ps2) @@ -1473,7 +1477,7 @@ checkforidentity([P1|Ps1],Ps2) checkforidentity(Ps1,Ps3). removeproduction(P1,[P2|Ps2],Ps2) :- eqP(P1,P2). -removeproduction(P1,[P2|Ps2],Ps3) :- [P2|removeproduction(P1,Ps2,Ps3)]. +removeproduction(P1,[P2|Ps2],[P2|Ps3]) :- removeproduction(P1,Ps2,Ps3). % % p([l(verticalL)], f, n(l)) diff --git a/shared/prolog/xsd2bgf.pro b/shared/prolog/xsd2bgf.pro index 55ead1b1..dc81d1c6 100644 --- a/shared/prolog/xsd2bgf.pro +++ b/shared/prolog/xsd2bgf.pro @@ -594,14 +594,14 @@ uqImportXsd(SGs1,(Pfx,Ns),G1,G4) SG1 = (S1,_,_), attribute(targetNamespace,S1,Ns), transform(try(delpfx_rules(Pfx)),G1,G2), -% definedNs(G2,Defined1), + definedNs(G2,Defined1), completeXsd(SG1,G3), -% definedNs(G3,Defined2), -% intersection(Defined1,Defined2,Defined3), -% require( -% ( Defined3 == [] ), -% 'XSD import with clashing unqualified names ~q.', -% [Defined3]), + definedNs(G3,Defined2), + intersection(Defined1,Defined2,Defined3), + require( + ( Defined3 == [] ), + 'XSD import with clashing unqualified names ~q.', + [Defined3]), G2 = g(Rs1,Ps1), G3 = g(Rs2,Ps2), union(Rs1,Rs2,Rs3), diff --git a/topics/transformation/xbgf/Makefile b/topics/transformation/xbgf/Makefile index 2bc5bd97..a4304076 100644 --- a/topics/transformation/xbgf/Makefile +++ b/topics/transformation/xbgf/Makefile @@ -1,20 +1,20 @@ build: - cd tests; make build - cd apps; make build - cd ../../fl/lci; make build + cd tests && make build + cd apps && make build + cd ../../convergence/fl && make build rebuild: make clean make build test: - cd apps; make test - cd tests; make test - cd ../../fl/lci; make test + cd apps && make test + cd tests && make test + cd ../../convergence/fl && make test clean: rm -f *~ - cd tests; make clean - cd apps; make clean - cd ../../fl/lci; make clean + cd tests && make clean + cd apps && make clean + cd ../../convergence/fl && make clean diff --git a/www/faq.html b/www/faq.html new file mode 100644 index 00000000..28f65ab7 --- /dev/null +++ b/www/faq.html @@ -0,0 +1,71 @@ + + + + + + Software Language Processing Suite — Frequently Asked Questions + + + +

+ Software Language Processing Suite +
+ Frequently Asked Questions +

+
+
What's the layout of the suite?
+
The topics directory holds all the language processing samples +(aka themes, topics, etc.). Typically, subdirectories of each topic +directory group different "implementations" (aka alternative +approaches, possibly with differing complementary capabilities). The +typical contributor will operate in the directory of one topic, +perhaps only in the directory of one implementation. For instance, the +"fl" topic (fl — Factorial Language) comprises different +implementations of the fl language that cover components such as +parser, pretty printer, evaluator, type checker, and optimizer. There +are different implementations for Java, Haskell, Prolog, and various +language processing technologies. A topic may also hold a "shared" +subdirectory that is meant to hold resources that are reused across +the different implementations. Next to the topics container, +there are also the following directories: www — SLPS web +content; shared — SLPS libraries and infrastructure not +currently assigned to a topic; tools — executable files (such +as scripts) to cover recurring actions in working with SLPS +topics.
+
How to use (install, build, run) the suite?
+
There is no useful way of building or running the suite as a +whole. The different implementations are provided by different people +and rely quite intrinsically on specific libraries and tools that may +require specific effort to get an implementation to work. As a general +rule, each implementation subdirectory of a topic directory should be +documented up to the point that one can build and run it more or less +independently. The use of README files and Makefiles is recommended to +this end. The colllective build and testing of an entire topic (with +several implementations) is often not practical because it would just +require too many third-party libraries and tools to be set up in a +challenging manner.
+
How to become a contributor?
+
Contributors are more than welcome. If you want to become a proper +contributor (with svn access), please submit a short request to the +slps-contributors mailing list or use SourceForge +functionality. Clearly, you need a SourceForge account to be a +contributor. This project uses the BSD license. If you merely want to +discuss issues with existing examples or just offer a quick fix or the +sketch of a new example, then please consider using one of the mailing +lists identified above.
+
+
+ + + + + + + + + diff --git a/www/index.html b/www/index.html index 0f47e56b..70f5fe22 100644 --- a/www/index.html +++ b/www/index.html @@ -4,7 +4,7 @@ Software Language Processing Suite - +

@@ -38,6 +38,9 @@

Pages

  • Java grammars link repository
  • +
  • + FAQ (outdated) +
  • Links


    -

    FAQ

    +

    Structure

    -
    What's the layout of the suite?
    -
    The topics directory holds all the language processing samples -(aka themes, topics, etc.). Typically, subdirectories of each topic -directory group different "implementations" (aka alternative -approaches, possibly with differing complementary capabilities). The -typical contributor will operate in the directory of one topic, -perhaps only in the directory of one implementation. For instance, the -"fl" topic (fl — Factorial Language) comprises different -implementations of the fl language that cover components such as -parser, pretty printer, evaluator, type checker, and optimizer. There -are different implementations for Java, Haskell, Prolog, and various -language processing technologies. A topic may also hold a "shared" -subdirectory that is meant to hold resources that are reused across -the different implementations. Next to the topics container, -there are also the following directories: www — SLPS web -content; shared — SLPS libraries and infrastructure not -currently assigned to a topic; tools — executable files (such -as scripts) to cover recurring actions in working with SLPS -topics.
    -
    How to use (install, build, run) the suite?
    -
    There is no useful way of building or running the suite as a -whole. The different implementations are provided by different people -and rely quite intrinsically on specific libraries and tools that may -require specific effort to get an implementation to work. As a general -rule, each implementation subdirectory of a topic directory should be -documented up to the point that one can build and run it more or less -independently. The use of README files and Makefiles is recommended to -this end. The colllective build and testing of an entire topic (with -several implementations) is often not practical because it would just -require too many third-party libraries and tools to be set up in a -challenging manner.
    -
    How to become a contributor?
    -
    Contributors are more than welcome. If you want to become a proper -contributor (with svn access), please submit a short request to the -slps-contributors mailing list or use SourceForge -functionality. Clearly, you need a SourceForge account to be a -contributor. This project uses the BSD license. If you merely want to -discuss issues with existing examples or just offer a quick fix or the -sketch of a new example, then please consider using one of the mailing -lists identified above.
    +
    topics
    +
    +
    +
    fl
    +
    + The Factorial Language that is used in the SLPS for prototyping various tools + and approaches. Every subdirectory there is a different implementation of FL: + Java, Haskell, Prolog, etc. +
    +
    convergence
    +
    + Grammar convergence scenarios: Factorial Language, Java Language Specification, etc. +
    +
    extraction
    +
    + Grammar extractors. +
    +
    recovery
    +
    + Grammar recovery attempts that go beyond simple extraction: Grammar Recovery Kit, C#, etc. +
    +
    grammars
    +
    + Extracted grammars that form the SLPS Zoo. + Java grammars are also located here. +
    +
    metasyntax
    +
    + BNF-like Grammar Format definitions and similar topics. Work in progress. +
    +
    presentation
    +
    + Mappers from BGF to elsewhere: pretty-printers, grammar analyses, metrics, normalisations, etc. +
    +
    transformation
    +
    + Grammar transformation and language document transformation, complete with test sets. +
    +
    exercises
    +
    + Lab exercises for the course Programming Paradigms and Formal Semantics. +
    +
    documentation
    +
    + Files needed for Language Documentation. +
    +
    documents
    +
    + Language documents. Work in progress. +
    +
    NielsonN07
    +
    + Some encodings of semantics derived from Nielson and Nielson, 2007 (and prior versions). + In particular, the denotational semantics of While language. +
    +
    while
    +
    + While language. Outdated. +
    +
    apimigration
    +
    + API migration. Work in progress. +
    +
    java
    +
    + Outdated. +
    +
    +
    +
    shared
    +
    +
    +
    xsd
    +
    + XML Schema definitions for various DSLs used in SLPS: BTF, BGF, XBGF, LDF, XLDF, LCF, etc. +
    +
    xsl
    +
    + eXtensible Stylesheet Language transformations for mappers and extractors. + Mostly populated with BGF-to-elsewhere mappings, but also Ecore-to-BGF, TXL-to-BGF and LDF-to-elsewhere ones are found here. +
    +
    prolog
    +
    + Prolog sources for some extractors and for the XBGF engine (as well as any other future Prolog sources). +
    +
    python
    +
    + Python sources for many different SLPS tools, of which the most interesting ones are perhaps LCI and XLDF. +
    +
    tools
    +
    + Shell scripts that wrap SLPS tools in a user-friendly way. People who use SLPS frequently are advised to + add this directory to their system PATH. +
    +
    generators
    +
    + Shell wrappers for BGF-to-XBGF generators. +
    +
    wrappers
    +
    + Shell wrappers for running parsers and evaluators in order to generalize + their interface for the LCI. These wrappers are rarely, if ever, executed by a human. +
    +
    edd
    +
    + EBNF Dialect Definitions. Work in progress. +
    +
    +
    +
    download
    +
    + Automated installers for third party software which is needed for SLPS stuff to work. + ANTLR, FOP, JastAdd, MSV, ElementTree, GDK, PyParsing, etc. +
    +
    www
    +
    + Web content for this page, the FAQ, the Zoo, the XBGF manual, etc. + The makefile is configured to be easily used by VZ + and RL, so it seems + more reasonable to contact one of them if you want anything changed there. +