text:
# Declarative program development in Prolog with GUPU

## Introduction

Teaching logic programming has specific opportunities different from traditional languages. In particular, the declarative notions can be liberated from theoretical confines and be applied to actual program development. Our approach is centered around the programming course environment GUPU used for introductory Prolog programming courses since 1992 at TU Wien and other universities. The language used by GUPU is the monotone pure subset of Prolog which also contains the many constraint extensions offered by SICStus Prolog.

In this article, we focus on the program development process supported by GUPU. To illustrate this process, we will develop the predicate alldifferent/1 describing a list of pairwise different elements.

The actual programming effort is divided into two stages which both are equipped with appropriate diagnosing facilities. The first stage (Sect. 1) is devoted to specifying a predicate by example. Cases are stated where the predicate should succeed, fail, terminate, or not terminate. In the second stage (Sect. 2), the actual predicate is implemented and immediately tested against the previously stated example cases. The whole development process is guided by a marking system that highlights missing items and computes an interval percentage of the fulfillment of an exercise.

## 1 Specification by example

Writing test cases prior to actual coding is good practice also in other programming languages. It has reached broader attention with the rise of the extreme programming movement . The major advantage generally appreciated is increased development speed due to the following reasons. Test cases are an unambiguous (albeit incomplete) specification. They influence system design, making it better testable. They provide immediate feedback during coding, which is most important in our context. And finally, they constitute a solid starting point for documentation.

In the context of logic programming, there are several further aspects in favor of this approach. Test cases focus the attention on the meaning of the predicate avoiding procedural details. In particular, recursive predicates are a constant source of misunderstandings for students, because they confuse the notion of termination condition in imperative languages with Prolog’s more complex mechanisms. While there is only a single notion of termination in procedural languages, Prolog has two: Existential and universal termination. By writing tests prior to coding, the student’s attention remains focused on the use of a predicate. With logic variables, test cases are more expressive than in imperative languages. We can use these variables existentially (in positive queries) as well as universally (in negative queries).

In our attempt to develop alldifferent/1 describing a list of pairwise different elements, we start by writing the following two assertions. The first is a positive assertion. It ensures that there must be at least a single solution for alldifferent/1. The second is a negative one which insists that the given goal is not the case. Here, alldifferent/1 should not be true for a list with its two elements being equal. Both tests cannot be expressed in traditional languages.

| $``$ alldifferent(Xs). |
| --- |
| $`\leftarrow ̸`$ alldifferent(\[X,X\]). |
| @! Definition of alldifferent/1 missing in above assertions |

We write test cases directly into the program text. Upon saving, GUPU inserts feedback into that text. Above, GUPU added the line starting with @ to remind us that we have not yet defined alldifferent/1.

Taking all of the aforementioned advantages into account, this methodology appears preferable to the traditional “code then test” approach. Still, students prefer to write code prior to testing. It seems that the biggest obstacle is a lack of motivation. Test cases as such do not provide any immediate feedback when they are written. Why should one write tests when they might be incorrect? Such incorrect tests would be misleading in the later development. For this reason GUPU tests assertions for validity.

### 1.1 Reference implementation

All test cases provided by the student are tested against a reference implementation which is realized with otherwise inaccessible predicates. It is considered to be correct for those cases where the reference predicate fails finitely or succeeds unconditionally. In all other cases (exceptions, non-termination, pending constraints), the reference implementation is incomplete and therefore unspecified as discussed in the sequel.

Cases detected as incompatible with the reference implementation are highlighted immediately. In this manner, it is possible to “test the tests” without any predicate yet defined by the student. Errors due to the reference implementation start with != to distinguish them from other errors.

We continue with the specification of alldifferent/1, by adding further positive and negative assertions. In the cases below GUPU disagrees and offers help.

| $``$ alldifferent(\[a,b,c,d,c\]). |
| --- |
| != Should be negative. Details with DO on the arrow |
|  |
| $`\leftarrow ̸`$ alldifferent(\[X,Y$`|`$\_\]). |
| != Should be positive. Details with DO on the arrow |

### 1.2 Diagnosis of incorrect assertions

A more elaborate explanation on why an assertion is incorrect is obtained on demand as proposed by the message “DO on the arrow” above. According to the kind of assertion the following steps are taken. In case of an incorrect negative assertion, a more specific query is produced if possible. For incorrect positive assertions, a generalized query is given. In this manner, GUPU provides a detailed diagnosis without showing the actual code of the reference implementation. Moreover, further assertions are offered that will improve test coverage during coding.

#### Explaining incorrect negative assertions.

If the reference implementation succeeds in a negative assertion, a more specific goal is obtained using an answer substitution of the reference implementation. All free variables are grounded with new constants any1, any2, ….

Below, an answer substitution completed the end of the list with \[\], and the variables X and Y have been grounded to constants. GUPU temporarily inserts the specialized assertion into the program text. By removing the leading @-signs, the assertion can be added easily to the program.

| $`\leftarrow ̸`$ alldifferent(\[X,Y$`|`$\_\]). |
| --- |
| @@ % != Should be a positive assertion. |
| @@ % Also this more specific query should be true. |
| @@ $``$ X = any0, Y = any1, alldifferent(\[X,Y\]). |

#### Explaining incorrect positive assertions.

If the reference implementation fails for a positive assertion, GUPU tries to determine a generalized goal that fails as well. Generalized goals are obtained by rewriting the goal (or a conjunction of goals) up to a fixpoint with the following rules.

Replace a goal (in a conjunction) by true.

Replace a subterm of a goal’s argument by a fresh variable _.

Replace two or more identical subterms by a new shared variable.

Replace two non-unifiable subterms by new variables V1, V2 and add the goal dif(V1, V2).

Replace a goal by a set of other goals that are known to be implied.

| $``$ alldifferent(\[a,b,c,d,c\]). |
| --- |
| @@ % != Should be a negative assertion |
| @@ % @ Generalized negative assertion: — using R1,R2 |
| @@ $`\leftarrow ̸`$ alldifferent(\[\_,\_,c,\_,c\]). |
| @@ % @ Further generalization: — using R1-R4 |
| @@ $`\leftarrow ̸`$ alldifferent(\[\_,\_,V0,\_,V0\]). |
| @@ % @ Further generalization: — using R1-R5 |
| @@ $`\leftarrow ̸`$ alldifferent(\[V0,\_,V0$`|`$\_\]). |

In our experience it is helpful to use several stages of generalizations. Explanations that are easier to compute are presented first. In the first stage, R1 and R2 are used, and the generalization is displayed immediately. In the next stage, R1-R4 may incur a significant amount of computation. In particular, R4 is often expensive if the number of non-unifiable subterms is large. Note that the obtained generalized goals are not necessarily optimal because of the incompleteness of the reference implementation. In the above example, the first generalization is sub-optimal. The optimum for R1 and R2 is $`\leftarrow ̸`$ alldifferent(\[\_,\_,c,\_,c$`|`$\_\]). However, our reference implementation loops in this case. In the last generalization, R5 applied “alldifferent(\[\_$`|`$Xs\]) $``$ alldifferent(Xs).” twice. This permitted R1 to remove constant \[\] at the end of the list.

### 1.3 Incomplete reference implementations

For most simple predicates, our reference implementation is capable of determining the truth of all simple assertions. There are, however, several situations where no feedback is provided.

* The reference implementation takes too long, although most reference predicates take care of many situations and are therefore more complex than the student’s code.
* The predicate itself is under-specified. Many under-specified predicates, however, still allow for partial assertion testing.

The former situation has been illustrated previously with alldifferent(\[\_,\_,c,\_,c$`|`$\_\]). For the latter, consider a family database, the usual introductory example. While the particular persons occurring in child\_of/2 and ancestor\_of/2 are not fixed, there still remain many constraints imposed on them.

1. No child has three parents.
2. A parent is an ancestor of its children.
3. The ancestor relation is irreflexive.
4. The ancestor relation is transitive.

We give here the actual reference implementation of child\_of/2 and ancestor\_of/2 implemented in CHR , a high-level language to write constraint systems with simplification ($``$) and propagation rules ($``$). The definition provides two predicates that can be executed together with regular predicates of the reference implementation. This reference implementation cannot succeed unconditionally because of the pending constraints imposed by CHR. Therefore, it can only falsify positive assertions.

| % Reference implementation in CHR |
| --- |
| $``$ use\_module(library(chr)). |
| option(already\_in\_store, on). % prevents infinite loops |
|  |
| c1 @ child\_of(C,P1), child\_of(C,P2), child\_of(C,P3) $``$ |
| true & P1 $`\backslash =`$ P2, P2 $`\backslash =`$ P3, P1 $`\backslash =`$ P3 $`|`$ false. |
| c2 @ child\_of(A,B) $``$ ancestor\_of(B,A). |
| c3 @ ancestor\_of(A,A) $``$ false. |
| c4 @ ancestor\_of(A,B), ancestor\_of(B,C) $``$ ancestor\_of(A,C). |
|  |
| $``$ child\_of(A,B), child\_of(B,C), A = C. |
| != Should be negative. |
| $``$ alldifferent(\[P1,P2,P3\]), child\_of(C,P1), child\_of(C,P2), child\_of(C,P3). |
| != Should be negative. |

### 1.4 Termination

Termination properties and in particular non-termination properties are often considered unrelated to the declarative meaning of a program. It is perceived that ideally a program should always terminate. We note that non-termination is often closely related to completeness. In fact, a query must not terminate if the intended meaning can only be expressed with an infinite number of answer substitutions. Notice that this observation is completely independent of Prolog’s actual execution mechanism! No matter how sophisticated an execution mechanism may be, its termination property is constrained by the size of the generated answer. If this answer must be infinite, non-termination is inevitable. For this reason, cases of non-termination that are due to necessarily infinite sets of answer substitutions can be safely stated in advance. On the other hand, cases of termination always depend on the particular predicate definition as well as on Prolog’s execution mechanism.

The most interesting cases of termination are those where actual solutions are found. Termination is therefore expressed with two assertions: A positive assertion to ensure a solution: $``$ Goal. A negative one to ensure universal termination under Prolog’s simplistic left-to-right selection rule: $`\leftarrow ̸`$ Goal, false. In our particular case of alldifferent/1, we can state that alldifferent(Xs) must not terminate, because there are infinitely many lists as solutions. With the negative infinite assertion $`\overline{)\stackrel{\mathrm{}}{}}`$ Goal, false. we state that Goal must not terminate universally.

