<?php
/*
  File: glossary.php

  Usage:
    glossary.php
      Displays full glossary of terms.

    glossary.php#TERM
      Displays full glossary of terms, jumping to TERM (if available).

    glossary.php?term=TERM
      Displays definition of single TERM (if available).

    Note: TERM is case-sensitive and should contain underscores (_) instead of spaces.
*/

/* Include common functions */
require('common.php');

/* Regular expression constants for replacing glossary links */
define('LINK_REGEX', '/<g(?: term="([^"]*)")?>([^<]*)<\/g>/e');
define('REPL_REGEX_ALL', "'<a class=\"term\" href=\"#'.str_replace(' ','_',('\$1'?'\$1':'\$2')).'\" title=\"Look up: '.('\$1'?'\$1':'\$2').'\">\$2</a>'");
define('REPL_REGEX_SINGLE', "'<a class=\"term\" href=\"glossary.php?term='.str_replace(' ','_',('\$1'?'\$1':'\$2')).'\" title=\"Look up: '.('\$1'?'\$1':'\$2').'\">\$2</a>'");

/* Get term, if any */
$term = str_replace('_', ' ', $HTTP_GET_VARS['term']);

$first_letter = $term ? strtoupper($term{0}) : ''; /* First letter of term */
$all = $term ? false : true; /* Should all terms be displayed? */
$found = false; /* Has a definition been found? */

/* Print page header */
if($all) {
  print_page_header('Glossary');

  echo <<<HEADER
<h1>Glossary</h1>
<h2>Conventions</h2>
<ul>
  <li>Entries marked [Peirce] are terms used by Charles Sanders <a class="term" href="#Peirce" title="Look up: Pierce">Peirce</a>.</li>
  <li>Entries marked [Saussure] are terms used by Ferdinand de <a class="term" href="#Saussure" title="Look up: Saussure">Saussure</a>.</li>
  <li>Entries marked [alg. sem.] are terms in the theory of <a class="term" href="#algebraic_semiotics" title="Look up: algebraic semiotics">algebraic</a> (as opposed to <a class="term" href="#classical_semiotics" title="Look up: classical semiotics">classical</a>) <a class="term" href="#semiotics" title="Look up: semiotics">semiotics</a>.</li>
  <li>Links marked [CD] refer to entries in the <a href="http://www.helsinki.fi/science/commens/dictionary.html">Commens Dictionary of Peirce's Terms</a>.</li>
  <li>Links marked [S4B] refer to entries in the <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html">glossary</a> of <a href="http://www.aber.ac.uk/media/Documents/S4B/semiotic.html">Semiotics for Beginners</a> by Daniel Chandler.</li>
</ul>
HEADER;

  /* Print index */
  echo '<a name="index"></a><p id="index">[ ';
  for($i = 65; $i < 90; $i++) {
    echo '<a href="#', chr($i), '">', chr($i), '</a> | ';
  }
  echo "<a href=\"#Z\">Z</a> ]</p>\n";
}
else {
  print_page_header("Glossary: $term", false);
}

/************************************* A **************************************/

