OSDN Git Service

update document
authortama3 <tama3@acee48c3-7b26-0410-bdac-b3d0e5314bbc>
Thu, 11 Oct 2007 09:38:20 +0000 (09:38 +0000)
committertama3 <tama3@acee48c3-7b26-0410-bdac-b3d0e5314bbc>
Thu, 11 Oct 2007 09:38:20 +0000 (09:38 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/stigmata/trunk@249 acee48c3-7b26-0410-bdac-b3d0e5314bbc

src/site/apt/download.apt
src/site/apt/dtd.apt
src/site/apt/experts.apt [deleted file]
src/site/apt/maniac.apt [new file with mode: 0755]
src/site/apt/relaxng.apt
src/site/site.xml

index dfe3e38..bb40544 100755 (executable)
@@ -40,6 +40,8 @@ permissions and limitations under the License.
 \r
  *{{{http://browserlaunch2.sourceforge.net/}BrowserLauncher2}} 1.2 (stigmata-1.1.0 or later; as needed)\r
 \r
+ *{{{http://stax.codehaus.org/}StAX}} 1.0.1 (stigmata-1.2.0 or later)\r
+\r
  *{{{http://www.junit.org/}JUnit}} 4.1\r
 \r
  []\r
index f10d7c8..d9ddf8a 100755 (executable)
@@ -24,50 +24,51 @@ of Stigmata.
 <?xml version="1.0" encoding="euc-jp"?>
 
 <!--
- $Id: stigmata-4.0.dtd 124 2007-06-11 04:22:36Z tama3 $
+ $Id: stigmata-4.0.dtd 225 2007-10-02 06:22:42Z tama3 $
 -->
 
-<!ELEMENT classpath          (#PCDATA)>
+<!ELEMENT classpath               (#PCDATA)>
 
-<!ELEMENT type               (#PCDATA)>
-<!ELEMENT display-name       (#PCDATA)>
-<!ELEMENT description        (#PCDATA)>
-<!ELEMENT extractor          (#PCDATA)>
-<!ELEMENT comparator         (#PCDATA)>
+<!ELEMENT type                    (#PCDATA)>
+<!ELEMENT display-name            (#PCDATA)>
+<!ELEMENT description             (#PCDATA)>
+<!ELEMENT extractor               (#PCDATA)>
+<!ELEMENT comparator              (#PCDATA)>
 
-<!ELEMENT suffix             (#PCDATA)>
-<!ELEMENT prefix             (#PCDATA)>
-<!ELEMENT match              (#PCDATA)>
+<!ELEMENT suffix                  (#PCDATA)>
+<!ELEMENT prefix                  (#PCDATA)>
+<!ELEMENT match                   (#PCDATA)>
 
-<!ELEMENT name               (#PCDATA)>
-<!ELEMENT value              (#PCDATA)>
+<!ELEMENT name                    (#PCDATA)>
+<!ELEMENT value                   (#PCDATA)>
 
-<!ELEMENT criterion          (#PCDATA)>
-<!ELEMENT filter-type        (#PCDATA)>
+<!ELEMENT criterion               (#PCDATA)>
+<!ELEMENT filter-type             (#PCDATA)>
 
-<!ELEMENT exclude            (suffix|prefix|match)>
-<!ELEMENT package            (suffix|prefix|match)>
-<!ELEMENT class-name         (suffix|prefix|match)>
-<!ELEMENT fully-name         (suffix|prefix|match)>
+<!ELEMENT package                 (suffix|prefix|match|not-match)>
+<!ELEMENT class-name              (suffix|prefix|match|not-match)>
+<!ELEMENT fully-name              (suffix|prefix|match|not-match)>
 
-<!ELEMENT wellknown-classes  ((exclude|package|class-name|fully-name)*)>
+<!ELEMENT exclude                 (package|class-name|fully-name)>
+<!ELEMENT wellknown-classes       ((exclude|package|class-name|fully-name)*)>
 
-<!ELEMENT property           (name,value)>
-<!ELEMENT properties         (property*)>
+<!ELEMENT property                (name,value)>
+<!ELEMENT properties              (property*)>
 
-<!ELEMENT birthmark-service  (type,display-name,description?,extractor,comparator)>
-<!ELEMENT birthmark-services (birthmark-service*)>
+<!ELEMENT birthmark-service       (type,display-name,description?,extractor,comparator)>
+<!ELEMENT birthmark-services      (birthmark-service*)>
 
-<!ELEMENT classpath-list     (classpath*)>
+<!ELEMENT classpath-list          (classpath*)>
 
-<!ELEMENT attribute          (name,value)>
-<!ELEMENT attributes         (attribute*)>
-<!ELEMENT filter             (filter-type,criterion,attributes)>
-<!ELEMENT filter-list        (filter*)>
-<!ELEMENT filterset          (name,match,filter-list)>
-<!ELEMENT filterset-list     (filterset*)>
+<!ELEMENT attribute               (name,value)>
+<!ELEMENT attributes              (attribute*)>
+<!ELEMENT filter                  (filter-type,criterion,attributes)>
+<!ELEMENT filter-list             (filter*)>
+<!ELEMENT filterset               (name,match,filter-list)>
+<!ELEMENT filterset-list          (filterset*)>
 
 <!ELEMENT stigmata (birthmark-services,wellknown-classes?,classpath-list?,properties?,filterset-list?) >
+
 ----
 
 {Birthmarking result xml}
@@ -81,7 +82,7 @@ information is shown as xml file formatted in this DTD.
 
 ----
 <!--
-  $Id: birthmark-1.0.dtd 124 2007-06-11 04:22:36Z tama3 $
+  $Id: birthmark-1.0.dtd 245 2007-10-10 01:14:56Z tama3 $
 -->
 
 <!ATTLIST birthmark
@@ -95,9 +96,11 @@ information is shown as xml file formatted in this DTD.
 >
 
 <!ELEMENT type                   (#PCDATA)>
+<!ELEMENT unit                   (#PCDATA)>
+<!ELEMENT birthmark-type         (#PCDATA)>
 <!ELEMENT display-type           (#PCDATA)>
 <!ELEMENT description            (#PCDATA)>
-<!ELEMENT class-name             (#PCDATA)>
+<!ELEMENT name                   (#PCDATA)>
 <!ELEMENT location               (#PCDATA)>
 <!ELEMENT element                (#PCDATA)>
 <!ELEMENT birthmark-similarity   (#PCDATA)>
@@ -107,14 +110,16 @@ information is shown as xml file formatted in this DTD.
 <!ELEMENT birthmark-services     (birthmark-service*)>
 
 <!ELEMENT birthmark              (element*)>
-<!ELEMENT extracted-birthmark    (class-name,location,birthmark)>
-<!ELEMENT extracted-birthmarks   (extracted-birthmark*)>
+<!ELEMENT extracted-birthmark    (name,location,birthmark)>
+<!ELEMENT birthmark-types        (birthmark-type+)>
+<!ELEMENT extracted-birthmarks   (unit,birthmark-types,extracted-birthmark*)>
 
-<!ELEMENT target1                (class-name,location)>
-<!ELEMENT target2                (class-name,location)>
+<!ELEMENT target1                (name,location)>
+<!ELEMENT target2                (name,location)>
 <!ELEMENT birthmark-similarities (birthmark-similarity*)>
 <!ELEMENT comparison-result      (target1,target2,birthmark-similarities,similarity)>
 <!ELEMENT comparison-result-set  (comparison-result*)>
 
-<!ELEMENT birthmark              (birthmark-services?,extracted-birthmarks?,comparison-result-set?)>
+<!ELEMENT birthmark-result-set   ((birthmark-services|extracted-birthmarks|comparison-result-set)+)>
+
 ----
\ No newline at end of file
diff --git a/src/site/apt/experts.apt b/src/site/apt/experts.apt
deleted file mode 100755 (executable)
index 9bc7395..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
- ----\r
- Expert mode\r
- ----\r
- Haruaki Tamada\r
- ----\r
- 2007-06-29\r
- ----\r
-\r
-Comparison Methods\r
-\r
- Let <p> and <q> be a target class files, and <f> be a birthmark\r
-extraction method.  Then, <f(p)> and <f(q)> be a extracted birthmarks\r
-which elements are <(e^p_1, e^p_2, ..., e^p_n)> and <(e^q_1, e^q_2,\r
-..., e^q_m)>.\r
-\r
-*Plain\r
-\r
- Let <L> be a number of matched elements of two birthmarks and same\r
-index.  Then, the similarity of this method is calculated by\r
-\r
- <L> / <(n + m)>\r
-\r
-*Logical AND\r
-\r
- |<f(p) cap f(q)>| / |<f(p)>| |<f(q)>|\r
-\r
-*DP matching\r
-\r
- DP matching method\r
-\r
-*Edit distance\r
-\r
- Edit distance.\r
-\r
-*Cosine similarity\r
-\r
- Using this comparison method, birthmarks must have name and its\r
-frequency.  Therefore, elements of <f(p)> be a set of <(\{name_1,\r
-freq_1\}, \{name_2, freq_2\}, ..., \{name_n, freq_n\})>.\r
-\r
- Next, if <f(p)> have name <FOO> and <f(q)> do not have <FOO>, we add\r
-element <\{FOO, 0\}> to f(q).  Both birthmarks makes to appearing all\r
-names.\r
-\r
- Then, the similarity of <f(p)> and <f(q)>is denoted by\r
-\r
- <norm1 = sqrt(freq^p_1 * freq^p_1 + freq^p_2 * freq^p_2 + ... + freq^p_n * freq^p_n)>\r
-\r
- <norm2 = sqrt(freq^q_1 * freq^q_1 + freq^q_2 * freq^q_2 + ... + freq^q_n * freq^q_n)>\r
-\r
- <product = freq^p_1 * freq^q_1 + freq^p_2 * freq^q_2 + ... + freq^p_n * freq^q_n>\r
-\r
- <similarity = product / (norm1 * norm2)>
\ No newline at end of file
diff --git a/src/site/apt/maniac.apt b/src/site/apt/maniac.apt
new file mode 100755 (executable)
index 0000000..297002e
--- /dev/null
@@ -0,0 +1,92 @@
+ ----\r
+ Maniac mode\r
+ ----\r
+ Haruaki Tamada\r
+ ----\r
+ 2007-06-29\r
+ ----\r
+\r
+Overview\r
+\r
+ Stigmata supports general mode and maniac mode.  I think that\r
+extracting/comparing/analyzing are usually useful in general mode.\r
+However, general mode do not supports tiny changes, for example, we\r
+want to change comparison method, but do not change extracting method.\r
+Maniac mode supports above requests unless programming.  Maniac mode\r
+supports new definition of birthmarks and new definition fo filters\r
+which are filtering comparison result set and viewing extracted\r
+birthmarks.\r
+\r
+Comparison Methods\r
+\r
+ Let <p> and <q> be a target class files, and <f> be a birthmark\r
+extraction method.  Then, <f(p)> and <f(q)> be a extracted birthmarks\r
+which elements are <(e^p_1, e^p_2, ..., e^p_n)> and <(e^q_1, e^q_2,\r
+..., e^q_m)>.\r
+\r
+*Plain\r
+\r
+ Let <L> be a number of matched elements of two birthmarks and same\r
+index.  Then, the similarity of this method is calculated by\r
+\r
+ <L> / <(n + m)>\r
+\r
+*Logical AND\r
+\r
+ |<f(p) cap f(q)>| / |<f(p)>| |<f(q)>|\r
+\r
+*DP matching\r
+\r
+ DP matching method\r
+\r
+*Edit distance\r
+\r
+ Edit distance.\r
+\r
+*Cosine similarity\r
+\r
+ Using this comparison method, birthmarks must have name and its\r
+frequency.  Therefore, elements of <f(p)> be a set of <(\{name_1,\r
+freq_1\}, \{name_2, freq_2\}, ..., \{name_n, freq_n\})>.\r
+\r
+ Next, if <f(p)> have name <FOO> and <f(q)> do not have <FOO>, we add\r
+element <\{FOO, 0\}> to f(q).  Both birthmarks makes to appearing all\r
+names.\r
+\r
+ Then, the similarity of <f(p)> and <f(q)>is denoted by\r
+\r
+ <norm1 = sqrt(freq^p_1 * freq^p_1 + freq^p_2 * freq^p_2 + ... + freq^p_n * freq^p_n)>\r
+\r
+ <norm2 = sqrt(freq^q_1 * freq^q_1 + freq^q_2 * freq^q_2 + ... + freq^q_n * freq^q_n)>\r
+\r
+ <product = freq^p_1 * freq^q_1 + freq^p_2 * freq^q_2 + ... + freq^p_n * freq^q_n>\r
+\r
+ <similarity = product / (norm1 * norm2)>\r
+\r
+Birthmark Store Target\r
+\r
+ Stigmata stores extracted birthmarks to various location.  Latest\r
+version of Stigmata supports memory, xml files, and some database\r
+system for storing extracted birthmarks.  Extracted birthmarks are\r
+recorded to each location excludes memory mode.\r
+\r
+ Features of each store targets are described as follows.  Since each\r
+target has some advantages and disadvantages, you can switch between\r
+targets as necessary.\r
+\r
+ [MEMORY] This target stores extracted birthmarks to the runtime\r
+ memory.  Threfore, no delay for traversing extracted birthmarks, but\r
+ too large jar files causes <<<OutOfMemoryError>>>.\r
+\r
+ [XMLFILE] This target stores extracted birthmarks to xml files.\r
+ Using this target, memory is occupied no large part, because\r
+ extracted birthmarks are created on demand.  However, weak point of\r
+ this target is speed of traversing extracted birthmarks which depends\r
+ file I/O.\r
+\r
+ [DATABASE] This target stores extracted birthmarks to specified\r
+ database system.  Using this target, memory is not occupied, and\r
+ traversing extracted birthmarks are not slow.  However, the cost of\r
+ preparing database system and connecting to stigmata and database\r
+ system is very high.\r
+\r
index 2bc69d7..8c202d5 100755 (executable)
@@ -161,9 +161,7 @@ of Stigmata.
       <zeroOrMore>
         <choice>
           <ref name="exclude"/>
-          <ref name="package"/>
-          <ref name="class-name"/>
-          <ref name="fully-name"/>
+          <ref name="judge-rule"/>
         </choice>
       </zeroOrMore>
     </element>
@@ -181,9 +179,17 @@ of Stigmata.
 
   <define name="exclude">
     <element name="exclude">
-      <ref name="match-type"/>
+      <ref name="judge-rule"/>
     </element>
   </define>
+
+  <define name="judge-rule">
+    <choice>
+      <ref name="package-name"/>
+      <ref name="class-name"/>
+      <ref name="fully-name"/>
+    </choice>
+  </define>
   <define name="package">
     <element name="package">
       <ref name="match-type"/>
@@ -205,6 +211,7 @@ of Stigmata.
       <ref name="prefix"/>
       <ref name="match"/>
       <ref name="suffix"/>
+      <ref name="not-match"/>
     </choice>
   </define>
 
@@ -213,6 +220,11 @@ of Stigmata.
       <data type="string"/>
     </element>
   </define>
+  <define name="not-match">
+    <element name="not-match">
+      <data type="string"/>
+    </element>
+  </define>
   <define name="suffix">
     <element name="suffix">
       <data type="string"/>
@@ -256,11 +268,11 @@ information is shown as xml file formatted in this DTD.
 <grammar xmlns="http://relaxng.org/ns/structure/1.0"
          datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
   <start>
-    <ref name="birthmark"/>
+    <ref name="birthmark-result-set"/>
   </start>
 
-  <define name="birthmark">
-    <element name="birthmark">
+  <define name="birthmark-result-set">
+    <element name="birthmark-result-set">
       <optional>
         <ref name="birthmark-services"/>
       </optional>
@@ -318,6 +330,24 @@ information is shown as xml file formatted in this DTD.
 
   <define name="extracted-birthmarks">
     <element name="extracted-birthmarks">
+      <optional>
+        <element name="unit">
+          <choice>
+            <value>CLASS</value>
+            <value>PACKAGE</value>
+            <value>ARCHIVE</value>
+          </choice>
+        </element>
+      </optional>
+      <optional>
+        <element name="birthmark-types">
+          <oneOrMore>
+            <element name="birthmark-type">
+              <data type="string" />
+            </element>
+          </oneOrMore>
+        </element>
+      </optional>
       <zeroOrMore>
         <ref name="extracted-birthmark"/>
       </zeroOrMore>
@@ -326,7 +356,7 @@ information is shown as xml file formatted in this DTD.
 
   <define name="extracted-birthmark">
     <element name="extracted-birthmark">
-      <element name="class-name">
+      <element name="name">
         <data type="string"/>
       </element>
       <element name="location">
@@ -379,7 +409,7 @@ information is shown as xml file formatted in this DTD.
   </define>
 
   <define name="target">
-    <element name="class-name">
+    <element name="name">
       <data type="string" />
     </element>
     <element name="location">
index 31cdde4..08a4e29 100755 (executable)
@@ -41,6 +41,7 @@
       <item name="DTD"                 href="dtd.html" />
       <item name="Definition"          href="definition.html" />
       <item name="Survey"              href="survey.html"/>
+      <item name="Maniac mode"         href="maniac.html"/>
       <item name="Project Page"        href="http://sourceforge.jp/projects/stigmata/"/>
     </menu>