| $``$ alldifferent(Xs). |
| --- |
| $`\overline{)\stackrel{\mathrm{}}{}}`$ alldifferent(Xs), false. |

When the length of the list is bounded (at most) a single answer substitution for alldifferent/1 is possible. Therefore, the predicate could terminate if defined appropriately. In the example below, the ideal answer is dif(A,B).

| $``$ Xs = \[A,B\], alldifferent(Xs). |
| --- |
| $`\leftarrow ̸`$ Xs = \[A,B\], alldifferent(Xs), false. |

### 1.5 Summary

In the first stage of realizing a predicate, only test cases are given. The idea is to start from the most general goal and refine the meaning of the predicate by adding further cases. To streamline this process, their correctness is ensured with the help of an internal reference implementation. It provides immediate feedback and detailed diagnosis in the form of further test cases that can be added to the program. Without any actual predicate code written, the learner is put into the situation of formulating and reading queries generated by the system. Note that in this first stage most errors remain local in each query. The marking system provides overall guidance by demanding various forms of assertions. E.g., a ground positive assertion, non-termination annotations, etc.

## 2 Predicate definition

Armed with validated test cases obtained in the first stage, we are now ready to implement alldifferent/1. Inconsistencies between the student’s test cases and implementation, are highlighted immediately. Answer substitutions are tested with the reference implementation, as shown in the central column of the following table. Explanations based on slicing locate an error. We continue our example by defining the predicate with an error in the underlined part.

| alldifferent(\[\]). |
| --- |
| alldifferent(\[X$`|`$Xs\]) $``$ |
| nonmember\_of(Xs, X), |
| alldifferent(Xs). |

| nonmember\_of(\_X, \[\]). |
| --- |
| nonmember\_of(X, \[E$`|`$Es\]) $``$ |
| dif(X, E), |
| nonmember\_of(X, Es). |

| $``$ X = any1, Y = any2, alldifferent(\[X,Y\]). |
| --- |
| ! Unexpected failure. Explanation with DO on the arrow. |
| $``$ Xs = \[\_,\_\], alldifferent(Xs). |
| != The first solution is incorrect. Explanation with DO on the arrow. |
| $`\leftarrow ̸`$ Xs = \[\_,\_\], alldifferent(Xs), false. |
| ! Universal non-termination. Explanation with DO on the arrow. |

### 2.1 Slicing

Slicing  is a technique to facilitate the understanding of a program. It is therefore of particular interest for program debugging. The basic idea of slicing is to narrow down the relevant part of a program text. For the declarative properties insufficiency (unexpected failure) and incorrectness (unexpected success), two different slicers have been realized. A further slicer was realized to explain universal non-termination . They all highlight fragments of the program where an error has to reside. As long as the programmer does not modify the displayed fragment, the error persists.

1. For unexpected failures, generalized program fragments are produced that still fail. The program is generalized by deleting some goals, indicated with a \*-sign. To remove the error, the slice must be generalized.

E.g., a rule p $``$ q, r. is generalized to p $``$ * q, r.
2. In case of unexpected success, still succeeding specialized fragments are obtained by inserting some goals false/0 that effectively remove program clauses. In order to remove the error, the programmer has to specialize the remaining program fragment.
3. For universal non-termination, slicing determines still non-terminating specialized fragments. The inserted false/0-goals hide all subsequent goals in a clause. If false/0 is inserted as the first goal, the clause is completely eliminated. The remaining program fragment has to be modified in order to remove non-termination. The constraint based algorithm is found in .

E.g., p $``$ p, q. is specialized to p $``$ p, false, q.

GUPU generates the following slices on demand (“DO on the arrow”).

In the above example, two declarative errors and a procedural error yielded three different explanations. All explanations exposed some part of the program where an error must reside. Reasoning about errors can be further enhanced by combining the obtained explanations. Under the assumption that the error can be removed with a single modification of the program text, the error has to reside in the intersection of the three fragments. The intersection of all three fragments comprises only two lines of a total of eight lines — the head and first goal of alldifferent/1. This intersection is currently not generated by GUPU.

| alldifferent(\[\]). |
| --- |
| alldifferent(\[X$`|`$Xs\]) $``$ |
| nonmember\_of(Xs, X), |
| alldifferent(Xs). |

| nonmember\_of(\_X, \[\]). |
| --- |
| nonmember\_of(X, \[E$`|`$Es\]) $``$ |
| dif(X, E), |
| nonmember\_of(X, Es). |

The advantages of using slicing in the context of a teaching environment are manifold. The students’ attention remains focused on the logic programs and not on auxiliary formalisms like traces. Reading program fragments proves to be a fruitful path toward program understanding. Simpler and smaller parts can be read and understood instead of the complete program. Further, the described techniques are equally used for monotone extensions of pure Prolog programs like constraints in the domain CLP(FD).

### 2.2 Beyond Prolog semantics

The truth of infinite queries cannot be tested with the help of Prolog’s simplistic but often efficient execution mechanism. GUPU subjects infinite queries implicitly to an improved execution mechanism based on iterative deepening. In contrast to approaches that exclusively rely on iterative deepening , we can therefore obtain the best of both worlds: Prolog’s efficiency and a sometimes more complete search. In the case of negative infinite queries, a simple loop checking prover is used. We are currently investigating to further integrate more sophisticated techniques.

| nat(s(N)) $``$ |
| --- |
| nat(N). |
| nat(0). |
| $`\overline{)\stackrel{\mathrm{}}{}}`$ nat(N). |
| !++ Unexpected success. Remove / |

| q $``$ |
| --- |
| q. |
|  |
| $`\stackrel{\mathrm{}}{}`$ q. |
| !++ Unexpected failure. Add / |

### 2.3 Viewers

In a pure logic programming environment, the only way to see the result of a computation is via answer substitutions which often serves as an excuse to introduce impure features and side-effects. In GUPU, answer substitutions are visualized in a side-effect free manner with the help of viewers. Viewers provide an alternate visual representation of an answer substitution which helps to understand the investigated problem. To ensure that no side effects take place, viewers are only allowed in assertions of the form $``$ Viewer $`<<<`$ Goal. When querying such an assertion, an answer substitution of Goal is displayed along with a separate window for the viewer. Viewer is one of the predefined viewers. Most complex viewers are based on the Postscript viewer which expects a string describing a Postscript document. In fact, many viewers have been implemented side-effect free within GUPU in student projects. We present two select viewers. Further viewers are discussed in .

| $``$ postscript(Cs) $`<<<`$ Cs = ”0 0 100 100 rectfill”. |
| --- |
| @@ % Cs = ”0 0 100 100 rectfill”. |
| @@ %% One solution found. |

#### Repetitive Scheduling.

Within the context of fault-tolerant, distributed hard real-time systems, the need to calculate time-rigid schedules arises. Before system start up, a schedule meeting the time criteria of the application is calculated. The resulting table is executed at run time by the components of the system. This real-world application of CLP(FD)  has been integrated into GUPU. The viewer repsched/1 displays one particular solution to this scheduling problem:
$``$ repsched(DB-S) $`<<<`$ DB = big, db\_timerigidschedule(DB,S).

The modeled system consists of several processors and of one global interconnect (a bus). During design-time, every task is assigned to exactly one processor. All tasks are executed periodically and are fully preemptive. Tasks communicate and synchronize by sending messages. Internal messages are used for tasks on the same processor. All other messages are sent over the bus.

Solutions to the scheduling problem obey several constraints. All messages must be transmitted after the completion of the sending task and before starting the receiving task. The bus transfers at most one message at a time. Transactions (specific groups of tasks) have a guaranteed maximal response time (time from the start of the earliest task to the end of the last completing task). Tasks having a period smaller than the period of their transaction are replicated accordingly. Processors execute at most one task at a time.

#### An agent environment.

Another critical issue apart from basic I/O concerns the side-effect free representation of logical agents. As an example, the wumpus cave has been realized, well known from introductory AI texts . In this world the agent is supposed to find and rescue gold in a dark cave guarded by a beast and paved with other obstacles. Only by using rudimentary perception, the agent makes its way through the cave. The basic functionality of the agent is represented with two predicates. One for initialization of the agent’s state init(State) and one to describe the agent’s reaction upon a perception percept\_action\_(Percept, Action, State0, State). In addition, the state of the agent’s knowledge can be communicated via maybehere\_obj\_(Position, Object, State) which should succeed if the agent believes at the current State that an Object may be located at Position.

The graphical representation shows the agent depicted as an arrow walking through the cave as well as the location of the objects invisible to the agent. The agent’s belief is represented by the centered squares on each field. The agent may believe that a field is free, a pit, contains gold, or is occupied by the wumpus. In the picture, the agent has discovered the wumpus, a pit, and some free fields. All other fields are believed to contain a free field, gold, or a pit. Inconsistencies between the agent’s belief and reality are highlighted as depicted by the field in the upper right corner. While that field is a dangerous pit, the agent believes it to be safe. The left viewer only displays a single situation at a time, the other viewer presents the complete course through the cave at a glance, simplifying the comparison of different agents.

#### Related Work.

Ushell  uses iterative deepening in introductory courses. GUPU resorts to better strategies only when Prolog takes too long. CIAOPP  provides a rich assertion language (types, modes, determinacy, cost, …). It is much more expressive than GUPU’s but also complex to learn. Prolog IV  has a very sophisticated assertion language which is particularily well suited for constraints. Approaches to teaching Prolog with programming techniques  highlight patterns otherwise invisible to the inexperienced. Advice is given on the programming technique and coding level . GUPU provides guidance prior to any coding effort. We believe programming techniques might also be useful for GUPU.

#### Acknowledgments.

Our thanks go to all our tutors, Heimo Adelsberger, and the Austrian Computer Society (OCG). This work was partially supported by the German Bundesministerium f r Bildung und Forschung. Anton Ertl, David Gregg, and Franz Puntigam provided valuable comments.


format: text

text:
# LOOPTOP AND FOOTPOINT IMPULSIVE HARD X-RAYS AND STOCHASTIC ELECTRON ACCELERATION IN FLARES

## INTRODUCTION