if($all || $first_letter == 'A') {
  print_letter_header('A');

$t = 'affective computing';
$d = <<<DEF
A future trend in computing in which computers appear to have emotions, and can sense user emotions. See also: <g>autonomic computing</g>, <g>convergence</g>, <g>ubiquitous computing</g>.
DEF;
$l = array(
'<a href="http://www.bartneck.de/link/affective_portal.html">Affective Computing Portal</a>',
'<a href="http://affect.media.mit.edu/">Affective Computing</a> at MIT Media Lab'
);
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'affordance';
$d = <<<DEF
A relationship between an actor (i.e., person or animal) and an object; specifically, it refers to the possibility of the actor performing some action with the object, <em>whether or not</em> the actor can perceive that possibility. This term was introduced in J.J. Gibson's theory of ecological psychology, and later popularized (and misused) in Donald A. Norman's <u>The Psychology of Everyday Things</u>. See also: <g>perceived affordance</g>.
DEF;
$l = array(
'More on <a href="affordances.php">Affordances</a>',
'<a href="http://www.undergrad.ahs.uwaterloo.ca/~ewalkom/gibson.htm">Gibson\'s Definition</a> of affordance'
);
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'algebraic semiotics';
$d = <<<DEF
The theory of <g term="sign">signs</g> as mathematical entities within formal <g term="sign system">sign systems</g>. In algebraic semiotics, a sign exists in a <g>semiotic space</g>, is of a <g>sort</g>, is generated by a <g>constructor</g>, and satisfies all applicable <g term="axiom">axioms</g> in the sign system of which it is a part. A mapping from one sign system to another is called a <g>semiotic morphism</g>. See also: <g>semiotics</g>.
DEF;
$l = array(
'<a href="http://www.cs.ucsd.edu/users/goguen/projs/semio.html">Algebraic Semiotics Homepage</a>'
);
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'analytic';
$d = <<<DEF
[alg. sem.] Concerning the deduction of the intended meaning of actual <g term="sign">signs</g>; the opposite of <g>synthetic</g>. <g term="classical semiotics">Classical semiotics</g> is analytic.
DEF;
$l = array();
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'attribute';
$d = <<<DEF
[alg. sem.] A function or predicate defined on <g term="sign">signs</g> of a certain <g>sort</g>. For example, an attribute of a graphical object might be its location within the computer display; such a function might return X and Y coordinates.
DEF;
$l = array();
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'autonomic computing';
$d = <<<DEF
A future trend in computing, inspired by the functioning of the human nervous system, in which computers are autonomous, self-repairing, <g term="transparency">transparent</g>, and <g term="ubiquitous computing">ubiquitous</g>. See also: <g>affective computing</g>, <g>convergence</g>.
DEF;
$l = array(
'<a href="http://www.ibm.com/autonomic/">Autonomic Computing</a> at IBM'
);
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'axiom';
$d = <<<DEF
[alg. sem.] A logical formula, built from <g term="constructor">constructors</g> and <g term="attribute">attributes</g>, that constrains the set of possible <g term="sign">signs</g> in a given <g>sign system</g>.
DEF;
$l = array();
  if($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* B **************************************/

if ($all || $first_letter == 'B') {
  print_letter_header('B');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* C **************************************/

if ($all || $first_letter == 'C') {
  print_letter_header('C');

$t = 'classical semiotics';
$d = <<<DEF
The field of study, developed by <g>Peirce</g> and <g>Saussure</g>, dealing with deducing the meaning of <g term="sign">signs</g>. See also: <g>semiotics</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'cognitive psychology';
$d = <<<DEF
Area of psychology dealing with human cognitive processes; includes topics such as attention, perception, pattern recognition, memory, decision making, thinking, and problem solving.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'constructor';
$d = <<<DEF
[alg. sem.] A function that builds new <g term="sign">signs</g> of a given <g>sort</g>. A constructor can have parameters of any kind, including other signs. For example, a constructor for a <g>GUI</g> window might have parameters specifying the menus it will contain, and so on.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'convergence';
$d = <<<DEF
A future trend in computing in which computers merge with communications. See also: <g>affective computing</g>, <g>autonomic computing</g>, <g>ubiquitous computing</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'conversation analysis';
$d = <<<DEF
A technique in <g>ethnomethodology</g> for studying how conversations are used in interaction, and how this brings about social organization.
DEF;
$l = array(
'<a href="http://www-staff.lboro.ac.uk/~ssca1/sitemenu.htm">An Introduction to Conversation Analysis</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* D **************************************/

if ($all || $first_letter == 'D') {
  print_letter_header('D');

$t = 'denotation';
$d = <<<DEF
Synonym for <g>object</g> or <g>signified</g>. See also: <g>referent</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'design space';
$d = <<<DEF
[alg. sem.] A <g>semiotic space</g> of possible designs, generally constrained by the limitations of the <g>medium</g> in which the design is expressed. The "output" of a <g>semiotic morphism</g> is a <g>sign system</g> that describes <g term="sign">signs</g> in the design space.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'diagram';
$d = <<<DEF
[Peirce] See <g>diagrammatic icon</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/diagram.html">diagram</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'diagrammatic icon';
$d = <<<DEF
[Peirce] An <g>icon</g> that shares geometrical structure with what it represents. See also: <g>diagram</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'diagrammatic iconic';
$d = <<<DEF
[Peirce] Relating to or having the characteristics of a <g>diagrammatic icon</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'display sign';
$d = <<<DEF
[alg. sem.] A <g>sign</g> in the <g>design space</g> that presumably represents a <g>source sign</g> in the <g>source space</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* E **************************************/

if ($all || $first_letter == 'E') {
  print_letter_header('E');

$t = 'ergonomics';
$d = <<<DEF
The study of the relationship between people and their working environment. Keeping in mind that different people possess different physical capabilities, its two principles are: fitting the person to the job, and fitting the job to the person.
DEF;
$l = array(
'<a href="http://www.ergonomics.org.uk/">The Ergonomics Society</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'ethnomethodology';
$d = <<<DEF
The field of study, founded by the American sociologist Harold Garfinkel in the early 1960s, that investigates the ways in which people make sense of their social world; uses <g>conversation analysis</g> as one of its primary tools.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* F **************************************/

if ($all || $first_letter == 'F') {
  print_letter_header('F');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* G **************************************/

if ($all || $first_letter == 'G') {
  print_letter_header('G');

$t = 'genre';
$d = <<<DEF
A <g>sign system</g> (in the sense of <g>classical semiotics</g>) delimited by a collection of conventions for using a <g>medium</g>. For example, the graphical conventions of familiar <g term="GUI">GUIs</g> constitute a genre within the medium of computer displays.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'GUI';
$d = <<<DEF
Acronym for Graphical User Interface. Pronounced "gooey".
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* H **************************************/

if ($all || $first_letter == 'H') {
  print_letter_header('H');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* I **************************************/

if ($all || $first_letter == 'I') {
  print_letter_header('I');

$t = 'icon';
$d = <<<DEF
[Peirce] A "<g>sign</g> which refers to the <g>Object</g> that it denotes merely by virtue of characters of its own ... such as a lead-pencil streak as representing a geometrical line." See also: <g>index</g>, <g>symbol</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/icon.html">icon</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'iconic';
$d = <<<DEF
[Peirce] Relating to or having the characteristics of an <g>icon</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#iconic">iconic</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'iconicity';
$d = <<<DEF
[Peirce] The property of being an <g>icon</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'index';
$d = <<<DEF
[Peirce] A <g>sign</g> in which the <g>representamen</g> X is regularly connected to the <g>object</g> Y in the sense "that always or usually when there is an X, there is also a Y in some more or less exactly specifiable spatio-temporal relation to the X in question". A typical example is smoke as an index for fire. See also: <g>icon</g>, <g>symbol</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/index2.html">index</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'indexical';
$d = <<<DEF
[Peirce] Relating to or having the characteristics of an <g>index</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#indexical">indexical</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'indexicality';
$d = <<<DEF
[Peirce] The property of being an <g>index</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'interpretant';
$d = <<<DEF
[Peirce] The mental effect of a <g>sign</g> on its interpreter; the sense made of the sign. See also: <g>semiotic triad</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/interpretant.html">interpretant</a>',
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#interpretant">interpretant</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'iterative design';
$d = <<<DEF
A design process with the following structure: 1) complete a portion of your design; 2) subject the completed portions of your design to user testing; 3) make changes to your design based on the user feedback; and 4) repeat steps 1-3 until done.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* J **************************************/

if ($all || $first_letter == 'J') {
  print_letter_header('J');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* K **************************************/

if ($all || $first_letter == 'K') {
  print_letter_header('K');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* L **************************************/

if ($all || $first_letter == 'L') {
  print_letter_header('L');

$t = 'level';
$d = <<<DEF
[alg. sem.] A set of <g term="sort">sorts</g> at the same "tree depth" within a <g>semiotic space</g>. Sorts at a given level are constructed in terms of lower (or possibly the same, but not higher) levels. In modern <g term="GUI">GUIs</g>, for example, one might take the entire display as the highest level sort, constructed perhaps from a background, windows, menus, icons, and a pointer, each of which is constructed from yet lower-level sorts, and so on. See also: <g>constructor</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* M **************************************/

if ($all || $first_letter == 'M') {
  print_letter_header('M');

$t = 'medium';
$d = <<<DEF
A substrate for the transmission of <g term="sign">signs</g>, characterized by dimensions within which signs can vary. For example, a standard computer display is a two-dimensional surface with a grid of individually manipulable pixels; the illumination of each pixel is usually specified by a three-dimensional vector of values for red, green, and blue color brightness.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* N **************************************/

if ($all || $first_letter == 'N') {
  print_letter_header('N');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* O **************************************/

if ($all || $first_letter == 'O') {
  print_letter_header('O');

$t = 'object';
$d = <<<DEF
[Peirce] What a <g>sign</g> refers to, stands for, or represents. See also: <g>semiotic triad</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/object.html">object</a>',
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#object">object</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* P **************************************/

if ($all || $first_letter == 'P') {
  print_letter_header('P');

$t = 'Peirce';
$d = <<<DEF
Pronounced "purse"; Charles Sanders Peirce (1839-1914) was an American philosopher, logician, and scientist. Peirce is known for being the primary founder of pragmatism, and the source of <g>semiotics</g> as a general theory of <g>representation</g> and interpretation.
DEF;
$l = array(
'<a href="http://www.helsinki.fi/science/commens/index.html">Commens: Peirce Studies Site</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'perceived affordance';
$d = <<<DEF
An <g>affordance</g> that an actor perceives as existing, <em>whether or not</em> that is actually the case. In <g>UID</g>, "real" affordances should map to perceived affordances as much as possible.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'priority';
$d = <<<DEF
[alg. sem.] A partial ordering based on importance. If one <g>constructor</g> constructs the most important <g term="sign">signs</g> of a given <g>sort</g>, we call it the primary constructor for that sort. There may be other constructors with less priority, but constructors may also have equal priority (which is why in general the ordering is only partial). For example, there may be several constructors for text elements in a window; in particular, one whose parameters are capitalized words and whose value is a title might have higher priority than certain others because it constructs relatively more important signs.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* Q **************************************/

if ($all || $first_letter == 'Q') {
  print_letter_header('Q');

$t = 'quality';
$d = <<<DEF
[alg. sem.] Of a <g>semiotic morphism</g>, the extent to which it preserves the structure of its <g>source system</g>. A high-quality semiotic morphism should map <g term="sort">sorts</g> to sorts, <g term="constructor">constructors</g> to constructors, and so on while preserving <g term="level">levels</g>, <g term="priority">priorities</g>, and <g term="axiom">axioms</g>. Due to constraints in the <g>design space</g>, though, it is often impossible to preserve all such structure. For this reason and because priorities are subjective, one cannot expect there to be a single "best" semiotic morphism.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* R **************************************/

if ($all || $first_letter == 'R') {
  print_letter_header('R');

$t = 'recipient design';
$d = <<<DEF
In <g>ethnomethodology</g>, the phenomenon that natural speech is always designed for its recipients.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'referent';
$d = <<<DEF
Synonym for <g>object</g> or <g>signified</g>. See also: <g>denotation</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'representamen';
$d = <<<DEF
[Peirce] The (not necessarily physical) form of a <g>sign</g>. See also: <g>semiotic triad</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/representamen.html">representamen</a>',
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#representamen">representamen</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'representation';
$d = <<<DEF
[Peirce] A basic principle of <g>semiotics</g>; refers to a <g>sign</g> standing for something other than itself. In <g term="Peirce">Peirce's</g> words, "That character of a thing by virtue of which, for the production of a certain mental effect, it may stand in place of another thing. The thing having this character I term a <g>representamen</g>, the mental effect, or thought, its <g>interpretant</g>, the thing for which it stands, its <g>object</g>."
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#representation">representation</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* S **************************************/

if ($all || $first_letter == 'S') {
  print_letter_header('S');

$t = 'Saussure';
$d = <<<DEF
Ferdinand de Saussure (1857-1913) was a Swiss linguist. He perceived linguistics as a branch of a general science of <g term="sign">signs</g> that he called <g>semiology</g>. Many of his ideas have since been included in what is now called <g>semiotics</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'selector';
$d = <<<DEF
[alg. sem.] Conceptually, the inverse of a <g>constructor</g>; a function whose parameter is a complex <g>sign</g> and whose value is one or more of the (lower-level) signs from which it was constructed. For example, a selector might take a menu as a parameter and "return" its first item.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiology';
$d = <<<DEF
[Saussure] The term used by <g>Saussure</g> to describe the science of signs and meanings. See also: <g>semiotics</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiosis';
$d = <<<DEF
[Peirce] An occurrence of meaning, involving the combination of all three parts of the <g>semiotic triad</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/semiosis.html">semiosis</a>',
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#semiosis">semiosis</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiotic morphism';
$d = <<<DEF
[alg. sem.] A mapping from a <g>source system</g> to a theory of <g term="display sign">display signs</g>. One of the key ideas in <g>algebraic semiotics</g> is that semiotic morphisms can be compared based on their <g>quality</g>.
DEF;
$l = array(
'<a href="http://www.cs.ucsd.edu/users/goguen/papers/sm/smm.html">Semiotic Morphisms</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiotic space';
$d = <<<DEF
[alg. sem.] The set of all <g term="sign">signs</g> possible in a given <g>sign system</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiotic triad';
$d = <<<DEF
[Peirce] The <g>representamen</g>, the <g>interpretant</g>, and the <g>object</g>, and the relationships among them. See also: <g>representation</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiotic triangle';
$d = <<<DEF
See <g>semiotic triad</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#semiotic triangle">semiotic triangle</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'semiotics';
$d = <<<DEF
The study of <g term="sign">signs</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#semiotics">semiotics</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'sign';
$d = <<<DEF
In <g>classical semiotics</g>, anything interpreted as "standing for" something other than itself. In <g>algebraic semiotics</g>, a sign is an instance of a <g>sort</g>, and generally is the result given specific parameters of a <g>constructor</g> for that sort.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/sign.html">sign</a>',
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#sign">sign</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'sign space';
$d = <<<DEF
[alg. sem.] See <g>semiotic space</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'sign system';
$d = <<<DEF
In <g>classical semiotics</g>, particularly within the <g term="structuralism">structuralist</g> tradition, a sign system is a collection of related <g term="sign">signs</g> like those in a particular <g>medium</g>, <g>genre</g>, or language. In <g>algebraic semiotics</g>, a sign system is a theory; that is, a formal description (via <g term="sort">sorts</g>, <g term="constructor">constructors</g>, <g term="axiom">axioms</g>, and so on) of a <g>semiotic space</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'signal';
$d = <<<DEF
See <g>token</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'signification';
$d = <<<DEF
[Saussure]
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'signified';
$d = <<<DEF
[Saussure] The meaning or concept represented by a <g>signifier</g>; what <g>Peirce</g> called the <g>object</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#signified">signified</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'signifier';
$d = <<<DEF
[Saussure] The (not necessarily physical) form of a <g>sign</g>; what <g>Peirce</g> called the <g>representamen</g>. See also: <g>signified</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#signifier">signifier</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'sort';
$d = <<<DEF
[alg. sem.] A kind of <g>sign</g>. A sort is analogous to a class in the object-oriented programming paradigm: a sign is of a certain sort just as an object is of a certain class. (Note: Do not confuse the notion of "object" in object-oriented programming with the notion of "<g>object</g>" in <g>classical semiotics</g>; they are different.)
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'source sign';
$d = <<<DEF
[alg. sem.] A <g>sign</g> in a <g>source space</g>, usually with a corresponding <g>display sign</g> in the <g>design space</g>.

DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'source space';
$d = <<<DEF
[alg. sem.] A <g>semiotic space</g> that contains <g term="source sign">source signs</g> to be represented in the <g>design space</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'source system';
$d = <<<DEF
[alg. sem.] A <g>sign system</g> describing a <g>source space</g>; the "input" domain of a <g>semiotic morphism</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'structuralism';
$d = <<<DEF
A tradition within <g>classical semiotics</g>, beginning with Ferdinand de <g>Saussure</g>, focusing on the structure of systems of related <g term="sign">signs</g> rather than the referents of individual signs. For structuralists, meaning is relational: signs take on meaning only by virtue of their relations to other signs within a system. Treating these <g>sign systems</g> as "languages", they analyze complex signs by breaking them down into smaller meaningful units and identifying the relationships among them. Their goal is to find underyling structures, hopefully in order to understand the conventions governing production and interpretation of signs within systems.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#structuralism">structuralism</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'subsort';
$d = <<<DEF
[alg. sem.] A <g>sort</g> contained within another sort. For example, web browser windows are a subsort of GUI windows.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'symbol';
$d = <<<DEF
[Peirce] A "<g>sign</g> which is constituted a sign merely or mainly by the fact that it is used and understood as such." Symbols are signs merely by convention, having neither <g>iconicity</g> nor <g>indexicality</g>. For example, drive letters in MS-DOS and Windows (such as "C:") are symbols. See also: <g>icon</g>, <g>index</g>.
DEF;
$l = array(
'[CD] <a href="http://www.helsinki.fi/science/commens/terms/symbol.html">symbol</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'symbolic';
$d = <<<DEF
[Peirce] Relating to or having the characteristics of a <g>symbol</g>.
DEF;
$l = array(
'[S4B] <a href="http://www.aber.ac.uk/media/Documents/S4B/sem-gloss.html#symbolic">symbolic</a>'
);
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'synthetic';
$d = <<<DEF
[alg. sem.] Concerning the production of <g term="sign">signs</g> intended to have certain meanings. Opposite of <g>analytic</g>. Design is synthetic.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* T **************************************/

if ($all || $first_letter == 'T') {
  print_letter_header('T');

$t = 'token';
$d = <<<DEF
A configuration of matter and/or energy that may or may not be a <g>sign</g>; anything that does not necessarily convey meaning. Also referred to as a <g>signal</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'transparency';
$d = <<<DEF
A goal of user interface design in which the interface becomes "invisible", and the user can focus on the task at hand. For example, skilled computer users can use a mouse to move a pointer and perform operations, without thinking about <em>how</em> the mouse is moving the pointer. Transparency breaks down when the interface breaks down; for instance, if the mouse ball collects dust and the pointer movement becomes erratic.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* U **************************************/

if ($all || $first_letter == 'U') {
  print_letter_header('U');

$t = 'ubiquity';
$d = <<<DEF
See <g>ubiquitous computing</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'ubiquitous computing';
$d = <<<DEF
A future trend in computing in which computers will be <em>everywhere</em>. See also: <g>affective computing</g>, <g>autonomic computing</g>, <g>convergence</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'UID';
$d = <<<DEF
Acronym for <g>User Interface Design</g>.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

$t = 'user interface design';
$d = <<<DEF
In <g term="semiotics">semiotic</g> terms, the process of synthesizing a configuration of <g term="sign">signs</g> that will enable a user to perform some practical task.
DEF;
$l = array();
  if ($all || !strcmp($term, $t)) print_term($t, $d, $l);

  print_letter_footer();
}

/************************************* V **************************************/

if ($all || $first_letter == 'V') {
  print_letter_header('V');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* W **************************************/

if ($all || $first_letter == 'W') {
  print_letter_header('W');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* X **************************************/

if ($all || $first_letter == 'X') {
  print_letter_header('X');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* Y **************************************/

if ($all || $first_letter == 'Y') {
  print_letter_header('Y');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/************************************* Z **************************************/

if ($all || $first_letter == 'Z') {
  print_letter_header('Z');

  /* Avoid XHTML parse errors for empty dl */
  echo "<dd></dd>\n";

  print_letter_footer();
}

/* Print message if term not found */
if(!$all && !$found) {
  echo <<<ERROR
<dl>
  <dt>$term</dt>
  <dd>No definition found.</dd>
</dl>
ERROR;
}

/* Print page footer */
if($all) {
  print_page_footer();
}
else {
  print_page_footer(false, false);
}

function print_letter_header($letter)
{
  if($GLOBALS['all']) {
    echo "<a name=\"$letter\"></a><h2>$letter</h2><dl>\n";
  }
  else {
    echo "<dl>\n";
  }
}

function print_letter_footer()
{
  if($GLOBALS['all']) {
    echo "</dl><p>[<a href=\"#index\">Back to index</a>]</p>\n";
  }
  else {
    echo "</dl>\n";
  }
}

function print_term(&$term, &$def, &$links)
{
  /* Print term */
  echo '<dt><a name="', str_replace(' ', '_', $term), "\"></a>$term</dt>\n";

  /* Replace glossary links */
  if($GLOBALS['all']) {
    $def = preg_replace(LINK_REGEX, REPL_REGEX_ALL, $def);
  }
  else {
    $def = preg_replace(LINK_REGEX, REPL_REGEX_SINGLE, $def);

    /* Set non-glossary links to open in new window */
    $links = str_replace('<a ', '<a target="_blank" ', $links);
  }

  if(sizeof($links)) {
    /* Print definition and non-glossary links */
    echo "<dd>$def<p>Links: ";
    $i = 0;
    while($i < sizeof($links) - 1) {
      echo $links[$i++], ', ';
    }
    echo $links[$i], ".</p></dd>\n";
  }
  else {
    /* Print definition */
    echo "<dd>$def<p></p></dd>\n";
  }

  $GLOBALS['found'] = true;
}
?>
