
658 P.2d 141 (1983)
Billie Teresa NYGREN, Appellant,
v.
STATE of Alaska, Appellee.
No. 5880.
Court of Appeals of Alaska.
January 28, 1983.
Charlene Lichtmann, Asst. Public Defender, and Dana Fabe, Public Defender, Anchorage, for appellant.
*142 Leonard M. Linton, Jr., Asst. Dist. Atty., Larry R. Weeks, Dist. Atty., Anchorage, and Wilson L. Condon, Atty. Gen., Juneau, for appellee.
Before BRYNER, C.J., and COATS and SINGLETON, JJ.

OPINION
BRYNER, Chief Judge.
Billie Teresa Nygren stabbed and killed her husband. She was convicted of manslaughter by a jury (former AS 11.15.040). The superior court sentenced her to eight years' imprisonment, with five years suspended. Her conviction and sentence were affirmed on appeal. Nygren v. State, 616 P.2d 20 (Alaska 1980).
Nygren subsequently filed a motion with the superior court seeking credit for time she spent in residential alcohol treatment programs while she was on bail pending trial and while she was on bail pending appeal after her conviction and sentence. She relied on former AS 11.05.040(a)[1] and on Lock v. State, 609 P.2d 539, 545 (Alaska 1980).
The trial court denied Nygren credit for either period. Nygren has appealed to this court, renewing her application for credit for time served. We conclude that Nygren was entitled to credit for her time spent in the alcohol treatment programs, and we therefore reverse and remand this case to the trial court for the entry of an amended judgment.
Nygren's crime was committed on February 17, 1978. She was immediately taken into custody and held at Ridgeview Correctional Center until March 17, 1978. She was then released on her own recognizance to live at a crisis center for battered women operated by a private organization, the Abused Women's Aide in Crisis (AWAIC). While at the shelter, Nygren was under twenty-four hour surveillance and was subject to additional court-ordered restrictions on her liberty.[2] Nygren remained at the *143 AWAIC shelter until April 27, 1978, when she was transferred, with court approval, to the Clitheroe Center, a residential alcohol treatment facility operated by the Salvation Army. It appears that Nygren was subject to the same general conditions of release at the center as she was at the AWAIC shelter.
Nygren was convicted of manslaughter by a jury on May 26, 1978. She stayed at the Clitheroe Center until she was sentenced on July 31, 1978. She was then imprisoned for a short time at the Ridgeview Correctional Center, but on August 2, 1978, she was released on bail pending appeal and returned to the Clitheroe Center.[3] She remained there until July 24, 1979, when she was moved, with court permission, to the McKinnell House, an after-care facility maintained by the Salvation Army as a half-way house and transition residence for those who have completed residential alcohol treatment, but have not yet established themselves in a residence on their own.[4]
Nygren's conviction and sentence were affirmed by a supreme court mandate issued November 10, 1980. Nygren remained at McKinnell House until December 30, 1980, at which time she was placed at the Ridgeview Correctional Center to serve her sentence. The location and duration of Nygren's various residences from the date of her husband's death until her final transfer to prison may be summarized as follows:


*144
     Place              Admitted   Released    No. of Days
  1. Ridgeview          2-17-78     3-17-78        30
     Correctional
     Center
  2. AWAIC Center       3-17-78     4-27-78        40
  3. S.A. Clitheroe     4-27-78     7-31-78        94
     Center
  4. Ridgeview          7-31-78     8-02-78         3
     Correctional
     Center
  5. S.A. Clitheroe     8-02-78     7-24-79       354
     Center
  6. S.A. McKinnell     7-24-79    12-30-80       525
       House                                      ___
                                   TOTAL:       1,046