The most significant discovery of the HXT instrument on board the YOHKOH satellite has been the detection of hard X-ray emission from the top of solar flare loops as well as their footpoints. The first so-called “Masuda” flare is that of January 13, 1992 (Masuda et al. 1994; see also Alexander & Metcalf 1997), which is clearly delineated by a soft X-ray (thermal) loop, and shows three compact hard X-ray sources, two located at the footpoints (FPs) and a third near the loop top (LT). Several other such sources are described in Masuda’s thesis (1994). As pointed out by Masuda et al. (1994), these observations lend support to theories that place the location of flare energy release high up in the corona. The power law hard X-ray spectra of the LT sources indicate that electron acceleration is indeed occurring at or near these locations. The exact mechanism of the acceleration is a matter of considerable debate. In previous works (see Petrosian 1994 and 1996) we have argued that among the three proposed particle acceleration mechanisms (electric fields, shocks, and plasma turbulence or waves) the stochastic acceleration of ambient plasma particles by plasma waves provides the most natural mechanism and can explain the observed spectral features of flares (Park, Petrosian & Schwartz 1997; hereafter PPS). In two recent works (Petrosian & Donaghy, 1999 and 2000; PD) we demonstrated that the observed characteristics of the Masuda flares can be used to constrain the model parameters. In order to gain a clearer picture of the frequency of occurrence of LT sources and the relative values of the fluxes and spectral indexes of the FP and LT sources, we (Petrosian, Donaghy & McTiernan 2002; PDM) have expanded and extended Masuda’s analysis. In the next two sections I first summarize the results of this work and then comment on their consequence for the acceleration mechanism.

## DATA ANALYSIS AND RESULTS

We have used The YOHKOH HXT Image Catalogue (Sato et al. 1988) to search for flare candidates for detection of LT emission. We have used Masuda’s (1994) selection criteria (heliocentric longitude $`>80`$ degrees, peak count rate $`>10`$ counts per sec per subcollimator in the $`3353`$ keV range, i.e. the M2 channel). We found 20 such events from 10/91 through 8/98, of which 11 were selected by Masuda for the period of 10/91 to 9/93. Observations of two events are interrupted by spacecraft night. Of the remaining 18 events, 15 show detectable impulsive looptop emission. As described below, considering that the finite dynamic range (about a decade) of the detection introduces a strong bias against observing comparatively weak looptop sources, one can conclude that LT emission is a common feature of all flares. An interesting aside, is that of the 9 new events, 3 appear to be examples of interacting loop structures with multiple LT and FP sources, of the type analyzed by Aschwanden et al. (1999). It is surprising that none of the 11 Masuda events are in this category.

We have constructed HXT images and investigated their evolution throughout all these flares using the YOHKOH spectral and spatial analyses software packages. In a few cases we have also used the Alexander & Metcalf (1997) “pixon” method of image reconstruction. From the investigations of these images we have determined the locations of LT and FP sources and produced separate light curves for the well defined sources. Figure 1 shows an example of a simple loop with an intermediate strength LT source and Figure 2 shows a flare with a more complex morphology consisting of two loops with different but related temporal evolution.

