Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cbversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0
0.13.3
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ INTERPRETER_EVALUATOR_OBJS = \
$(INTERPRETER_EVALUATOR)/operators/assignment.o \
$(INTERPRETER_EVALUATOR)/operators/incdec.o \
$(INTERPRETER_EVALUATOR)/operators/ternary.o \
$(INTERPRETER_EVALUATOR)/operators/error_handling.o \
$(INTERPRETER_EVALUATOR)/operators/memory_operators.o \
$(INTERPRETER_EVALUATOR)/access/array.o \
$(INTERPRETER_EVALUATOR)/access/member.o \
Expand Down
50 changes: 43 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,60 @@
# Cb (シーフラット) プログラミング言語

**最新バージョン**: v0.13.0 - FFI & Developer Experience
**リリース日**: 2025年11月14日
**最新バージョン**: v0.13.4 - String Arrays & Vector<string>
**リリース日**: 2025年11月16日
**ステータス**: 🚧 Development

### 📊 品質指標(v0.13.0
### 📊 品質指標(v0.13.4

- **統合テスト**: **740+個**(100%成功) 🎉
- **統合テスト**: **4207個**(100%成功) 🎉
- **Asyncテスト**: **32個** (Result/Option統合、直接return対応) ✅
- **Genericテスト**: **36個** (Structs/Enums/Functions/Interface含む) ✅
- **Interfaceテスト**: **44個** (async interface含む) ✅
- **Builtin Typesテスト**: **20個**(Option/Result組み込み型) ✅
- **Stdlibテスト**: **33個**(async tests含む) ✅
- **Stdlibテスト**: **33個**(async tests含む、5スイート) ✅
- **FFIテスト**: **準備中**(C/Rust/Zig/Go統合) 🆕
- **ユニットテスト**: **30個**(100%成功) ✅
- **総テスト数**: **740+個**(100%成功) 🎉
- **テスト実行時間**: **10秒**(76%改善)
- **総テスト数**: **4207+個**(100%成功) 🎉
- **テスト実行時間**: **60秒**
- **テストカバレッジ**: 全機能を網羅的にテスト
- **Production Ready**: async/await完全動作 ✅

### 🆕 v0.13.4の新機能

**1. ✅ 文字列配列のサポート** 🆕
- **文字列配列の初期化**: `string[N]` 配列の宣言と代入が完全動作
- **配列要素への代入**: `arr[0] = "Hello"` が正常に動作
- **const修飾子**: `const string[N]` が正しく機能
- **リテラル初期化**: `string[3] arr = ["A", "B", "C"]` が動作

```cb
void main() {
string[3] arr;
arr[0] = "Hello";
arr[1] = "World";
println("First: '{arr[0]}'"); // First: 'Hello'
}
```

**2. ✅ Vector<string>のサポート** 🆕
- **ジェネリックコレクション**: `Vector<string>` が完全に動作
- **deep copy実装**: 文字列の自動deep copy
- **メモリ管理**: malloc/freeによる安全なメモリ管理
- **全機能対応**: push_back/push_front/at/pop_back/get_length

```cb
import stdlib.std.vector;

void main() {
Vector<string> vec;
vec.push_back("Hello");
vec.push_back("World");
string first = vec.at(0); // "Hello"
}
```

---

### 🆕 v0.13.0の新機能

**1. 🔗 FFI (Foreign Function Interface)** 🆕
Expand Down
6 changes: 4 additions & 2 deletions docs/BNF.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Cb言語 BNF文法定義

**バージョン**: v0.13.0
**最終更新**: 2025年11月14日
**バージョン**: v0.13.1
**最終更新**: 2025年11月19日

## 概要