The trial court allowed credit for the thirty-three days Nygren spent at the Ridgeview Correctional Center but denied her all additional time.
In reviewing the trial court's decision, we are guided by three cases in which our supreme court has addressed a defendant's right to credit for time spent outside a jail or prison: Lock v. State, 609 P.2d 539 (Alaska 1980); Paul v. State, 560 P.2d 754 (Alaska 1977); and Chase v. State, 479 P.2d 337 (Alaska 1971). We have also considered this issue in Schwing v. State, 633 P.2d 311 (Alaska App. 1981).
In Chase, the defendant was convicted in magistrate's court of possession of a firearm while intoxicated and sentenced to serve ninety days' imprisonment. Several days later the magistrate amended Chase's sentence by providing:
It is hereby ordered that the defendant be released to the custody of Mr. Mueller of the BLM [Bureau of Land Management] for the fire fighting season. Remaining sentence to be served beginning the day the fire fighting season ends or defendant is terminated from the job for any reason, whichever is the sooner, and under the same conditions as the original judgment.
Chase v. State, 479 P.2d at 338-39. Chase argued that he was entitled to credit for the time he spent as a firefighter in the custody of Mr. Mueller. The trial court denied him credit and he appealed.
The supreme court found the sentence imposed ambiguous as to whether Chase was to serve his sentence as a firefighter or in jail after completion of his firefighting job, and in accordance with traditional standards of interpreting criminal judgments, resolved the ambiguity in Chase's favor, allowing him credit for the time he spent as a firefighter. In reaching its conclusion, the court noted that the provisions regarding firefighting had been added to the sentence after its original imposition, and that if the sentence were construed as requiring Chase to serve ninety days' imprisonment and, in addition, a period, under supervision, as a fire fighter, the amendment would in effect have increased the original sentence. Id. at 341-42. While the supreme court's treatment of the ambiguous sentence in Chase is not directly germane to the issue under consideration here, the court did make some comments that we find instructive:
[T]his case involves something more than a mere deferral of the sentence originally imposed, since the magistrate explicitly provided that Chase was to "be released to the custody of Mr. Mueller of the BLM" for the duration of the firefighting season. Thus, the magistrate's order, if construed as a deferral of sentence, would in effect have added a period of custody to the original term of imprisonment.
The state has argued that such an order did not provide for any particular restraints upon Chase, and that probably no unusual restraints were in fact imposed during the time he spent with the BLM. We have no way of telling whether Chase was actually supervised or restrained while in the custody of Mr. Mueller. It would, indeed, make little difference if we knew. The fact that the amended sentence provided specifically that Chase was to be placed in the custody of Mr. Mueller is in itself sufficient to establish that Chase's liberty was restricted during the period in question. Mr. Mueller might not actually have subjected Chase to any amount of special supervision or control during the period in question, but under the provision of the amended sentence relinquishing Chase to *145 Mr. Mueller's custody, there was always a possibility that such supervision or control would be imposed.
Id. at 341 n. 11.
In Paul, the defendant was convicted of burglary and larceny and sentenced to two years' imprisonment. All but sixty days of the sentence were suspended, and Paul was placed on probation for the balance of the term. His suspended sentence was later revoked when he was charged with a burglary. Paul argued that he was entitled to credit for time spent on probation. Paul v. State, 560 P.2d at 755. When revocation occurred, Paul had less than four months of his probation period remaining. Paul's conditions of probation included the requirement that he "remain on his good behavior" and "make reasonable efforts to complete a course in vocational training at the Seward Skill Center," but otherwise left him completely at liberty. Id. at 755. In denying Paul credit, the supreme court said:
In permitting probation, the court, in an effort to rehabilitate Mr. Paul, permitted him to remain at liberty. While certain restrictions were imposed, they in no manner may be equated to serving a period of incarceration. We do not think that the term of probation should be credited against the original suspended sentence. This result is in accord with the several federal courts which have reached this issue. We hold that Mr. Paul was not entitled to have the period he served on probation credited against his sentence.
Id. at 758 (footnote omitted).
In Lock, the defendant pled guilty to escape and burglary not in a dwelling. He received a suspended imposition of sentence. This was later revoked, and a substantial sentence of imprisonment was imposed. Lock argued that he was entitled to credit for time which he was ordered to spend, while on probation, in Family House, a residential drug rehabilitation program, and in Akeela House, a similar rehabilitation program. Lock v. State, 609 P.2d at 541. The court concluded that Lock was entitled to such credit. It distinguished its prior ruling in Paul on two grounds. First, it noted that in Paul the court had imposed a sentence and then suspended it, so that Paul could not claim that the time he spent on probation was "pending ... sentencing" under former AS 11.05.040. Lock, on the other hand, received a suspended imposition of sentence pursuant to AS 12.55.085(a), so that the time he spent on probation was literally pending sentencing. Id. at 542-43. Second, the court noted that Lock was subject to greater restraints on his liberty than was Paul. The court reasoned that Paul's restrictions did not interfere in any significant way with his existing lifestyle; he was not physically confined and was free to make his own decisions regarding where to live and work and with whom to associate. The court concluded that,
upon revocation of probation, one is entitled to credit against his sentence on the original offense for time spent as a condition of probation, in a rehabilitation program which imposes substantial restrictions on one's freedom of movement and behavior.
Id. at 545.[5]
In arguing Nygren's case, the parties recognized that there is a certain degree of vagueness in the phrase "substantial restriction on one's freedom of movement and behavior" adopted in Lock as the standard for determining when credit should be given for time spent in a rehabilitation facility. It is clear that the trial court also recognized the imprecise nature of the standard adopted in Lock in deciding this case. We believe, however, that the Lock standard is sufficiently definite to provide practical guidance.
*146 In Lock, the supreme court addressed the Family House and Akeela House programs. Two of the cases relied upon by the supreme court in Lock involved similar drug rehabilitation programs. See People v. Rodgers, 79 Cal. App.3d 26, 144 Cal. Rptr. 602, 605 (1978); People v. Stange, 91 Mich. App. 596, 283 N.W.2d 806 (1979). In reliance on those authorities, the parties have focused on the similarities between such drug rehabilitation programs and the kinds of facilities in which Nygren was required to reside.
We have concluded that the parties' reliance is in part misplaced, since the significant question is not the extent to which a given facility corresponds to a particular drug treatment program, but rather the extent to which a person released on bail or probation is subjected to restrictions approximating those experienced by one who is incarcerated. Paul v. State, 560 P.2d at 758. We recognize that places of incarceration vary substantially, as do the restrictions that they place upon their inhabitants. Nevertheless, incarcerative facilities share a number of common characteristics: their residents are invariably sent there by court order; the facilities require residency, and residency requirements are sufficiently stringent to involve a definite element of confinement; residents of the facilities are subject to twenty-four hour physical custody or supervision; any periods during which residents may be permitted to leave the facility are expressly limited, both as to time and purpose; while in the facility, residents are under a continuing duty to conform their conduct to institutional rules and to obey orders of persons who have immediate custody over them; and residents are subject to sanctions if they violate institutional rules or orders and to arrest if they leave the facility without permission. While these characteristics do not represent an exhaustive list of attributes defining incarceration, we think they are at least sufficient to serve as sound points of reference for determining, in any given case, whether "substantial restrictions on one's freedom of movement and behavior" have been imposed, so as to require credit for time served under Lock.
In the present case, analysis in light of these characteristics indicates that credit for time served should have been allowed. All of Nygren's placements were initiated by specific court order. Each of the facilities where she stayed were residential programs, and Nygren was expressly required by court order to remain on the premises where she resided and to obey rules and regulations enforced there, as well as additional, specific court-ordered restrictions. Nygren was subject to twenty-four hour supervision and custody in the facilities where she was placed. She was not allowed to leave without permission, and in most cases she was required to be with an escort. Her periods of leave were for specific and limited purposes. It is also clear that Nygren was subject to immediate arrest and imprisonment if she left any of the facilities at which she stayed without first obtaining the court's permission. Under these circumstances, we conclude that, while residing in each of the facilities in question here, Nygren was subjected to substantial restraints on her freedom of movement and behavior. Thus, in accordance with the supreme court's holding in Lock, she is entitled to receive credit for the time which she spent at these facilities, both prior to trial and while her case was pending on appeal.[6]
*147 The judgment of the superior court is REVERSED, and this case is REMANDED for entry of a new judgment consistent with this opinion.
NOTES
[1]  Former AS 11.05.040(a) provided:

(a) Computation of term of imprisonment and stay. When a person is sentenced to imprisonment, his term of confinement begins from the day of his sentence. A person who is sentenced shall receive credit towards service of his sentence for time spent in custody pending trial or sentencing, or appeal, if that detention was in connection with the offense for which sentence was imposed. The time during which the person is voluntarily absent from the penitentiary, reformatory, jail, or from the custody of an officer after his sentence, shall not be estimated or counted as part of the term for which he was sentenced.
Former AS 11.05.040(a) was essentially reenacted as AS 12.55.025(c), which states in part:
[W]hen a defendant is sentenced to imprisonment, his term of confinement commences on the date of imposition of sentence. A defendant shall receive credit for time spent in custody pending trial, sentencing, or appeal, if the detention was in connection with the offense for which sentence was imposed. A defendant may not receive credit for more than the actual time he spent in custody pending trial, sentencing, or appeal. The time during which a defendant is voluntarily absent from official detention after he has been sentenced may not be credited towards service of his sentence.
[2]  A stipulation regarding Nygren's pretrial bail which the superior court approved, provided, in relevant part:

[T]he defendant may be released on her own recognizance pending trial of her case subject to the following conditions:
(1) The defendant will reside in the [AWAIC] shelter. The address of the shelter being secret for security reasons, only the police and correctional personnel designated by the police shall have access to the address of the shelter.
(2) Defendant's current address at the shelter from this day forward, will not be the subject of inquiry at trial in the absence of an in camera showing of relevance to some trial issue.
(3) The defendant will consume absolutely no alcohol and enroll of the Municipal Comprehensive Alcohol Screening Program.
(4) The defendant will have a curfew of 8:00 p.m. every night.
(5) The defendant will be supervised by the staff of the shelter at all times except as follows:
(a) She may go to and from specific educational programs such as a general equivalency degree program.
(b) She may go and return from specific training or educational programs at the Cook Inlet Native Association or the Bureau of Indian Affairs.
(c) She may go and return to specified appointments with medical or legal personnel.
(d) She may visit her children in the company of a third person to be agreed upon by the public defender and the district attorney. The visits shall take place in Anchorage.
(e) Transportation shall be prearranged, either through the shelter or through the Cook Inlet Native Association bus dispatch.
(6) The defendant will keep all scheduled court appearances.
(7) The defendant will obey all state, federal, and municipal laws, ordinances and regulations.
(8) The defendant will have no contact with the family of Gene and Eva Ellison and Tom Nygren.
[3]  The order releasing defendant on bail pending appeal provided:

(1) That the defendant be released on bail pending appeal.
(2) That the conditions of release are as follows:
(a) The defendant reside in the twenty-four hour custodial treatment facility at Point Woronzof under the supervision of the Salvation Army.
(b) That the defendant be in the facility with no more than one-half hour spent outside the supervision of a counselor or outside the building.
(c) That the defendant participate in all treatment and counseling programs of the Salvation Army as directed by the staff.
(d) That the staff report any violations of the rules of the program, or any absence longer than one-half hour, immediately to the district attorney Robert Bundy, to the Public Defender Sue Ellen Tatter, or to the police.
(e) That the defendant consume no alcohol.
[4]  The order modifying the defendant's bail pending appeal provided:

[T]he defendant's bail pending appeal [is] modified as follows:
(1) The defendant be allowed to be transferred into the transitional care unit operated by the Salvation Army and located at Point Worronzoff [sic].
(2) The defendant is to continue the clerical training program operated by the Cook Inlet Native Association.
(3) At the termination of her involvement in the clerical training program, the defendant may be transferred to McKinnell House, which is operated by the Salvation Army program and located at 133 East 9th Street. A condition of transfer to McKinnell House is that the defendant will be subject to twenty-four hour supervision. While at that facility, the defendant may attend counselling and therapy sessions as directed by the Alaska Mental Health Association.
(4) The defendant may visit with her children in Kenai under the following conditions:
(a) That she be driven to the airport by the Salvation Army.
(b) That she be picked up in Kenai by her aunt or uncle, Mr. and Mrs. Ed McKeown.
(c) The defendant must reside at the McKeown residence during her stay in Kenai.
(d) Said visits may be made once a week and each visit may not exceed 72 hours in duration.
(e) The defendant must be brought to the airport in Kenai by Mr. or Mrs. McKeown and picked up at the airport in Anchorage by a member of the Salvation Army.
(f) In Kenai, the defendant may participate in any activities with her family, but she must remain in the physical presence at all times of either Mr. or Mrs. McKeown.
[5]  The court noted in passing that the trial judge had characterized the program at Family House as "pretty tough" and "much tougher than ... serving time in jail." In addition, the sentencing judge informed Lock that he would be returned to jail if he: (1) did not comply with the program's rules; or, (2) left the home without permission. The supreme court emphasized that the trial court treated Lock as having "escaped" from both Family House and Akeela House. Lock v. State, 609 P.2d 539, 546 (Alaska 1980).
[6]  Our decision in Schwing v. State, 633 P.2d 311, 313 (Alaska App. 1981), does not require a contrary result. In Schwing, it was clear from the contemporaneous record of the sentencing proceeding that the court was aware that the defendant had spent over three months in Akeela House, and that the court intended Schwing to serve six months in a correctional facility in addition to the time already spent in the rehabilitation program. We held that, under those circumstances, the court had not failed to give Schwing credit for time served. In contrast, the sentencing record in this appeal is not sufficient to raise the inference that the court intended Nygren to serve three years' incarceration in addition to time already served. It is equally clear that the sentencing court did not specifically intend Nygren's term of incarceration to be in addition to any time she might serve in a residential treatment facility after sentencing but before execution of the sentence.