We determine the relative fluxes of the LT and FP sources and obtain rough measures of some of the spectral characteristics (e.g. power-law indexes). Figure 3 shows the M1 channel ($`2333`$ keV) counts of the FPs vs LT sources for all flares (left panel) and the distributions of the count ratio $`=FPs/LT`$ (right panel). We use a representative time period around an impulsive peak and avoid the later stages (the third periods of the histograms shown along the light curves) which can be contaminated by thermal emission. Note that some flares (those connected by dashed lines contribute more than one data point.

Analysis of these results lead to the following very important conclusions (see also PDM).

$``$ The LT hard X-ray emission seems to be a common characteristic of the impulsive phase of solar flares, appearing in some form in 15 of the 18 selected flares. The absence of LT emission in the remaining cases (those indicated by the horizontal arrows in Figure 3) is most likely due to the finite dynamic range of the imaging technique which is about 10. The hatched diagonal regions show this range. Flares outside the area between these two bounds will have either a too weak a FP or LT source to be detected by HXT. From this we conclude that LT emission is present in all flares. However there are very few flares with $`<1`$ and there are indications that the three such cases seen in Figure 3 are either partially occulted or are dominated by a superhot LT source. Thus one may conclude that, in general, the ratio $``$ has a relatively flat distribution between 1 and 10, with few cases outside this range. A larger sample with a wider dynamic range will be required for a better determination of this distribution.

Figure 4 shows the distribution of the overall spectral index (left panel) and the distribution of the difference between low ($`1328`$ keV, L and M1 channels) and high ($`2853`$ keV, M1 and M2 channels) energy indexes. Clearly with only a four channel data one must be cautious in the interpretation of these histograms. Nevertheless, some significant conclusions can be drawn from these results as well.

$``$ The overall distribution of the power-law spectral index $`\gamma `$ rises rapidly above 2, peaks around 4 and then declines gradually thereafter. This is similar to previous determinations of this distributions from HXRBS on board the Solar Maximum Mission (see e.g. McTiernan & Petrosian 1991), but contains a few more steep spectra, specially for LT sources. This difference could be due to thermal contamination and/or because HXT is sensitive to lower photon energies than HXRBS. On the average, the spectral index of LT sources is larger (i.e. spectra are steeper) than that of the FP sources by one unit; $`\overline{\gamma }_{LT}=6.2\pm 1.5,\overline{\gamma }_{FP}=4.9\pm 1.5`$. The physics of the acceleration process must certainly play a role here.

$``$ The spectra tend to steepen at higher energies (spectral index $`\gamma `$ increases by 1 to 2), especially for sources with $`\gamma <6`$, for which the thermal contribution should be the lowest. This is the opposite of what is observed at higher energies, where spectra tend to flatten above 100’s of keV (McTiernan & Petrosian 1991). The directivity of the X-ray emission and the albedo effect for the limb flares under consideration could play some role here, especially for the FP sources.

$``$ Finally, we note that solar flares occur in many different morphologies, the most common being a simple flaring loop with one LT and two FP sources. However, interacting loop models and even more complicated structures are frequently observed. There is a hint that the frequency of occurrence of complex morphologies may be different for the declining and growing phases of the solar cycle.

## THEORETICAL IMPLICATIONS

The above results can be used to constrain the model parameters describing the plasma in the acceleration site and those describing the acceleration mechanism. These parameters define several important timescales: The acceleration time scale is related to the energy diffusion coefficient $`D_{EE}`$ as $`\tau _{\mathrm{ac}}E^2/D_{EE}`$. The mean scattering time is inversely proportional to the pitch angle diffusion coefficient, $`\tau _{\mathrm{sc}}1/D_{\mu \mu }`$. The time for a particle with velocity $`v`$ to cross the acceleration site of size $`L`$ is $`\tau _{\mathrm{tr}}L/v`$; these two timescales determine the escape time from the acceleration site (for $`\tau _{\mathrm{sc}}<\tau _{\mathrm{tr}},T_{\mathrm{esc}}\tau _{\mathrm{tr}}^2/\tau _{\mathrm{sc}}`$, otherwise $`T_{\mathrm{esc}}\tau _{\mathrm{tr}}`$). Finally the energy loss timescale for an electron of energy $`E`$ is $`\tau _\mathrm{L}=E/\dot{E}_\mathrm{L}`$, which for the non relativistic electrons under consideration here is dominated by the Coulomb losses, $`\tau _{\mathrm{Coul}}=vE/(4\pi r_0^2\mathrm{ln}\mathrm{\Lambda }nmc^4)`$, where $`4\pi r_0^2\mathrm{ln}\mathrm{\Lambda }=2\times 10^{23}`$ cm2 and $`m`$ is the mass of the electron. The values of these time scales depend on the plasma density $`n`$, magnetic field $`B`$, plasma turbulence energy density $`w_{\mathrm{turb}}`$ and size $`L`$, and their variations with energy depend on these parameters and the spectrum of the turbulence (for details see PPS and PD and reference cited there).

For example, if $`T_{\mathrm{esc}}`$ is large the accelerated electron spend a long time in the acceleration site or at the loop top giving rise to a strong LT source. Inversely, a weak LT source is expected for a short $`\tau _{\mathrm{Coul}}`$. Very roughly, the ratio of the FP to LT emission is expected to vary as $`=J_{FPs}/J_{LT}\tau _{\mathrm{Coul}}/T_{\mathrm{esc}}`$, where the $`J`$’s refer to the expected bremsstrahlung fluxes. Furthermore, the spectral shape of these fluxes are also related to the above mentioned parameters. It is clear, for example, that if the acceleration time is short compared to the escape time, then more electrons get to higher energies resulting in a flat accelerated electron spectrum and LT hard X-rays. For a power law accelerated spectrum, $`f(E)E^\delta `$, the LT (thin target) hard X-ray spectrum at photon energy $`k`$ is $`J_{LT}k^{\delta 1/2}`$. On the other hand, the spectrum of the electrons that escape the acceleration region and reach the footpoints is $`f(E)/T_{\mathrm{esc}}(E)E^{\delta s^{}}`$, assuming that for the small energy range of the HXT we can use the approximation $`T_{\mathrm{esc}}(E)E^s^{}`$. These electrons will emit a thick target spectrum at the footpoints with $`J_{FPs}k^{\delta s^{}+1}`$. Thus, for LT spectra that are steeper than the FPs spectra we require $`s^{}<3/2`$. When the escape is determined by the traverse time $`s^{}=1/2`$ and this condition is satisfied. And when scattering dominates, this requires $`\tau _{\mathrm{sc}}E^s`$, with $`s>5/2`$. The energy dependence of $`\tau _{\mathrm{sc}}`$ depends on the characteristics of the turbulence. In general, one expects a positive value for $`s`$, and even for for a very steep spectrum of the turbulence one has $`s>1`$ (see e.g. Pryadko & Petrosian 1997).

However, it should be noted that these relations are very approximate and valid only for a limited energy range and very steep electron spectra; they breakdown completely for $`\delta <2.5`$. Nevertheless, this excersize demonstrates that using the observed values of the spectral indexes and FP and LT counts we can determine the plasma and acceleration characteristics. As shown in PD the values of the parameters such derived from the YOHKOH high spatial resolution data are very reasonable, and agree with those derived by PPS from fits to large dynamic range overall spectra. It is clear then that a more refined and simultaneous observations of the flare characteristics can yield important information about the the acceleration mechanism, the energy release and the evolution of solar flares. We eagerly anticipate the increased spectral, temporal and spatial resolution possible with the instruments of the RHESSI satellite.

## ACKNOWLEDGEMENTS

This work is supported in parts by NASA grants NAG-5-7144-0002 and NAG5-8600-0001. This paper was completed during the authors stay at the Institute for Theoretical Physics at UC Santa Barbara, which is supported in part by the National Science Foundation Under Grant No. PHY99-07949


text:
# Exporting Prolog source code

## 1 Introduction

Prolog has been around for nearly thirty years. Its ability to survive as a general purpose programming language can be mainly attributed to the fact that it is complimentary to the major players in the field. Without disregard to the many commercial products written in Prolog, the language, arguably, thrives in academic environments, and in particular in AI and proof-of-concept computer science research.

An important element in such projects is that the developers are only expected to write code in a part-time basis within a volatile environment. As a result, programs evolve from few hundred lines to several thousands in an evolutionary manner, that is, without prior overall design of the final product. Indeed, it is seldom the case that an identifiable final product stage is ever reached.

This is contrary to expectations in non-academic settings. As is the fact that sharing and publishing of unfinished source code is desirable. Furthermore tools such as the Unix make utility,  which admittedly targets a different set of objectives, requires duplication of work and discourages re-usability of Prolog code. In contrast, we present ExLibris which makes use of the directives present in Prolog source files to overcome these problems.

A convenient method for including relatively positioned source code is by using the library alias present in most modern Prolog systems. This mechanism is used primarily for system code that implements useful common predicates. For example the lists library present in most Prolog systems defines, among others, predicates member/2 and append/3. ExLibris extends the idea by allowing, during project development, access to code from a number of *home* library directories. When one wants to export the project for public use, the source files that are relevant are bundled into a local library directory. The only change required is that the local directory is added as a library directory in the top source files.

This library oriented approach encourages the writing of reusable code. For instance, predicates that accomplish generic tasks should be developed in the home library. Furthermore, it promotes a library oriented way of thinking, where useful code can become independent and in later stages part of the system libraries. For example, the Pillow program  has been incorporated in the current SICStus 3.9.0 release .

Unlike the $`DERIVE`$ system,  we have chosen to use the underlying file store, and to provide in-source support for system-dependent configuration. $`DERIVE`$ stores predicates in a relational database and uses table attributes to achieve a more holistic approach to Prolog based software engineering.

Dependence on source files means that in order to accommodate multiple prolog engines and runtime loading we need to introduce some new primitives. In this paper we present a minimum set of such primitives which we believe are interesting in, at least, pointing some of the support needed for such tasks.

ExLibris can be used for configuring both coarse and fine grain libraries. Coarse libraries define many predicates per file, whereas finer grains reduce this to a possibly minimum of one predicate per file. ExLibris depends for the grouping of source files to the primitives provided by the file-system, that is on the subdirectory relation.

The remaining of this paper is organised as follows. Section 2 deals with some preliminary Prolog definitions that deal with conditional loading and tentative dependencies of source files. Section 3, presents the functionality of ExLibris. Section 4, provides some comments on the features, limitations, and possible future work. Finally, Section 5 serves as the concluding section.

## 2 Preliminaries

The standard development and configuration phases supported by ExLibris are shown in Fig. 1. Development happens at a project directory which, possibly, contains a local library directory. During this phase (an example depicted in top part of Fig. 1) files in the project directory can use the library alias to load any of the following three: system files; which are part of the supported prolog engines, home files; part of the developer’s or the developing team’s filespace, and local files; which are within the project’s space. In top part of Fig. 1 file1 of project1 depends on files lists, maplist and flatten which reside within system, local and home libraries respectively.

ExLibris is a tool that helps to create an export directory that is independent of home library dependencies. This is illustrated in the lower part of Fig. 1. In the exported code, dependencies are either to system or to local libraries. All files that are relevant to files in project1 and reside within the home library are copied across to the local directory. Although single system, local and home directories are shown in Fig. 1, multiple, or alternative as is the case for system, ones, are supported.

### 2.1 Conditional load predicates

Since the publication of the Prolog ISO standard  the vast majority of systems have strove for compliance. This has made the idea of the same prolog code running on different engine feasible. Still differences exist, and it is necessary to take these into account.

The two issues we need to address are, uniform structured prolog identification and conditional loading. These tasks are useful in their own right, so we collect the relevant predicates in the pl library. This has been implemented and tested for SICStus, SWI , and Yap .

#### 2.1.1 pl/1

Firstly, pl defines predicate pl/1(pl(-Pl)) . Its argument identifies the running prolog system with a compound term, we refer to this term as pl-term. The name of the functor of the term identifies the prolog system and the term’s single argument the version, pl-version. The version should be such that the term order imposes the relevant order on the versions. For example the terms for the three most recent versions of the supported systems are: sicstus(3:9:0), swi(5:0:7), and yap(4:3:23).

#### 2.1.2 defines/1,2

A first use for pl/1 is for defining suitability of particular prolog engines for predicates present in a source file. We define directives,

```
:- defines( +Functors ).
:- defines( +IfPls, +Functors ).

```

We will treat the first directive as a special case of the second where $`IfPls`$ is instantiated to all indicating suitability for all Prolog systems. Apart from the special value all $`IfPls`$ may be a single, or a list of if-pl-term. In turn, an if-pl-term may be a if-term or a pair of the form ($`PlName`$,$`PlConds`$). $`PlName`$ is a valid name for the functor of some pl-term and $`PlConds`$ is a list of ($`PlVers`$,$`PlOper`$) pairs.

The intuition is that definitions for predicates corresponding to $`Functors`$ are given in the source file in which the directive appear, provided that the underlying engine matches one of the if-pl-terms in $`IfPl`$. To find a match, elements in $`IfPl`$ are considered disjunctively whereas $`PlConds`$ are considered conjunctively.

#### 2.1.3 mkindex/1

Predicate mkindex/1 takes a number of options that are not discussed here in full. Its core operation is to create an index file (Index.pl) for a given, library, directory. The index file, contains fact definitions for index/5 multifile predicate.

```
index( -Name, -Arity, -IfPls, -Module, -File ).

```

$`Name`$ and Arity refer to the functor of a predicate defined in file $`File`$ and module $`Module`$. $`IfPls`$ is of the same form as that described in Section 2.1.2 and indicate that the definition in $`File`$ should only be used for Prolog system with matching pl-term.

mkindex/1 has three sources for finding this information. Firstly, module definitions (in which case $`IfPls`$ == any) the defines/1,2 directives as already defined and in the case where neither of the two is present, it can be instructed to attempt and extract it from the clausal definitions. In the last case $`IfPls`$ is again instantiated to any.

#### 2.1.4 requires/1

With indices such as those described above, source files can ensure the presense of specific predicates without reference to the executing Prolog system while ensuring that the correct versions will be loaded at loading time.

```
:- requires( +Functors ).

```

Directive requires/1 instructs that at loading time the files corresponding to each functor and the running system will be loaded.

Following from the example in Fig. 1 at development phase the mentioned files might contain

```
\% file1
:- requires( [member/2,maplist/3,flatten/2] ).

\% SysLib/Index.pl
index( member, 2, sicstus(_), lists, lists ).

\% LocalLib/Index.pl
index( maplist, 3, any, user, ’meta/maplist’ ).

\% HomeLib/Index.pl
index( flatten, 2, swi(_), built_in, ’compat/swi/built_ins’ ).
index( flatten, 2, not(swi(_)), user, ’list/flatten’ ).
index( member, 2, swi(_), built_in, ’compat/swi/built_ins’ ).

```

Module name built\_in means that the predicate is a built-in. As can be seen above, flatten/2 is a built-in in Swi so no file will be loaded. The file present is simply where our instruction that this is a built-in for this system resides. On the other hand if file1 is loaded in SICStus then the definition in HomeLib/list/flatten will be used. Similarly for member/2 although in the later case it will be loaded from SysLib/lists. For either system maplist/3 is loaded from LocalLib/meta/maplist.

#### 2.1.5 if\_pl/2,3

Files can also be loaded conditionally to the current system by using the introduced pl-term within the loading file. Predicates if\_pl/2,3 provide means for accomplishing this, and can be called as follows:

```
if_pl( +IfPls, +Call ).
if_pl( +IfPls, +Call, +ElseCall ).

```

The predicate is quite general since calls $`Call`$ and $`ElseCall`$ can be any callable term. Here we are interested in the cases where if\_pl is used as a directive and the calls is of the form $`LoadCall(\mathrm{}Files\mathrm{})`$. $`IfPls`$ is identical to the one described in Section 2.1.2. Here, if the running engine has a match, then $`Call`$ is called. In if\_pl/3 $`ElseCall`$ is called if there is no match.

ExLibris recursively de-constructs if\_pl/2,3 directives, and recognises any loading predicates within $`Call`$ and $`ElseCall`$, and thus can provide information similar to to the that gathered in index/5 by mkindex/1. Contrary to index/5/the information is present on the caller file rather than the defining file, so it is not as clean an approach. We have included if\_pl/2,3 firstly because it is a useful predicate taking advantage of pl/1 and secondly because it might be useful in cases when one chooses not to use Index.pl files.

### 2.2 Dependent files

Finally, we need to address a discrepancy that arises from loading code at runtime. Unlike when using directives these situations give no easily accessible information about the files a program depends upon. Although it seems useful to have a directive declaring tentative dependencies such feature is not present in any of the discussed systems.

We propose a very simple mechanism facilitated by may\_load/1 directives. :- may\_load( +Files ). declares that a single or a list of files may be loaded at runtime by the program present in the same source file.

In this way we make the dependency of the two files more accessible. The dependant file is the file in which the directive appears in. This, depends on the file pointed to by the argument of may\_load/1. Such a directive assists ExLibris in ensuring that all files that may be loaded, depending on the execution path of a predicate, will be exported.

## 3 Export

Predicate exlibris/1 is used to create an export directory structure from the developer’s source code. The emphasis is placed in integrating relevant parts of private libraries when building software for exportation. Its single argument is a list of options. The recognised options are as follows.

dest($`Destination`$) the destination directory where the exported files will be copied. This should not exist prior to the call. This option does not have a default value.

source($`Srcs`$) a single file or directory or a list of source files and directories. Each is considered to be either an *entry* level source file, or a directory containing entry level source files. An entry level file is one that a user is expected to load directly. In the case of directories all source files within are considered entry level source files. There is no default value for this option.

copy($`Copy`$) whether directories containing entry files should also be copied recursively, $`Copy`$ == recursive, or entry files should be copied individually, $`Copy`$ == selective. Default is $`Copy`$ == selective.

syslib($`SysLib`$) usually is a single system library path, but a list of paths can also be given. The provided path should point to the developing Prolog’s system library directory. Default is the first directory given as the answer to query ?- library\_directory( L ). and conforms to system dependant criteria. Effectively we try to guess which library directory is the system one, since this is not an information Prolog engines currently provide.

homelibs($`HomeLibs`$) a list of private libraries holding source files that are loaded from entry files or their dependents by the library alias. The intuition is that during development these directories are defined using
library\_directory/1 in entry files or some appropriate start file. The default value is the instantiations of ?- library\_directory( L ). that didnt match the syslib criteria.

loclib($`LocLib`$) a path for the local library. This is considered relatively to $`Destination`$. All referenced files in $`HomeLibs`$ will be copied into $`LocLib`$. The relative path of any such file from the appropriate $`HomeLib`$ will be recreated within $`LocLib`$. Note that this may be an existing directory within some source directory. Default value: lib.

pls($`Pls`$) a single or a list of pl-terms. Only files pertinent to systems corresponding to these pl-terms are copied. These are identified from if\_pl/2,3 directives as discussed in Section 2.1.5. The default value is for all prologs which is equivalent to pls($`all`$)

The exported files are identical to the development ones proviso two transformations. Entry level files loose any library\_directory/1 definition and instead the following lines are added on the top of each such file

```
% Following line added by ExLibris.
:- library_directory( ’RelPathToLocLib’ ).

```

When exporting, the value of directory $`RelPathToLocLib`$ is known and it is the path to $`LocLib`$ relative to the particular entry level file. The second transformation is to remove any if\_pl/2,3 that does not match any of the system pl-term in $`Pls`$.

## 4 Discussion

Our approach uses the file-system’s directory structure as its medium of grouping predicates at the level of source files. This, supports both fine and coarse grain groupings. Examples of coarse groupings are the system libraries defining a score of predicates for source file. Whereas, fine grouping would favour single predicate definition per source file or module files exporting a single predicate. However, operations such as moving source files within the home directory structure will need to be accommodated by future tools.

Currently, ExLibris runs on SICStus v3.9.0. Swi v5.0.7 and Yap v4.3.23 (cvs) or later under Unix-like file-systems. Our belief is that like-minded systems such as Ciao  and GnuProlog  will be easy to support. For SICStus and Yap, and since layout option only provides the start line of read terms, ExLibris requires that if\_pl terms are the only terms on the text line in which they appear, and also that there are no new line characters to the end of the term (to the period). Other operating systems may be supported via the support Prolog systems provide for translation of Unix paths to other operating system paths. All code described in this paper can be found at http://www.doc.ic.ac.uk/`~`nicos/exlibris/ . About half of the code used was code drawn from pre-existing private libraries.

A number of additional tools may be constructed that can help with keeping projects and libraries consistent as well as facilitating library merging. For such tasks, as is also true for other source code manipulation, it will be useful to have a structured form of comments.

In the future we will like to implement non-recursive library copies. That is, the relative path of a home library file is reconstructed into the exported local library directory. This feature is currently not supported because it requires code transformations to a degree greater than we wish the core program to have. One possibility would be to add this as an additional tool that can flatten out any arbitrary library while updating project source files and inter-library dependencies.

## 5 Conclusions

The first contribution of this paper was to propose simple mechanisms for conditional, depending on the underlying system, loading and execution, and for declaring tentative source file dependencies. Apart from the suitability of the particular suggestions it is important that some of the issues raised here and which have remained dormant should attract some attention from the Prolog community.

Based on the proposed primitives we also presented a straightforward procedure for code configuration and exportation. We have kept core functionalities to a minimum as to encourage simplicity and thus usage. ExLibris encourages development of reusable code. We perceive this as the most desirable feature of ExLibris.


text:
# Chandra temperature and metallicity maps of the Perseus cluster core

## 1 Introduction

The Perseus cluster, Abell 426, at a redshift of $`z=0.0183`$ or distance about 100 Mpc is the the nearest high luminosity cluster with a high central surface brightness (e.g., Fabian et al., 1981; Allen et al., 2001; Fabian, 1994). This makes it the brightest cluster in the X-ray sky.

The first Chandra subarcsecond-resolution X-ray images of the cluster core around the central dominant galaxy NGC 1275 were presented by Fabian et al. (2000, F00). Using X-ray colours F00 showed that the temperature of the gas decreases from about 6.5 keV to 3 keV inward to the central galaxy NGC 1275, which is surrounded by a spectacular low-ionization, emission line nebula (Lynds, 1970, see also Conselice, Gallagher, & Wyse 2001).

The nucleus powers the radio source 3C84 (Pedlar et al 1990) which has structures on various scales. The 0.5 arcmin-sized radio lobes coincide with holes in the soft X-ray emission (Böhringer et al. 1993; McNamara et al. 1996; F00). Chandra has revealed that the holes are not due to absorption and have X-ray bright rims, which are cooler than the surrounding gas (F00). It was found that the rims are not distinguishable as sharp features on a 3–7 keV image and are therefore not shock features, contrary to the early prediction of Heinz, Reynolds & Begelman (1998), and are not expanding supersonically. The simplest interpretation of the low surface brightness is that they are devoid of X-ray gas and have pressure support from cosmic rays and magnetic fields. However they may contain some hotter gas at the virial temperature, or even above, of the cluster with the radio plasma having a low filling factor. In this scenario the rims consist of cooler gas which has been swept aside. The two outer holes, one of which was previously known, were identified with recently-found spurs of low-frequency radio emission by Blundell et al. (2000).

The core of the Perseus cluster offers the rare opportunity to study the radio source/intracluster gas interaction on arcsecond scales. In the present study we have carried out a spectral analysis of the Chandra images which provides us detailed information about the cluster physics. In Sect. 2 we describe the observations including the full 29.0 ks Chandra image of the Perseus cluster core. In Sect. 3 we describe our method of spectral analysis and show temperature and metallicity profiles, as well as maps. In Sect. 4 we carry out a spectral deprojection analysis of the cluster and search for the presence of X-ray gas in the northern X-ray hole. In Sect. 5 we conclude with a summary and a discussion.

We use $`H_0=50\mathrm{km}\mathrm{s}^1\mathrm{Mpc}^1`$ and $`q_0=\frac{1}{2}`$ throughout. Unless otherwise stated, quoted error bars are 1 $`\sigma `$ (68.3% confidence).

## 2 Observations

Chandra observed the Perseus cluster on 1999 September 20, 1999 November 28 and 2000 January 31 for 5.3 ks, 9 ks and 24.7 ks, respectively. The early observation was carried out with the ACIS-I detector. The energy resolution of this observation has been seriously affected by the radiation damage suffered by the front-illuminated ACIS chips, so that we only use it to produce images. The two later observations were carried out with the ACIS-S detector. The target was centred very close to the middle of the back-illuminated ACIS chip S3 (ACIS-S3). The detector temperature during these observations was -110 C. Inspection of the light curves of the observations showed that the later, longer, observation had been affected by flares, so that we had to clean the light curve. This reduced the exposure time usable for spectroscopic analysis to 14.9 ks.

In Fig. 1 the combined 29.0 ks image of all three Chandra exposures of the Perseus cluster core is shown. The image was constructed by concatenating the three event files using the combine\_obsid script available on the Chandra X-ray Observatory Centre (CXC) web pages (www.cxc.edu).

The image was binned into (1.97 arcsec)2 pixels. The well-known features of the inner X-ray holes and the outer X-ray hole (north-west) can be seen. In this stacked image a streak of emission can be seen running through the southern hole (see also Fabian et al. 2002, hereafter F02). This feature was not obvious in the image studied by F00 due to the dead column feature that runs straight across it in the January 2000 image. The southern outer X-ray hole first discussed by F00 and another similar cavity immediately to the west of it are also visible.

Between the western outer hole and the southern outer hole a curved, elongated feature is apparent with a smaller count rate than in the surrounding area. It appears to be a structure that connects the two outer holes. It is reminiscent of the radio structure apparently connecting the two outer radio lobes of the central radio source 3C 338 in Abell 2199 (Giovannini et al., 1998).

The appearance of swirliness (F00, see also Churazov et al. 2000) in the outer regions of the image is created by a distinct surface brightness drop that broadly coincides with a rise in the X-ray temperature (with increasing radius), as we will show in the next section.

## 3 Spectral analysis

### 3.1 Calibration

We extract spectra from regions of the Chandra data set using the CIAO software package distributed by the CXC. We only work with photons detected in the ACIS-S3 chip, which is also known as ACIS chip 7. We also restrict ourselves to the 0.5-7.0 keV band in order to be certain of a reliable energy calibration. Response matrix files (RMF) and ancillary response files (ARF) were produced using the calcrmf and calcarf programs by Alexey Vikhlinin available from the CXC web pages.

Using the task grppha from the FTOOLS software package provided by the NASA High Energy Astrophysics Science Archive Research Center, the extracted spectra are grouped so that we have at least 20 counts in a bin corresponding to a certain range of energy channels. This allows us to use Poisson error bars for spectral fitting.

We have have generated background spectra using Markevitch’s method and program that is also available from the CXC web site. We extract the background data from the same regions on the chip as the spectra extracted from the data sets. In the case of the Perseus cluster core the background in the ACIS-S3 chip in the 0.5-7.0 keV band ($`<\mathrm{\hspace{0.17em}1}`$ cts s-1) is much smaller than the signal from the cluster ($`83.4`$ cts s-1).

When fitting extracted spectra, we fit the November and the January data set in parallel with the same spectral model, allowing only for a different normalization of the two spectra. The different normalizations are necessary because the exposures are affected by the ACIS-S3 missing column feature in two different orientations. The feature is due to 5 contiguous partially dead columns in the centre of the chip that cause missing counts in an elongated region several arcmin long and approximately 17 arcsec wide (due to the spacecraft dither). This procedure affected only regions covering the dead columns, in other regions the normalizations were consistent with each other.

### 3.2 Selection of regions

In order to map the spectral properties of the cluster we divide the cluster into cells with a constant number of cluster emission counts. Since the background is not important for Perseus (Sect. 3.1) this is very similar to having an equal number of counts in each cell.

We determine the cell shapes by iteratively dividing annular segments with inner and outer radii $`r_1`$, and r2 and bounding azimuthal angles $`\alpha _1`$,$`\alpha _2`$ into regions with equal number of counts (corrected for the background contribution as determined from Markevitch’s background files). Beginning with a full circle with radius $`r`$ ($`r_1=0`$, $`r_2=r`$, $`\alpha _1=0`$, $`\alpha _2=2\pi `$) the iterations are either exclusively performed on the radius, yielding a sequence of annuli, or interchangingly on radius and azimuth, yielding a more complex web of cells.

We carry out the analysis on three scales: (1) Simple annuli with $``$35000 counts each, (2) cells with $``$18000 counts and (3) cells with $`500`$ counts each. The cell divisions were determined using the 14.9 ks exposure taken on 1999 November 28. The mentioned count values in this and the following sections refer to this exposure.

### 3.3 Annular spectra

We begin the spectral analysis by studying azimuthally averaged spectra from annuli with a large ($``$35000) number of counts. This will give an overview of the radial variation of the ambient X-ray gas temperature in Perseus.

We use XSPEC (Arnaud, 1996) to fit the X-ray spectra. Errors are determined with the XSPEC tasks error and steppar. We model the X-ray emission from the intracluster gas using the APEC plasma emission code (version 1.10). It is available on the web at hea-www.harvard.edu/APEC and is also included in the latest XSPEC versions. We use this newer code instead of the traditional MEKAL plasma code (Kaastra & Mewe, 1993; Liedahl et al., 1995) because it provides a significant improvement of the spectral fits. For example, when fitting a spectrum extracted from an annulus with inner radius 23 arcsec and outer radius 32 arcsec around the nucleus (542 degrees of freedom) we obtain a $`\chi ^2=625.7`$ for the APEC model instead of $`\chi ^2=662.0`$ for MEKAL. The change in best-fit parameters, however, is small; the best-fit absorption and temperature are identical for both plasma codes. The metallicity changes slighly, in this particular case from 0.42$`\pm 0.03`$ solar for MEKAL to 0.46$`\pm 0.03`$ solar for APEC. A large part of the improvement is due to a better representation of the blue wing of the Fe L complex.

In order to model the emission from a single temperature we fit the spectra with the following model:

$$\mathrm{MODEL}_1=\mathrm{PHABS}(N_\mathrm{H})\times \mathrm{APEC}(T,Z,K).$$
(1)
PHABS is the photoelectric absorption model by Balucinska-Church & McCammon (1992). The free parameters equivalent hydrogen column density $`N_\mathrm{H}`$, temperature $`T`$, average metallicity $`Z`$ (relative to the solar values according to Anders & Grevesse 1989) and spectral normalization $`K`$ are given in brackets. In Figs. 2, 3 and 4 the results of the spectral fits for the temperature, the metallicity and for the required photoelectric absorption are shown. The fits have been done both with (dotted error bars) and without (solid error bars) fixing the photoelectric absorption. Except for the innermost annulus, the absorption is consistent with being constant (Fig. 4). For the fits with fixed absorption we fixed it at the median of all fitted equivalent hydrogen column densities $`N_\mathrm{H}=0.143\times 10^{22}\mathrm{cm}^2`$ because the Galactic value (Dickey & Lockman, 1990) value from HI studies ($`0.149\times 10^{21}\mathrm{cm}^2`$) appears to be slightly too high (see Fig. 4). In Tab. 1 we list the details of the fits with free absorption. It can be seen from Figs. 2 and 3 that the best-fit values are very similar for models with or without fixed absorption.

The temperature profile (Fig. 2) reveals a rapid temperature decline from more than 5 keV to about 3 keV in the rims around the inner X-ray holes. Due to the large number of counts, the error bars are very small. There is a sudden jump in the temperature at a radius of 80 kpc, which coincides with the sudden brightness drop seen to the north of the cluster centre (Fig. 1).

Note also that the temperature rises again in the core. In this innermost ring, the nucleus and the inner 2.5 kpc (4.8 arcsec) around it have been cut out. It can be seen from Tab. 1 that the spectral fit in this ring is not as good as the fits in most of the other rings. This region encompasses most of the northern and about half of the southern X-ray hole. It shows signs of excess absorption (Fig. 4) due to the infalling high-velocity system (Unger et al., 1990; de Young et al., 1973; Briggs et al., 1982) that was found in absorption by Chandra (F00). A two-temperature model improves the fit and is favoured by an F-test. The two-temperature fit yields a 4.6 keV gas phase and a 1.9 keV gas phase, where the normalization of the high-temperature phase is twice of the low-temperature phase. It only improves the reduced $`\chi _{\nu }^{}{}_{}{}^{2}`$ to 1.34, however, so that this can also not be viewed as an entirely acceptable fit. In general we find that two-temperature fits do not provide a better description of the annular spectra. Overall there is no convincing evidence for multiphase gas in the Chandra spectra of the Perseus cluster.

In the metallicity profile (Fig. 3) a gradient from $`Z0.6`$ solar at a radius of 60 kpc to $`Z0.4`$ solar at a radius of 120 kpc is seen. There may be a peak of the metallicity profile at $`5060`$ kpc, but the metallicities drop only slightly inwards from 60 kpc towards a central metallicity of $`Z0.5`$ solar. Due to the large number of counts in the annuli, the relative errors are normally less than 10 per cent so that the trend between 60 and 120 kpc is detected with high significance.

### 3.4 Spectra in large cells

Following on to the azimuthally averaged spectra we next present the results from cells with $`18000`$ counts. In the left panel of Fig. 5 the definition of the cells and the intensity map of the cluster with this resolution are shown. The contours of the Chandra image are overlaid on top. The middle and right panels are maps of the temperature and the average metallicity determined using the single temperature model in eq. (1) with free Galactic absorption. The statistical uncertainty of the temperatures is less than 0.1 keV, the uncertainty of the metallicities is less than 10 per cent.

It was shown by F00 using X-ray colours that the temperature distribution in the region is not circularly symmetric. The middle panel in Fig. 5 illustrates the overall temperature distribution obtained with the APEC plasma model fits in a region of $`125`$ kpc radius around the nucleus. The large asymmetric region in the centre at a temperature of 3 to 4 keV is surrounded by hotter gas with temperatures up to 6 keV. The cool region is extended towards the north and the west, whereas in the south-east hotter gas is found at smaller radii. A comparison with the intensity contours in the left panel shows that the outer intensity contour has a similar shape to the isotherms at that radius; the inward (towards smaller radii) bend of the outer intensity contour to the south east of the cluster centre coincides with a high-temperature region. The spectra extracted from the regions corresponding to the inner X-ray holes and the outer hole (see the lighter cell the left panel of Fig. 5) in the west are best-fit by gas at a higher temperature than is found in their immediate surroundings. The same may be true for the less obvious southern X-ray hole discovered by F00 (see Fig. 1), but here the distinction from the hotter gas that intrudes from the south-east is not clear.

In the metallicity map (Fig. 5, right panel) small variations of the metallicities are apparent between cells at similar radii. A high-metallicity ring ($`0.6`$ solar) around the cluster centre is prominently seen at a radius of $`60`$kpc where the peak in the azimuthally averaged metallicity distribution in Fig. 3 was found. In addition to the higher temperature, the spectra extracted from the inner X-ray holes and the western hole are also best-fit by gas with a higher metallicity than is found in their immediate surroundings.

We note that a comparison with the galaxy distribution in an optical Digitial Sky Survey image of this region does not yield any obvious correlation. Due to the relatively coarse scale of the metallicity map, and due to projection effects, however, the question of correlations between the metal distribution and the galaxy distribution cannot be answered by this data set. Nevertheless, it is exciting that the Chandra X-ray observations begin to approach answering such questions.

### 3.5 Spectra in small cells

In this section we finally use two grids of cells: firstly we determine the amount of absorption and the metallicities in cells with $``$9000 counts each using the model in eq. 1. We then subdivide these cells further until we obtain a grid with $`500`$ counts in each cell. In order to obtain cells that are not too elongated, we limit the ratio

$$q=\frac{(\alpha _2\alpha _1)\times (r_1+r_2)/2}{r_2r_1}$$
(2)
of cell width and depth (see Sect. 3.2) to be greater than $`1/5`$ and smaller than 5. The cells have a typical size (circle section at half radius) of 10 arcsec (5.2 kpc). In these fine cells we determine the temperature with a fixed metallicity at the value determined in the larger cells. This procedure yields the finely meshed temperature map shown in Fig. 6. The relative errors of the temperatures in this plot are of the order of $`1015`$ per cent.

In order to obtain stable solutions for the absorption, we fix it to the median value $`N_\mathrm{H}=0.143\times 10^{22}\mathrm{cm}^2`$ (Fig. 4) if it is smaller than $`N_\mathrm{H}=0.16\times 10^{22}\mathrm{cm}^2`$, or otherwise fix it at the value determined in the first step; in total, there were only two cells where the local absorbing column densities of $`N_\mathrm{H}=0.20\times 10^{22}`$ cm-2 and $`N_\mathrm{H}=0.21\times 10^{22}`$ cm-2, respectively, had to be used. These two cells correspond to the region where the infalling high-velocity system is seen in absorption in the X-ray colour image by F00.

When looking at the goodness of the individual fits we noticed in a small number of cases that the assumed (fixed) metallicity appeared to underestimate the metallicity in these cells. In the cell with $`r_1=43.39`$ kpc, $`r_2=46.43`$ kpc, $`\alpha _1=346^{}`$ and $`\alpha _2=351^{}`$ (angles given in degrees, counterclockwise from north), for example, we found a reduced $`\chi _{\nu }^{}{}_{}{}^{2}`$ value of 1.3 when the metallicity was fixed at $`Z=0.434`$ solar. The reduced $`\chi _{\nu }^{}{}_{}{}^{2}`$ drops to 1.1 for the best fit $`Z=2.87_{1.74}^{+1.60}`$ solar. The constraint is entirely due to the iron L complex. This also leads to an underestimate of the temperature: $`3.8_{0.56}^{+0.60}`$ keV compared $`4.57_{0.77}^{+0.53}`$ keV if the metallicity is left as a free parameter. Although the evidence is not statistically compelling, this may be due to small-scale inhomogeneities of the metallicity. However, currently the count rates on small scales are too low and accordingly the uncertainties too large to reliably determine metallicities on these scales.

In the temperature map the overall temperature distribution from Fig. 5 (middle panel) is again visible. In addition, the map includes fine detail showing prominently that the temperature is higher in the regions of the two inner and the north-western X-ray holes than in their surroundings. Extending from the bright rim to the south-east of the central X-ray holes the low-temperature (2 to 3 keV) gas extends westwards and spirals around counter-clockwise. This spiral shape of the colder gas corresponds to the swirly appearance of the 0.5 to 7 keV emission shown in Fig. 1. The shape of lines of constant temperature at radii $`80`$ kpc (2.6 arcmin) discussed in Sect. 3.4 are also seen here to be similar to the shape of the surface brightness drop in the X-ray emission. The general spiral appearance of the cooler X-ray gas in the core was also noted by F00 in their X-ray colour image; the shape of the temperature distribution and the overall magnitude of the temperatures in the cluster core as determined with X-ray colours by F00 are confirmed by our individual spectral fits.

## 4 Spectral deprojection

### 4.1 Azimuthally averaged profiles

In the previous sections we have treated the cluster as a two-dimensional object in order to learn about the overall spectral properties. Since complicated projection effects must be present due to the different locations of, for example, bubbles, brightness drops or metals in the cluster, we attempt in this section to unravel some of the projection effects that are present. However, this can only be done by assuming a specific symmetry.

We deproject the observed spectra, in particular the temperature profile (Fig. 2) and the metallicity profile (Fig. 3), by assuming spherical symmetry and using the projct model available in XSPEC combined with our standard APEC model (eq. 1). In order to reduce the number of parameters, only eight annuli with $`144,000`$ counts each were used (as measured in the January 2000 image).

The model assumes eight spherical, concentric shells filled with gas with independent temperatures and metallicities. The projct model adds the APEC spectral contributions from the X-ray emission in the shells in order to model each of the eight observed annular spectra. All eight spectra are fitted at the same time111The projct model only deprojects a single data set at a time. We thus used only the longest 14.9 ks data set from January 2000 for the deprojection analysis reported in this section.. Consistent with Fig. 4, we find no excess absorption except for the innermost region. With the current model and due to the complicated shape of the absorbing area (F00), however, it is not possible to determine in which shell the absorbing material is located.

The final deprojected temperature and metallicity profiles are shown in Fig. 7. We plot the deprojected values with solid error bars, while the temperatures and metallicities determined from the projected spectra are plotted with dotted error bars. Starting from the outside, the temperature profile drops very quickly in the first bin and continues to drop monotonically, but with a shallower slope afterwards. Also starting from the outside, the metallicity gradient appears to be steeper down to $`70`$ kpc than it was for the projected spectra, but is very similar, albeit with larger error bars, within 70 kpc. Inside a radius of $`70`$ kpc, we find the metallicity approximately constant at $`Z0.5`$ solar.

The X-ray data also allow us to determine the emission measure $`\mathrm{EM}=n_\mathrm{e}^2\times V`$ (via the normalization constant $`K`$ in eq. 1), where $`n_\mathrm{e}`$ is the electron density and $`V`$ the volume of the gas. Assuming that isothermal X-ray gas at the deprojected temperature $`T`$ fills the spherical shells, we can determine the pressure $`p`$ of the electrons, $`p=n_\mathrm{e}`$k$`T`$, as shown in Fig. 8. Note that the sudden rise in pressure in the last bin is an edge effect due to our assumption that there is no cluster emission outside this radius. Similarly, the steep deprojected temperature drop in the outermost bin of Fig. 7 is an artifact since the cluster extends significantly beyond the outermost radius accessible to the ACIS-S3 detector used. This is also apparent from the fact that the deprojected temperature value is best-fit higher than the projected value. The temperature, metallicity and emission measure values further in, however, will not be affected by this due to the steep brightness increase (see Fig. 5, left panel) towards the nucleus.

### 4.2 The X-ray emission from the X-ray holes

In the projected temperature maps we found that the spectra extracted from the two central X-ray holes as well as the western X-ray hole are best-fit by hotter and more metal rich gas than their immediate surroundings. It is possible that this is due to a projection effect, whereby we would be seeing the hot gas above and below an empty cavity.

In order to investigate the properties of the X-ray gas that fills the region of the holes, we have carried a local deprojection analysis. We have spectrally deprojected the emission emitted by 9 annular segments (Sect. 3.2) with azimuthal boundaries $`\alpha _1=350`$ degrees and $`\alpha _2=28`$ degrees and 14000 counts per segment (as measured in the January 2000 image) in the 0.5 to 7 keV band. The innermost segment occupies the region of the northern inner X-ray hole with radii between 5 and 27 arcsec of the nucleus. The analysis was analogous to the full-circle analysis in the last section, except that the absorption was forced to be the same for all segments and the metallicity in the inner hole was fixed at $`Z=0.5`$. The best-fit absorption was $`N_\mathrm{H}=1.40\times 10^{21}`$ $`\mathrm{cm}^2`$, the reduced $`\chi ^2`$ of the best fit was $`\chi _\nu ^2=1.14`$.

Interestingly, we find that almost the entire projected emission in the innermost segment can be explained by the emission from the shells above. In Fig. 9 we show the allowed 68% ($`1\sigma `$), 95.4%($`2\sigma `$) and 99.73%($`3\sigma `$) confidence contours in the temperature/electron density plane of the parameters for an APEC component in the innermost segment. It can be seen that only a very low density plasma is allowed by the analysis. Since the emission measure constrained by the observed X-ray data is proportional to the volume of the gas, the allowed electron densities depend on the filling factor $`f`$ of the X-ray gas in the hole. We thus show the lines of pressure equilibrium with the second volume segment for three different filling factors of the X-ray gas (the electron pressure in the deprojected second segment is $`p=n_\mathrm{e}T=0.17\mathrm{keV}\mathrm{cm}^3`$, slightly higher than the shell-averaged pressures given in Fig. 8). These data rule out at $`3\sigma `$ the presence of X-ray gas at a temperature lower than 11 keV filling the entire X-ray hole. At the same confidence level we can rule out intracluster gas at the virial temperature of the cluster ($``$6.5 keV), filling one third of the X-ray hole.

## 5 Discussion

We have presented in this paper the results from a detailed temperature and metallicity mapping of the Perseus cluster core using Chandra observations.

We work with the complete useful ACIS-S data set comprising a total of 23.9 ks. Beginning by averaging over large annuli around the nucleus, we find that the temperature averaged in such annuli rises smoothly from $`3.0`$ keV to $`5.5`$ keV at 120 kpc. A small kink is found, however, in this profile at $`80`$ kpc, which corresponds to a surface brightness drop seen in the X-ray image. Using solar abundances according to Anders & Grevesse (1989), the metallicity rises from $`Z0.4`$ solar with decreasing radius to a maximum $`Z0.6`$ solar at $`60`$ kpc. There may be a peak of the metallicity profile at $`5060`$ kpc, which is reminiscent of such peaks in other clusters (e.g., Sanders & Fabian, 2001). However, inside 60 kpc the metallicity varies little, with a central metallicity of $`Z0.5`$ solar. We have also carried out a spectral deprojection analysis of the radially averaged profile, which yields a very similar picture.

Spatially resolved spectroscopy in small cells shows that the temperature distribution in the Perseus cluster is not symmetrical. In fact, the distribution of cold ($`23`$ keV) gas in the centre appears to spiral outward and corresponds to the swirly appearance of the X-ray emission (see Figs. 1 and 6). This may suggest the presence of angular momentum of the intracluster gas (F00). There are, however, other possibilities, such as the model by Churazov et al. (2000) (see also their adaptively smoothed ROSAT image) who propose that rising radio bubbles (such as the X-ray holes) are responsible for the overall spiral structure. The outer surface brightness drop is traced by a rise in temperature (with increasing radius). This is reminiscent, although not as large, of the temperature drop at the cold front seen by Markevitch et al. (2000). If thermal conduction is an important effect in the intracluster medium, such fronts could reflect the magnetic field structure.

A comparison of the metallicity distribution with the galaxy distribution from an optical image from the Digital Sky Survey does not show any obvious correlation between the galaxies and regions of higher metallicity. Projection effects and the resolution of the Chandra metallicity map, however, do not allow to rule out any correlation yet.

We find that the spectra extracted from the two central X-ray holes as well as the western X-ray hole are best-fit by hotter and more metal rich gas than their immediate surroundings. Using a spectral deprojection under the assumption of spherical symmetry in a sphere segment containing the northern inner X-ray hole, we have tested whether this could be due to a projection effect. Interestingly, we find that most of the X-ray emission in the hole can be explained by the projected emission of the shells further out. This directly addresses the issue of the X-ray gas content of the X-ray holes mentioned in the introduction; we find tight limits on the presence of an isothermal component in the X-ray hole, ruling out volume-filling X-ray gas with temperatures below 11 keV at 3$`\sigma `$.

The temperature distribution of the gas in the vicinity of the X-ray holes is of great importance for theories of radio source heating to counter the short cooling time of the X-ray gas in this cluster (e.g., F00). Longer exposure times are needed to reveal if there is cool gas associated with the wake of the bubble, as, for example, in the model by Churazov et al. (2000), who proposed that the radio bubbles would transport cooler gas from the cluster centre ‘upwards’. The bubbles may also transport or drag metals upwards. The subject of radio bubbles and their interaction with the intracluster gas has recently become the subject of much work (Churazov et al. 2001; Brüggen & Kaiser 2001; Quilis, Bower & Balogh 2001; McNamara et al. 2001; F02). The Chandra results provide essential observational input to test these theories.

## Acknowledgments

We thank the anonymous referee for useful comments. ACF acknowledges support by the Royal Society.


text:
# Electron conduction through quasi-one-dimensional indium atomic wires on silicon

## Abstract

Electron conduction through quasi-one-dimensional (1D) indium atomic wires on silicon (the Si(111)-4$`\times 1`$-In reconstruction) is clarified with the help of local structural analysis using scanning tunneling microscopy. The reconstruction has a conductance per square as high as 100 $`\mu `$S, with global conduction despite numerous surface steps. A complete growth of indium wires up to both the surface steps and the lithographically printed electrodes is essential for the macroscopic transport. The system exhibits a metal-insulator transition at 130 K, consistent with a recent ultraviolet photoemission study \[H. W. Yeom, S. Takeda, E. Rotenberg, I. Matsuda, K. Horikoshi, J. Schaefer, C. M. Lee, S. D. Kevan, T. Ohta, T. Nagao, and S. Hasegawa, Phys. Rev. Lett. 82, 4898 (1999)\].

.

The downsizing of microelectronics in pursuit of high density and high speed has brought them into the nanoscale regime in terms of their dimension. Suppose that the components of nanoelectronics, fabricated on a substrate, are further reduced in size to an extent that they are monoatomically thin. These are nothing else than surface atomic structures, which often lead to reconstructions whose crystallographic and electronic properties are essentially distinct from their original bulk materials.Lifshits\_SurfacePhases  Thus, understanding electron conduction properties of surface structures is of fundamental importance in the future nanoelectronics. In spite of its long history,Henzler\_SurfaceConduction ; Henzler\_AgSi ; Bauer\_Pbfilm  interest in electron transport phenomena originating from well-defined surface reconstructions has been renewed only recently.Hasegawa\_Agroot3 ; Weitering\_Si100  To measure such conduction, two main difficulties must be overcome: 1) separating out conduction through the underlying subsurface space charge layer Henzler\_SurfaceConduction  and 2) establishment of reliable electrical contacts to the atomic structures that are stable over a wide temperature range. Furthermore, as electron conduction through surface atomic structure is assumed to be grossly affected by defects, local structural analysis is essential to clarify their unambiguous transport properties.