Expand Down Expand Up @@ -465,6 +465,8 @@ async int task() {
| '--' <unary_expression>
| <unary_operator> <unary_expression>
| 'await' <unary_expression>
| 'try' <unary_expression> // v0.13.1
| 'checked' <unary_expression> // v0.13.1

<unary_operator> ::= '&' // アドレス演算子
| '*' // デリファレンス
Expand Down
102 changes: 102 additions & 0 deletions docs/archive/releases/v0.13.1/IMPLEMENTATION_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# v0.13.3 実装サマリー

## 実装日
2025年11月16日

## 実装内容

### ✅ 完了した項目

#### 1. ドキュメント整備
- **リリースノート作成**: `release_notes/v0.13.3.md`
- 既知の問題と回避策を明確に文書化
- テスト統計の更新
- 将来のバージョンでの実装計画

#### 2. テストケースの追加
`tests/cases/v0.13.3/`ディレクトリに以下を追加:
- `test_empty_string.cb` - 空文字列表示のテスト(部分的にパス)
- `test_vector_string.cb` - Vector<string>のテスト(スキップ)
- `test_generic_arrays.cb` - ジェネリック配列のテスト
- `test_nested_match.cb` - ネストしたmatchのテスト
- `test_simple_string_array.cb` - 文字列配列のテスト

#### 3. ドキュメント更新
- `IMPLEMENTATION_STATUS.md` - v0.13.3の情報を追加
- `docs/todo/v0.13.3/README.md` - 実装計画を完了状態に更新
- `.cbversion` - v0.13.3に更新

### ⚠️ 既知の問題(v0.13.4で修正予定)

1. **文字列配列の初期化**
- 症状: `string[3] arr; arr[0] = "Hello";` でセグフォ
- 回避策: 配列リテラルを使用

2. **Vector<string>のサポート**
- 症状: Vector<string>の操作でセグフォ
- 根本原因: 文字列のdeep copyメカニズム未実装
- 回避策: Vector<int>や Vector<struct>を使用

3. **ジェネリック構造体配列**
- 症状: 配列要素アクセス時に型情報が失われる可能性
- 回避策: 個別の変数を使用

4. **ネストしたmatch式**
- 症状: 2段階以上のmatchで内側の型情報が失われる
- 回避策: matchを分割し、中間変数に代入

## テスト結果

### 既存テスト
- ✅ 全33テスト、5スイートがパス
- ✅ Integration tests: PASSED
- ✅ Unit tests: PASSED
- ✅ Stdlib C++ tests: PASSED
- ✅ Stdlib Cb tests: PASSED

### 新規テスト
- 📝 v0.13.3テストケースを追加(将来の実装準備)
- 既知の問題のため、一部のテストはスキップまたは失敗(期待通り)

## 後方互換性

v0.13.2からv0.13.3へのアップグレードは完全に後方互換性があります。
既存のコードに変更は不要です。

## 次のステップ (v0.13.4)

### 優先度: 高
- [ ] 文字列配列の初期化問題の修正
- [ ] Vector<string>のサポート(deep copy実装)
- [ ] ジェネリック構造体配列の完全サポート
- [ ] ネストしたmatch式の型情報保持

### 優先度: 中
- [ ] パフォーマンス最適化
- [ ] エラーメッセージの改善
- [ ] デバッグ機能の強化

## 技術的な考察

### 文字列配列の問題について
調査の結果、以下の点が判明しました:
- 文字列配列の宣言時に`array_strings`ベクトルが初期化されていない
- `initialize_array_from_dimensions`は正しく実装されているが、呼び出しパスに問題がある可能性
- 深い調査とデバッグが必要なため、v0.13.4に延期

### Vector<string>の問題について
- 現在のVectorの実装は`malloc`/`free`を使用
- 文字列はC++の`std::string`として管理されている
- deep copyメカニズムの実装が必要

## Git情報

**コミット**: 0d67cef
**ブランチ**: v0.13.2
**変更ファイル**: 9ファイル
**追加行**: 806行
**削除行**: 52行

## 謝辞

v0.13.3のリリースにご協力いただいた全ての方々に感謝します。
File renamed without changes.
66 changes: 66 additions & 0 deletions docs/archive/releases/v0.13.1/README_v0.13.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# v0.13.3 実装計画

**対象バージョン**: v0.13.3
**種別**: パッチバージョン
**作成日**: 2025年11月14日
**完了日**: 2025年11月16日
**ステータス**: ✅ Completed

---

## 🎯 概要

v0.13.3は、ドキュメント整備と既知の問題の明確化に焦点を当てたリリースです。
将来のバージョンで実装予定の機能に対するテストケースを準備し、ユーザーに現在の制限事項を明確に伝えます。

### 実施した内容

1. **ドキュメント整備**
- 既知の問題と回避策の文書化
- テストケースの追加

2. **安定性確認**
- 全テスト(33テスト、5スイート)の実行とパス確認
- 後方互換性の維持

3. **将来の実装準備**
- v0.13.4で実装予定の機能のテストケース作成

---

## 📝 既知の問題(v0.13.4で修正予定)

**v0.13.xの方針**:
- 基本機能の安定化
- ドキュメントの充実
- 既知の問題の明確化と計画的な修正

**v0.13.4での修正予定**:
1. 文字列配列の初期化問題
2. Vector<string>のサポート
3. ジェネリック構造体配列の改善
4. ネストしたmatch式の型情報保持

**v0.14.0との違い**:
- v0.13.x: インタプリタベースの基本機能の完成
- v0.14.0~: コンパイラ/IR/バックエンド実装

---

## ✅ 完了した項目

- [x] v0.13.3リリースノートの作成
- [x] テストケースの追加
- [x] `test_empty_string.cb`
- [x] `test_vector_string.cb`(スキップ)
- [x] `test_generic_arrays.cb`
- [x] `test_nested_match.cb`
- [x] IMPLEMENTATION_STATUS.mdの更新
- [x] バージョン番号の更新(v0.13.3)
- [x] 既存テストの実行確認(全テストパス)

---

**実装担当**: Cb Language Team
**最終更新**: 2025年11月16日

36 changes: 36 additions & 0 deletions docs/archive/releases/v0.13.1/README_v0.13.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# v0.13.x Implementation Plans Archive

This directory contains the archived implementation plans for v0.13.1 through v0.13.4, which were consolidated into a single v0.13.1 release.

## Archived Content

- `v0.13.2/` - Generic array string type bug fix implementation
- `v0.13.3/` - Known issues documentation and test suite expansion
- `v0.13.4_implementation_plan.md` - String arrays, Vector<string>, and nested match implementation

## Timeline

- **Start Date**: November 15, 2025
- **End Date**: November 16, 2025
- **Duration**: 2 days
- **Final Release**: v0.13.1 (consolidated)

## Key Achievements

1. ✅ Async impl methods with automatic self synchronization
2. ✅ String arrays (`string[N]`) support
3. ✅ Vector<string> with deep copy
4. ✅ Nested match expressions
5. ✅ try/checked expressions
6. ✅ Generic array type fixes

## Test Results

- **Integration tests**: 4217/4217 PASSED
- **Unit tests**: PASSED
- **Stdlib tests**: 33/33 PASSED
- **Total**: 100% success rate

## Reference

See `release_notes/v0.13.1.md` for the complete unified release notes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 包括的エラーハンドリング設計(v0.12.1+
# 包括的エラーハンドリング設計(v0.13.1

## 概要

Expand Down Expand Up @@ -302,15 +302,15 @@ Result<int, RuntimeError> divide(int a, int b) throws DivisionByZeroError {

## 実装段階

### Phase 1: 基本的なtry式(v0.12.1)
### Phase 1: 基本的なtry式(v0.13.1)
- ✅ try式の構文パース
- ✅ RuntimeError列挙型の定義
- ✅ 基本的なランタイムエラーのキャッチ
- NullPointerError
- DivisionByZeroError
- IndexOutOfBoundsError

### Phase 2: ?演算子(v0.12.1)
### Phase 2: ?演算子(v0.13.1)
- ✅ ?演算子の構文パース
- ✅ 自動エラー伝播の実装
- ✅ async/awaitとの統合
Expand Down Expand Up @@ -523,5 +523,5 @@ Cb言語は**Rust級の安全性**を持ちながら、**よりシンプルな
---

**提案日**: 2025年11月10日
**対象バージョン**: v0.12.1以降
**対象バージョン**: v0.13.1
**ステータス**: 設計提案
Loading