In this paper an unprecedented combination of conductivity measurements and scanning tunneling microscopy clarifies electron transport properties of the Si(111)-4$`\times 1`$-In reconstruction. This system is particularly interesting because it consists of quasi-one-dimensional (1D) indium wires on a silicon surface.Nogami\_In4x1 ; Abukawa\_In4x1 ; Netzer\_In4x1 ; Yeom\_In4x1 ; Bunk\_In4x1 ; Kumpf\_In4x1  We extract surface conduction through the comparison of two surface structures, one of which includes intentionally introduced defects. Indium atomic wire arrays have a global conductance per square as high as 100 $`\mu `$S despite numerous surface steps. A complete growth of atomic wires up to both the surface steps and the lithographically printed electrodes is found to be essential for conduction over macroscopic lengths. We find a metal-insulator transition at 130 K, consistent with a recent ultraviolet photoemission study.Yeom\_In4x1

All experiments are performed under ultrahigh vacuum (UHV) conditions. Non-doped Si(111) (resistivity $`\rho >1000\mathrm{\Omega }\mathrm{cm}`$) is chosen as the substrate to minimize the electron conduction through the bulk. Tantalum, a typical refractory metal, is adopted as the electrode material to avoid diffusion during high temperature sample treatments. Two electrode pads separated by 1 mm are deposited beforehand on the sample with an electron beam evaporator (the inset of Fig. 1(b)). After loading into the UHV chamber, the samples are cleaned by flashing at 1150 C for 30 s. Indium is then deposited to a thickness of 1.8 monolayers (ML), followed by annealing around 450 C for 5 minutes. This develops indium atomic wire arrays on a silicon surface (Si(111)-4$`\times 1`$-In reconstruction).Nogami\_In4x1 ; Abukawa\_In4x1 ; Netzer\_In4x1 ; Yeom\_In4x1 ; Bunk\_In4x1 ; Kumpf\_In4x1  The 4$`\times 1`$ reconstruction is confirmed over an extensive area by Low Energy Electron Diffraction (LEED). Local structures are observed with STM at room temperature, revealing defects in the wires, surface steps and domain boundaries. We find two classes of samples in terms of structural growth; I) complete and II) incomplete growth of indium atomic wires near the surface steps. Figures 1(a) and 1(c) show representative STM images respectively.Another\_Phase  After indium deposition, annealing at a temperature slightly higher than that required for complete growth strips off indium from the step edges. Thus, growth of the reconstruction at steps is controllable, and is homogeneous within the area of electron conduction.

Voltage-biased dc two-probe measurements are conducted after STM observation. Two spring-loaded gold-coated probes are pressed onto the electrodes to insure stable and reliable electrical contacts (the inset of Fig. 1(b)). The current-voltage ($`IV`$) characteristics are linear for $`1\mathrm{V}<V<1\mathrm{V}`$ over a wide temperature range, confirming the absence of a Schottky barrier at the electrode interfaces. The temperature dependence of conductivity is measured between room temperature and 6 K. No contamination is apparent in the STM images after the cooling cycles. The carriers in the bare silicon substrates are found to be quenched below 220 K. This allows the selective detection of electrical conduction originating from the surface structures: the possible conduction path is either the surface reconstruction or the underlying subsurface space charge layer.Henzler\_SurfaceConduction ; Hasegawa\_Agroot3

We clarify electron conduction through the Si(111)-4$`\times 1`$-In reconstruction through the comparison of the two sample classes (I, II). Figure 1(b) shows the temperature dependence of conductivity ($`\sigma `$) of a representative class I sample (solid line).footnote1  $`\sigma `$ exhibits a broad maximum around 160 K with decreasing temperature, followed by a significant drop below 130 K. This drop indicates a dramatic change in the conduction mechanism. Complete growth of indium wires right up to the surface step (Fig. 1(a)) suggests that conduction is through both the surface reconstruction and the subsurface space charge layer in the class I samples. Destruction of the indium wires at steps edges should eliminate the surface conduction, leaving only the subsurface conduction. Figure 1(d) exemplifies the temperature dependence of conductivity of the class II samples. While the overall behavior is similar to that of the class I samples, the sudden decrease in $`\sigma `$ below 130 K is absent. The value of $`\sigma `$ above 130 K is also significantly lower than that of the class I samples (see the dashed line in Fig. 1(b) as an eye guide). This difference is not due to change in space charge layer conduction caused by different structural growth at steps, because this would lead to a rather uniform shift in $`\sigma `$ across the entire temperature region. Thus we conclude that the gray region of Fig. 1(b) is the contribution from the surface atomic wires; the conductivity is approximately 100 $`\mu `$S. The sudden decrease in $`\sigma `$ below 130 K is ascribed to a change in the surface conduction mechanism.

We confirm that the residual conductivity found in the class II samples (Fig. 1(d)) is the contribution of the subsurface space charge layer. The variation of $`\sigma `$ can be well described by the equation

$$\sigma =C\mathrm{exp}(E_g/k_BT)T^\alpha $$
(1)
where $`C`$ is a constant and $`E_g`$ and $`\alpha `$ are parameters. By curve fitting, one obtains $`E_g=39.7\mathrm{meV}`$ and $`\alpha =2.89`$. The fitting curve (dashed line in Fig. 1(d)) fully supports the experiment. The diagram of Fig. 1(d) (inset) illustrates the origin of these parameters.Henzler\_SurfaceConduction  Because of the different Fermi levels between the surface Si(111)-4$`\times 1`$-In reconstruction and the silicon substrate, the silicon bands bend upwards near the surface. This induces hole carriers in the subsurface space charge layer. $`E_g`$ is attributed to the energy difference between the Fermi level and the upper bound of the silicon valence band near surface, representing the activation energy for holes. The term $`T^\alpha `$ in equation (1) corresponds to the power-law $`T`$-dependence of the hole mobility. The value $`E_g=39.7\mathrm{meV}`$ is consistent with a previous report,Abukawa\_In4x1  and the value $`\alpha =2.89`$ is close to $`\alpha =2.20,2.42`$ for p- and n-type silicons respectively.Sze\_Semiconductor  Once the band bending is determined, one can estimate the conductivity ($`\sigma `$) of the space charge layer using the reported silicon mobility.Hasegawa\_Agroot3 ; Handbook\_ChemPhys  At room temperature, $`\sigma `$ is estimated to be 170 $`\mu `$S, consistent with the measured value 300 $`\mu `$S considering that the conductivity of the substrate (70 $`\mu `$S) is included at room temperature. Thus we conclude that the electron conduction in the class II samples is dominated by the subsurface space charge layer.

We have demonstrated electron conduction through surface reconstruction by intentionally destroying wires at steps, while their quantitative temperature dependence remains undetermined. To clarify this, we extract surface conduction by introducing defects in the middle of the wires on the same sample. A metal-insulator transition of this system is observed via transport experiments. First, a complete Si(111)-4$`\times 1`$-In reconstruction is formed with negligible defects (Fig. 2(a)). The conductivity $`\sigma `$ shows a significant decrease at 130 K (Fig. 2(c), solid line). After returning to room temperature, a small amount of indium (0.04 ML) is additionally deposited without any sample annealing. This process induces defects in the middle of the indium wires (Fig. 2(b)). In the second conductivity measurement (Fig. 2(c), dotted line), $`\sigma `$ is significantly decreased compared to the first above 130 K, while the two measurements collapse to a single curve below 130 K. Because electron conduction is suppressed by defects in the wires, the difference between the two (Fig. 2(c), dotted-dashed line) is the contribution of the surface reconstruction. It gradually decreases with decreasing temperature, followed by a sudden drop at 130 K. Below 120 K, conduction of the indium wires ceases, showing that the system is in the insulating phase.

Let us note that the electron transport phenomenon revealed here originates from the unique surface state of Si(111)-4$`\times 1`$-In reconstruction. A thin indium film on a silicon surface with bulk-like electronic states would not exhibit this change. The result is in agreement with a phase transition recently found by Yeom et al.Yeom\_In4x1  They clarified that the system undergoes a transition around 130 K accompanied by gap opening at the Fermi level, leading to periodic modulation of lattices and charges below the transition temperature. Although its mechanism is still under debate, it is clear from our finding that the system undergoes a metal-insulator transition.

Although macroscopic surface electron conduction through steps and domain boundaries seems remarkable, this has been confirmed for the Si(111)-$`\sqrt{3}\times \sqrt{3}`$-Ag reconstruction in a similar configuration.Hasegawa\_Agroot3  The surface steps and domain boundaries may be the main sources of resistance in surface conduction, but the present experiment suggests that the conductivity is generally quite high as far as the surface reconstruction grows up to the steps. However, disruption of the reconstruction near steps can significantly enhance their resistance. This is possible if electron transfer between adjacent terraces is due to tunneling. In this case, only a small change in tunneling gap distance will lead to substantial enhancement of resistance.

One other factor significantly affects the global transport through the surface reconstruction: the electrode-indium wire interface. Figure 3 shows an STM image of the interface between the indium wires and a test tantalum pad. Surprisingly, the surface reconstruction has grown right up to the edge of the pad. This establishes the electrical connection between the electrodes and the wires. If silver rather than tantalum is deposited as electrodes on a sample after growth of the indium wires, wires near the electrode pads are destroyed, apparently by migrating silver atoms. We confirmed that this results in vanishing surface conduction. The growth of the indium surface reconstruction requires a clean silicon surface, which is maintained even near tantalum pads after flash cleaning.Dunn\_TaPad  This gives a natural explanation for the growth of the indium wires right up to the electrode interface.

###### Acknowledgements.

This work was partly supported by the Science and Technology Agency through Organized Research Combination System. The authors thank T. Yokoyama, L. D. Ueda-Sarson (NIMS), D. Pescia, A. Vaterlaus (ETH Zurich), and S. Hasegawa (University of Tokyo) for helpful discussions.

a) Author to whom correspondence should be addressed. E-mail: UCHIHASHI.Takashi@nims.go.jp

b) Present address: Laboratorium für Festkörperphysik, Eidgenössische Technische Hochschule (ETH) Zürich, CH-8093 Zürich, Switzerland.